core/workbench-ui
Shay ebb95a0541 feat(workbench): Vault route — fail-closed epistemic memory evidence (Wave R2)
Replaces VaultRoutePlaceholder with the real route over the R2-B
/vault read substrate (#712).

- TS mirrors VaultSummary/VaultEntry; both removed from NOT_YET_MIRRORED.
  Also fixes a latent ErrorCode drift: adds 'evidence_unavailable' to the
  TS union (present in Python schemas, missing in TS) — the route branches
  on it.
- fail-closed is the design: a missing/unpersisted vault (the 501
  evidence_unavailable signal, or persisted=false / entry_count=0) renders
  the honest absence card as the PRIMARY state, naming the opt-in
  RuntimeConfig.persist_session_state pointer — not a generic error, no
  skeleton theater
- with data: summary strip (entry_count, store_count, reproject_interval,
  max_entries, source_path) + VirtualizedList of entries with
  epistemic_status / epistemic_state pills and versor_digest DigestBadge
- exact-recall doctrine: renders only backend fields; never computes or
  displays a similarity/relevance proxy (runtime recall is exact cga_inner)
- selection publishes the vault_entry subject (inspect-param only, via
  setSubject + setInspectorOpen; EvidenceUrlSync writes ?inspect=vault:N);
  a URL-restored identity-only subject is hydrated once entries load
- Vault row added to routeConformance MOUNT_ROUTES — the fail-closed
  absence asserted as the primary contract
- tests: fail-closed card (not error), summary+entries, no-similarity-score
  doctrine, vault_entry subject publication, j/k spine

Token-only styling (hexScan green).
2026-06-12 21:29:18 -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): Vault route — fail-closed epistemic memory evidence (Wave R2) 2026-06-12 21:29:18 -07:00
.gitignore
api-schema-snapshot.json
enum-snapshot.json
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
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
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