Skip to content

SCRUM-253 — AdminUI versions tab, diff viewer, create-version dialog

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

What exists

Piece Notes
Editor role gating the editor route is now viewer: viewers see everything read-only (no Save / Validate / Create version, disabled fields); live_ops+ edit. Namespace names link for everyone
Versions tab paged table (version, message, author, time, schema, short sha); pick two rows, or a row and Draft, to compare; deep link ?tab=versions&from=10&to=draft
DiffView Config's /diff changes grouped by top-level key: path, added / removed / changed, before → after (long values expandable); "Side by side" shows both documents read-only; "No differences" when equal
Create-version dialog message required (blocked while empty or whitespace); shows the draft revision it sends and the draft-vs-latest diff; 201 → toast and refresh; 409 stale_revision → the existing conflict dialog; 409 no_changes → inline; 400 → inline; a draft identical to the latest version is refused up front ("Nothing to version"), with the server's no_changes kept for the race
Editor polish header, toolbar and status chips (unsaved / draft rev / based on / schema) on the design system

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 (356 tests), build: pass; Playwright 21/21 incl. "an empty message blocks version creation", "versioning a draft someone else changed shows the conflict dialog", creating a version and diffing it, and the identical-draft refusal. Screenshots checked: versions tab with a diff, the dialog.

How it was built

DeepSeek run scoped (Landlock) to services/adminui; the first run was interrupted and a second round finished it from the partial tree (582 s, ~13k output tokens). Claude review (screenshots): the dialog let you type a message and submit a draft that was identical to the latest version, only for Config to refuse it; it now says so and disables submit. Tests that used that namespace to reach the server refusals now show a changed preview (unit) or use a diverged namespace (e2e); a test for the up-front refusal was added.