Brief 4 of the Wave 1 evidence spine — wire the evidence-context architecture so every route can project into one shared evidence manifold. Command registry (1A): - commandRegistry.ts: useSyncExternalStore-backed command store with a cached snapshot (referentially stable to avoid render loops); useCommands / useCommandRegistry; recent-items in localStorage (last 10). - CommandPalette.tsx: reads from the registry; all ten routes are navigation commands (was Chat/Proposals/Evals hardcoded); fuzzy filter, recent section, shortcut badges; Router/Fallback split preserved. - useGlobalKeyboard.ts: Cmd+K palette, Cmd+I inspector, Cmd+1-0 routes, ? help. Evidence drawer (1B): - evidenceContext.tsx: EvidenceSubject union (turn|proposal|artifact| eval_result|none) + useEvidenceSubject hook + EvidenceProvider above the router Outlet so inspector state persists across route transitions. - RightInspector.tsx: five evidence projections (was a null stub); reuses the Brief 2 primitives (MetadataTable, DigestBadge, Timestamp, badges). - Shell.tsx: visibility driven by inspectorOpen (collapsed by default); no more hardcoded collapsed=true. - KeyboardHelp.tsx: shortcut reference dialog. - TopBar.tsx: palette open state lifted to Shell via props. Tests: evidenceContext + RightInspector specs added; CommandPalette keyboard contract updated for the ten-command navigation set (clamp at both ends). Deferred (noted in spine doc): per-route register()/setSubject call sites, action-commands (run eval / copy hash), resizable inspector width. Verified: tsc -b + vite build green; affected specs pass per-file. |
||
|---|---|---|
| .. | ||
| preview | ||
| public/fonts | ||
| scripts | ||
| src | ||
| .gitignore | ||
| api-schema-snapshot.json | ||
| enum-snapshot.json | ||
| index.html | ||
| package.json | ||
| pnpm-lock.yaml | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
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, ApiErrorBoundarysrc/api/— apiFetch client, TanStack Query hookssrc/types/— TypeScript mirrors of Python schemassrc/routes/— Route placeholder componentssrc/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