Skip to content

SCRUM-252 — AdminUI namespace table, create namespace, schema editor

Plan ref: UI-7 (docs/11-admin-plane-plan.md). Stacked on SCRUM-251.

What exists

Piece Notes
Namespace list now viewer (Config's GET is a viewer read); table of name, audience, latest version, draft revision, unpublished-changes dot, schema link; name search in the URL (?q=). Names link to the editor only for live_ops+; the editor route stays live_ops until its actions are role-gated (SCRUM-253)
Create namespace admin only (RoleGate): name with live validation (Config's regexp), audience client/server chosen once ("cannot be changed later"), description; 409 / 400 shown inline; on success → the new namespace's schema page
Schema page /config/namespaces/:name/schema current schema read-only (CodeMirror via RawJsonEditor's readonly); admins get Edit → "Save as version N+1"; local JSON errors and Config's compile error shown inline; unsaved-changes guard on leave
Lost-update guard Config's schema PUT has no version precondition, so the page re-reads the schema right before saving and stops with "someone saved v{n} while you were editing" (Reload / Save anyway)

Existing tests updated for the viewer-readable list; they still assert a viewer is denied the editor.

How to verify

cd services/adminui
npm run typecheck && npm run lint && npm run format:check && npx vitest run && npm run build
npx playwright test

Results at time of writing

  • typecheck, lint, prettier, vitest (337 tests), build: pass; Playwright 17/17 incl. admin create → schema edit → v2 → listed, and a viewer seeing the list with no Create and no Edit.

Follow-up worth a ticket

The re-read is a client-side narrowing of the window, not a guarantee: Config's PUT /schema should take an expected schema_version and answer 409 when it moved (the same pattern as drafts and publishes).

How it was built

DeepSeek run scoped (Landlock) to services/adminui (652 s, ~62k output tokens, reasoning effort low). Claude review: checked the edited role tests keep the viewer denial of the editor; no changes needed.