core/workbench-ui
Shay 0ff3e3b2c8 feat(workbench): Settings route — wired prefs + read-only runtime status (Wave R2, final route)
Replaces SettingsRoutePlaceholder, completing all six placeholder routes.

- workbenchPrefs.ts: typed localStorage prefs with safe parse + live
  same-tab sync (useWorkbenchPrefs). Every pref has a real consumer — no
  toggle that does nothing:
    * landingRoute -> consumed by the App index redirect (Navigate)
    * inspectorDefaultOpen -> consumed by EvidenceProvider initial state
      (EvidenceUrlSync still force-opens on a ?inspect= deep link)
- SettingsRoute: two panels. Preferences (landing route select + inspector
  default switch, applied on next load, survive reload). Runtime (read-only
  /runtime/status: backend, git_revision DigestBadge, engine_state_present,
  checkpoint_revision, revision_warning with warning token, active_session_id,
  mutation_mode) under the standing statement 'Engine configuration is
  CLI-only. This page mutates nothing on the server.'
- no backend change, no new schema/subject, no NOT_YET_MIRRORED change, no
  engine mutation of any kind
- bespoke conformance block (Settings has no empty state — the prefs panel
  always renders); asserts the loading label + CLI-only statement + the
  error contract over the status fetch
- tests: workbenchPrefs (defaults / persist+reload / invalid+malformed
  fallback / partial merge) + SettingsRoute (both panels, landing-route
  persistence, inspector toggle, error-without-mutation)

DEFERRED (flagged, not shipped as theater): list-density pref — honest
wiring requires threading a density token through every list row, a
separate change; shipping a control that does nothing would violate
ADR-0160 (audit-native, not analytics theater). Token-only styling
(hexScan green); full vitest 363 green.
2026-06-12 21:39:41 -07:00
..
e2e test(workbench): playwright smoke lane (ADR-0162 acceptance 5-7) 2026-06-12 12:05:28 -07:00
preview
public/fonts
scripts
src feat(workbench): Settings route — wired prefs + read-only runtime status (Wave R2, final route) 2026-06-12 21:39:41 -07:00
.gitignore
api-schema-snapshot.json feat: implement CORE Workbench W3 Ratification Corridor 2026-06-03 20:13:36 -07:00
enum-snapshot.json feat(workbench/W-031): replay theater (ADR-0160 §Phase 6, deterministic-evidence UX) (#328) 2026-05-26 20:56:31 -07:00
index.html
package.json feat(workbench): design mastery pass — chain rail, typography, doctrine-as-tests (Wave R R1) 2026-06-12 13:18:44 -07:00
playwright.config.ts test(workbench): playwright smoke lane (ADR-0162 acceptance 5-7) 2026-06-12 12:05:28 -07:00
pnpm-lock.yaml feat(workbench): interaction substrate — list nav, virtualization, panel chrome, inspector resize, palette verbs (Wave R R0d) 2026-06-12 12:48:02 -07:00
postcss.config.js
README.md feat(W-027): Workbench frontend shell — five-region grid + ten empty routes + live StatusFooter (ADR-0160 / ADR-0162) (#299) 2026-05-26 12:09:12 -07:00
schema-snapshot.json feat(workbench): sealed single-turn replay backend — GET /replay/{turn_id} (Wave R3) 2026-06-12 17:15:39 -07:00
tailwind.config.ts
tsconfig.json feat(W-027): Workbench frontend shell — five-region grid + ten empty routes + live StatusFooter (ADR-0160 / ADR-0162) (#299) 2026-05-26 12:09:12 -07:00
tsconfig.node.json
vite.config.ts fix(workbench): exclude e2e/ from vitest collection 2026-06-12 12:07:57 -07:00

CORE Workbench UI

React/Vite/TypeScript frontend for CORE Workbench — a local operator UI for inspecting engine state, proposals, evals, and audit trails.

Local development

# Terminal 1 — start the API (W-026)
uv run core workbench api

# Terminal 2 — start the frontend
cd workbench-ui
pnpm install
pnpm dev         # http://127.0.0.1:5173

Custom API URL

VITE_WORKBENCH_API_URL=http://127.0.0.1:9000 pnpm dev

Design system baseline

pnpm preview   # Serves dist/ on http://127.0.0.1:4173
# Navigate to /preview for the Branch 1 design-system baseline

Tests

pnpm test                # Vitest unit + component tests
pnpm test:enum-coverage  # Badge enum coverage (requires uv)

Schema drift detection

The TypeScript types in src/types/api.ts mirror workbench/schemas.py. To check for drift after Python schema changes:

# From repo root
uv run python scripts/dump-api-schemas.py
# Then run: pnpm test (api.test.ts catches field-level drift)

Architecture

  • src/app/ — Shell, TopBar, LeftNav, StatusFooter, ApiErrorBoundary
  • src/api/ — apiFetch client, TanStack Query hooks
  • src/types/ — TypeScript mirrors of Python schemas
  • src/routes/ — Route placeholder components
  • src/design/ — Branch 1 design-system substrate (DO NOT MODIFY except EmptyState and CommandPalette)

ADR cross-references

  • ADR-0160 — Workbench v1 architecture
  • ADR-0162 — Design substrate (Branch 1)
  • ADR-0156, ADR-0157, ADR-0158 — Engine-state checkpoint and reboot audit trail