Follow-up to #749, which deliberately scoped TruncatedCell to the non-virtualized columnar tables and left trace edges + single-column selection rails as-is. Wire it into those too so every truncated data cell in the workbench has the same full-content reveal (popover + copy + modal-for-long). Component: - Add `align` prop ("start" | "end"). `end` hugs the right edge and right-justifies the display, for right-aligned columns like the trace `to_stage` cell. Defaults to "start" (unchanged). Wiring: - Trace propagation edges: from_stage / to_stage (to_stage align=end). - Trace pipeline stage rail: stage label + summary. - Trace turns rail: prompt + surface excerpts. - Runs rail: session_id. Replay rail: prompt excerpt. Packs rail: pack_id. CORE-Logos pack rail: pack_id. Logos alignment rail: edge (rich source→target display, plain-text value for copy/reveal). - Contemplation run rail: run_id; stage-evidence ids. - Demos rail: title; scenario trace hash. - Proposal detail: replay-equivalence hash, evidence hashes; proposal chain provenance. Two row elements that were real <button>s (trace stage rail, contemplation run row) are converted to <div role="button"> with an Enter/Space onKeyDown handler — the codebase's established selectable-row pattern (ProposalTable, RowShell) — so nesting TruncatedCell's button trigger is valid HTML rather than a button-in-button. Intentionally left as-is (documented): - RunsRoute TurnRefRow is an <a>/<Link> row; nesting an interactive trigger inside an anchor is invalid HTML. The surface excerpt is reachable by following the link. - Digests everywhere keep DigestBadge (already copy + full-value title). - Section headings (e.g. the trace stage-detail <h3>) are not data cells. Evidence: workbench-ui `pnpm build` (tsc -b) green; full vitest suite 535 passed / 60 files, incl. a new align assertion on TruncatedCell. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| e2e | ||
| preview | ||
| public/fonts | ||
| scripts | ||
| src | ||
| .gitignore | ||
| api-schema-snapshot.json | ||
| enum-snapshot.json | ||
| index.html | ||
| package.json | ||
| playwright.config.ts | ||
| pnpm-lock.yaml | ||
| postcss.config.js | ||
| README.md | ||
| schema-snapshot.json | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
CORE Workbench UI
React/Vite/TypeScript frontend for CORE Workbench — a local operator/auditor UI
over the deterministic engine. 14 registry-driven routes (src/app/routes.ts):
chat; trace (per-turn pipeline / field-invariant / leeway / evidence-bundle
tabs); the guided determinism tour; replay (hash-to-hash); demos; proposals +
HITL ratification; evals (wrong=0 ledger); calibration (gold-tether arena);
runs; vault; packs; and audit. Read-only, with allowlisted execution only.
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, and the route surfaces insrc/app/<route>/.src/app/routes.tsis the single route registry (feeds App, LeftNav, command palette, shortcuts, and conformance).src/api/— apiFetch client, TanStack Query hookssrc/types/— TypeScript mirrors of Python schemas (src/types/api.ts)src/routes/— the Chat route entrysrc/design/— design-system substrate (tokens, primitives, doctrine gates)
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