feat(web): expose Settings → Namespaces tab in prod (ADR-0007 PR-A+B)#618
Merged
feat(web): expose Settings → Namespaces tab in prod (ADR-0007 PR-A+B)#618
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
data-ui-tier="dev"→"prod".loadNamespacesTab()no longer early-returns on prod._buildNsCardare JS-gated toSTATE.uiMode === 'dev'so they don't render in prod (their backend routes still 404 there).docs/guides/configuration.md#namespace.settings.ns.empty.{title,body,cta}.Tests
TestNamespaceProdTierpins the prod tier split (list + PATCH open, info GET / rename / delete blocked).test_namespaces_list_is_prod_mounted_but_admin_routes_blockedupdated: asserts PATCH is registered on the prod app and the structural verbs are not.test_html_classification_matches_router_listsdropsnamespacesfrom the dev-section expected set.Docs (default-change fanout)
Proposed (deferred)→Acceptedwith trigger note.configuration.mdandreference.md.getting-started.mdgains a "5. Organise memories with namespaces" step.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— passeduv 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 issuesuv run pytest -m "not ollama"— 3344 passeduv run mm web→ Settings → Namespaces tab visible in prod, Edit (color/description) works, Rename/Delete hiddenuv run mm web --dev→ Rename/Delete reappear and still work🤖 Generated with Claude Code