core/workbench-ui
Shay 8303c3c51e fix(workbench): DAG natural-height fit for dense graphs + consistent click-to-copy feedback
Two UX wrinkles surfaced while exercising the CORE-Logos Studio:

- DAG viewport: tall, few-layer graphs (e.g. the 408x1890, 2-layer/55-node
  alignment fan) were squished by viewBox-meet into an unreadable sliver. Render
  at natural height (scale ~1) inside a bounded, scrollable box; small graphs are
  unaffected (>= the caller height). Golden layout unchanged (layoutDag untouched).
- Click-to-copy: new shared useCopyToClipboard hook gives every copy affordance a
  tooltip + transient confirmation. StatusFooter SHA now confirms 'Copied' (was a
  silent copy that read as 'does nothing'); 'Read Only' is labeled a non-interactive
  status (not a toggle); checkpoint-revision gains an explanatory tooltip.
  DigestBadge + MetadataTable copy buttons route through the hook + gain titles.

Full workbench-ui vitest: 520 passed (+4), clean exit; tsc + build clean.
2026-06-14 13:31:43 -07:00
..
e2e test(workbench): playwright smoke lane (ADR-0162 acceptance 5-7) 2026-06-12 12:05:28 -07:00
preview feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295) 2026-05-26 11:33:27 -07:00
public/fonts feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295) 2026-05-26 11:33:27 -07:00
scripts feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295) 2026-05-26 11:33:27 -07:00
src fix(workbench): DAG natural-height fit for dense graphs + consistent click-to-copy feedback 2026-06-14 13:31:43 -07:00
.gitignore feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295) 2026-05-26 11:33:27 -07:00
api-schema-snapshot.json feat(workbench): Wave M Phase C legibility — pipeline record, contemplation, identity continuity 2026-06-13 15:44:31 -07:00
enum-snapshot.json feat(workbench): CORE-Logos Studio LG-2 — /logos route shell + Overview/Identity/Safety 2026-06-14 12:12:47 -07:00
index.html feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295) 2026-05-26 11:33:27 -07:00
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 feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295) 2026-05-26 11:33:27 -07:00
README.md docs(workbench): refresh READMEs to shipped reality (index + surfaces) 2026-06-13 20:37:29 -07:00
schema-snapshot.json feat(workbench): add read-only core-logos readers 2026-06-14 11:43:39 -07:00
tailwind.config.ts feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295) 2026-05-26 11:33:27 -07:00
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 feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295) 2026-05-26 11:33:27 -07:00
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/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 in src/app/<route>/. src/app/routes.ts is the single route registry (feeds App, LeftNav, command palette, shortcuts, and conformance).
  • src/api/ — apiFetch client, TanStack Query hooks
  • src/types/ — TypeScript mirrors of Python schemas (src/types/api.ts)
  • src/routes/ — the Chat route entry
  • src/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