core/workbench-ui/src/app/LeftNav.tsx
Shay 138f95a2b0 feat(workbench): Calibration route — the gold-tether arena made visible (Wave M B2)
Consumes the B1 readers (#724). The route where you SEE 'the engine earns
the right to guess' (ADR-0175).

- list (failures-first, server-ordered): per class a reliability bar
  (Wilson floor vs the PROPOSE/SERVE θ markers — a class earns the right
  when its fill crosses the marker), correct/refused/wrong counts (wrong in
  the contradicted token), and a verdict pill (earned SERVE / earned
  PROPOSE / not yet licensed)
- serving strip: the discipline's RESULT — live correct/refused/wrong per
  lane, wrong=0 in the verified token, with source DigestBadges
- detail (Panel + TabBar): Counts / License math / Raw. The License-math
  tab shows the honest derivation (measured ≥ θ → licensed) and states
  the numbers come from core.reliability_gate, not the workbench
- fail-closed: an empty/absent arena ledger (501 evidence_unavailable)
  renders the honest absence card pointing at the practice lane, not an
  error
- nav entry (12th) + routeConformance row + Shell nav assertion updated

Token-only (hexScan green); VirtualizedList + j/k; full vitest 398 green.
2026-06-13 01:00:16 -07:00

43 lines
1.5 KiB
TypeScript

import { NavLink } from "react-router-dom";
const NAV_ITEMS = [
{ label: "Chat", to: "/chat" },
{ label: "Trace", to: "/trace" },
{ label: "Replay", to: "/replay" },
{ label: "Demos", to: "/demos" },
{ label: "Proposals", to: "/proposals" },
{ label: "Evals", to: "/evals" },
{ label: "Calibration", to: "/calibration" },
{ label: "Runs", to: "/runs" },
{ label: "Packs", to: "/packs" },
{ label: "Vault", to: "/vault" },
{ label: "Audit", to: "/audit" },
{ label: "Settings", to: "/settings" },
] as const;
export function LeftNav() {
return (
<nav
data-region="leftnav"
className="flex h-full flex-col gap-1 overflow-y-auto border-r border-[var(--color-border-subtle)] bg-[var(--color-surface-base)] p-2"
aria-label="Main navigation"
>
{NAV_ITEMS.map((item) => (
<NavLink
key={item.to}
to={item.to}
className={({ isActive }) =>
[
"block rounded px-3 py-2 text-sm transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)]",
isActive
? "border-l-2 border-[var(--color-focus-ring)] pl-[10px] text-[var(--color-text-primary)] bg-[var(--color-surface-raised)]"
: "border-l-2 border-transparent pl-[10px] text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-surface-raised)]",
].join(" ")
}
>
{item.label}
</NavLink>
))}
</nav>
);
}