Skip to content

feat(web): expose Settings → Namespaces tab in prod (ADR-0007 PR-A+B)#618

Merged
memtomem merged 2 commits intomainfrom
feat/ns-tab-prod
Apr 30, 2026
Merged

feat(web): expose Settings → Namespaces tab in prod (ADR-0007 PR-A+B)#618
memtomem merged 2 commits intomainfrom
feat/ns-tab-prod

Conversation

@memtomem
Copy link
Copy Markdown
Owner

Summary

Promotes the Settings → Namespaces tab and the cosmetic-edit verb (PATCH description/color) from dev-only to the prod tier, leaving rename and delete admin-only pending chunk-id stability (ADR-0005 follow-up). Adds a first-time empty-state CTA pointing at the configuration guide. Doc fanout per feedback_default_change_fanout.md.

ADR-0007 was drafted earlier today (#586/#607) and explicitly deferred this surface pending prod-user feedback. The same-day prod transition immediately surfaced "namespace barely visible in web UI" as the trigger — eleven other namespace surfaces had already landed via PR #604, but the Settings tab itself was hidden, which was the surface I expected for colour/description editing. Status flips to Accepted with the maintainer-driven trigger noted.

What changed

Backend tier split

  • namespaces_read (prod) gains PATCH alongside the existing GET list — both safe without chunk migration.
  • namespaces.admin_router (dev-only) keeps GET-by-id, POST rename, DELETE — each will need its own ADR with chunk-id stability design.

Frontend

  • Settings → Namespaces nav button: data-ui-tier="dev""prod".
  • loadNamespacesTab() no longer early-returns on prod.
  • Rename + Delete buttons inside _buildNsCard are JS-gated to STATE.uiMode === 'dev' so they don't render in prod (their backend routes still 404 there).
  • Empty-state tile gains a CTA link to docs/guides/configuration.md#namespace.
  • en/ko locales gain settings.ns.empty.{title,body,cta}.

Tests

  • New TestNamespaceProdTier pins the prod tier split (list + PATCH open, info GET / rename / delete blocked).
  • test_namespaces_list_is_prod_mounted_but_admin_routes_blocked updated: asserts PATCH is registered on the prod app and the structural verbs are not.
  • test_html_classification_matches_router_lists drops namespaces from the dev-section expected set.

Docs (default-change fanout)

  • ADR-0007 status: Proposed (deferred)Accepted with trigger note.
  • Stale "/api/namespaces returns 404 in prod" claim corrected in configuration.md and reference.md.
  • getting-started.md gains a "5. Organise memories with namespaces" step.
  • README.md and packages/memtomem/README.md note the colour/description editing surface.

Out of scope (PR-C, deferred)

Rename and delete prod exposure stay deferred — they each need chunk-migration design (chunk-id stability under string-keyed NS). PR-C will be filed when one of ADR-0007's other trigger criteria fires (post-rollout feedback, multi-agent grouping verdict 2026-05-09, or onboarding-flow rules surface).

Test plan

  • uv run ruff check packages/memtomem/src packages/memtomem/tests — passed
  • uv run ruff format --check packages/memtomem/src packages/memtomem/tests — passed (350 files already formatted)
  • uv run mypy packages/memtomem/src/memtomem/web/routes/namespaces.py packages/memtomem/src/memtomem/web/routes/namespaces_read.py — no issues
  • uv run pytest -m "not ollama" — 3344 passed
  • Smoke: uv run mm web → Settings → Namespaces tab visible in prod, Edit (color/description) works, Rename/Delete hidden
  • Smoke: uv run mm web --dev → Rename/Delete reappear and still work

🤖 Generated with Claude Code

pandas-studio and others added 2 commits April 30, 2026 19:12
Promotes the Settings → Namespaces tab and the cosmetic-edit verb (PATCH
description/color) from dev-only to the prod tier, leaving rename and
delete admin-only pending chunk-id stability work (ADR-0005 follow-up).
Adds a first-time empty-state CTA pointing at the configuration guide so
fresh installs have a path to learn the primitive.

Why: same-day after drafting ADR-0007 the prod transition surfaced as
"namespace barely visible in web UI" — the maintainer-as-prod-user
trigger (#1 in the ADR) fired immediately. Eleven other namespace
surfaces were already wired in prod by PR #604, but the Settings tab
itself was hidden, which is the surface the user expected for
colour/description editing.

Backend tier split:
- ``namespaces_read`` (prod) — GET /api/namespaces (list) + PATCH
  /api/namespaces/{ns} (cosmetic edit). Both safe without chunk
  migration.
- ``namespaces.admin_router`` (dev-only) — GET-by-id, POST rename,
  DELETE. Each needs its own ADR with chunk-id stability design.

Frontend:
- ``data-ui-tier="dev"`` → ``"prod"`` on the Settings → Namespaces nav
  button.
- ``loadNamespacesTab`` no longer early-returns on prod.
- Rename + Delete buttons inside ``_buildNsCard`` are JS-gated to
  ``STATE.uiMode === 'dev'`` so they don't render in prod (their
  backend routes still 404 there).
- Empty-state tile gains a CTA link to docs/guides/configuration.md#namespace.
- en/ko locales gain ``settings.ns.empty.{title,body,cta}``.

Tests:
- ``TestNamespaceProdTier`` pins the prod tier split (list + PATCH
  open, info GET / rename / delete blocked).
- ``test_namespaces_list_is_prod_mounted_but_admin_routes_blocked`` now
  asserts PATCH is registered on the prod app and the structural verbs
  are not.
- ``test_html_classification_matches_router_lists`` drops
  ``namespaces`` from the dev-section expected set.

Doc fanout (default-change rule): ADR-0007 status flipped from
Proposed (deferred) to Accepted with the maintainer trigger noted;
stale "/api/namespaces returns 404 in prod" claim corrected in
configuration.md and reference.md; getting-started.md gains a step 5
on namespace organisation; both READMEs note the colour/description
editing surface.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@memtomem memtomem merged commit 85c7406 into main Apr 30, 2026
7 checks passed
@memtomem memtomem deleted the feat/ns-tab-prod branch April 30, 2026 11:00
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants