Repository navigation
Phase 8: Savile Row Clearance Console - #9
Conversation
A custom-branded UI for the release officer, driving the same TrueForge server and sessions as the bundled UI (which remains the documented fallback — no new backend exists). - Scaffold: Vite + React 19, TrueForgeUI with server type 'trueforge' proxied same-origin; dark Savile Row theme as oklch semantic tokens. - Custom three-column layout: sessions, conversation, and an evidence rail showing mission, contract verdict, hashes, and ledger/receipt state — parsed exclusively from the vault's tool responses in the current thread, never computed client-side. - ToolApprovalBar override: the release_result approval renders the full human-approved tuple (purpose, audience, columns, suppressed cells, contract and output hashes) read from the pending tool call, then delegates the decision to the stock bar so approve/deny semantics stay the runtime's. - AskUserPrompt framed as the mission checkpoint, AgentStepsCard restyled, and SubAgentCard rendered as a policy violation banner because this deployment disables subagents. - zustand pinned to v5 at the app level to resolve the @assistant-ui (v5) vs @openuidev (v4) hoisting conflict that broke the build. AI-assisted (Claude Code); reviewed and understood by the author.
|
/review |
PR Summary by QodoAdd Savile Row clearance workflow console
AI Description
Diagram
High-Level Assessment
Files changed (14)
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
🟡 Changes recommended
There are a few concrete UI logic/data-extraction issues (stage labeling for denied vs needs_review, loss of denial detail, and potential “undefined” hash rendering) that should be corrected before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new console/ Vite + React app that provides a custom-branded “Clearance Console” UI for the Need-to-Know release workflow, reusing the existing TrueForge server/sessions (no new backend) and presenting “evidence” derived from vault tool responses.
Changes:
- Introduces a standalone Vite/React console app with TrueForgeUI layout and component overrides.
- Adds an evidence rail and “release approval hero” UI derived from tool-call parts in the current thread.
- Documents local run steps and fallback to the bundled TrueForge UI.
File summaries
| File | Description |
|---|---|
| console/vite.config.ts | Vite dev-server configuration, including /api proxy to TrueForge base URL. |
| console/tsconfig.json | Strict TypeScript configuration for the console project. |
| console/src/theme.ts | Savile Row dark theme tokens for TrueForge UI theming. |
| console/src/overrides.tsx | UI slot overrides (approval bar, ask-user prompt framing, steps styling, subagent warning). |
| console/src/main.tsx | React root bootstrapping and global style imports. |
| console/src/Layout.tsx | Three-column layout (sessions, thread, evidence rail). |
| console/src/EvidenceRail.tsx | Evidence rail rendering and stage badge logic derived from extracted evidence. |
| console/src/evidence.ts | Parses vault tool responses/tool-call args to derive evidence and pending approval tuple. |
| console/src/console.css | Console-specific CSS for shell layout, rail, and override framing. |
| console/src/App.tsx | TrueForgeUI wiring: server config, theme, layout, and overrides. |
| console/README.md | Console run instructions and fallback guidance. |
| console/package.json | Console dependencies and build scripts (Vite build + tsc --noEmit). |
| console/index.html | Console HTML entrypoint mounting #root. |
Review details
- Files reviewed: 13/14 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Review round fixes: a denied mission (prepare_analysis error) now sets the rail's denial code and finding codes instead of leaving the stage on NO MISSION; a contract verdict of denied shows DENIED rather than HELD (needs_review keeps HELD); release denials keep their detail code alongside the error; and the approval tuple renders the placeholder for a missing hash instead of the string "undefined". AI-assisted (Claude Code); reviewed and understood by the author.
- The release approval hero now reads the tuple from the tool-call part it renders inside (argsText), so the displayed values are bound to the exact call being approved and can never show another call's tuple. Hashes render in full — an approval surface should show what the human is approving, not an abbreviation. - Denials are recorded across all five vault tools, and the evidence rail derives its snapshot behind a primitive revision selector so the external-store snapshot contract holds without re-render loops. - A subagent card renders as a policy-violation alert only: this deployment disables subagents, so there is nothing to render politely. - Dependencies are pinned exactly with npm overrides plus vite dedupe, forcing a single copy of @assistant-ui/* and zustand 5.0.14 across the tree (openuidev's zustand imports are all present in v5). AI-assisted (Claude Code); reviewed and understood by the author.
|
/review |
|
Code review by qodo was updated up to the latest commit 5df2d68 |
A preparation — success or denial — now resets the rail's evidence before recording its own outcome, and validation, release, and chart evidence only binds when its queryId matches the current preparation. Previously a receipt, verdict, or chart flag from an earlier query survived a new prepare_analysis, so the rail could label a new, unreleased query RELEASED or mask a fresh mission denial with a stale receipt. Verified against synthetic threads using the real handler payload shapes: new-prepare reset, denial-after-release, cross-query attribution, and the unchanged normal flow. AI-assisted (Claude Code); reviewed and understood by the author.
There was a problem hiding this comment.
🔵 Needs a closer look
It is a substantial new frontend whose end-to-end runtime behavior is unverified by the author's own note (the demo walkthrough is a pending exit check) and whose logic-heavy evidence parsing has no automated tests, so final human review is warranted.
Review details
- Files reviewed: 13/14 changed files
- Comments generated: 0 new
- Review effort level: Balanced
The console's evidence extraction is its one piece of logic-heavy client code; the console workspace deliberately has no test runner, so the root suite covers it with payload shapes mirroring the vault handlers exactly: the normal flow, new-preparation reset, denial unmasking after a release, cross-query attribution, denial detail, and the MCP text-envelope result form. Bringing the file under the root compiler also caught a strictness gap (optional columns assignment under exactOptionalPropertyTypes), fixed here. AI-assisted (Claude Code); reviewed and understood by the author.
Adopts the reviewer-authored ledger tests that were left uncommitted: corrupt-index refusal without rewriting, orphan attempt-directory collision, and failed-child banking. The collision case is updated to the deliberate record-first design — the pending record lands before the directory is created, so a collision fails loud, stays in the denominator, and the next invocation numbers past the orphan directory instead of wedging on it. AI-assisted (Claude Code); reviewed and understood by the author.
The Savile Row Clearance Console: a custom-branded TrueForge UI (
@truefoundry/trueforge-ui@0.2.4) that renders the release officer's work as the clearance workflow it is. It adds no backend — the console drives the same TrueForge server and sessions as the bundled UI, which remains the documented fallback.What it adds (
console/)TrueForgeUIwithserver={{type:'trueforge'}}proxied same-origin (/api→ the harness), dark Savile Row theme expressed as oklch semantic tokens.ToolApprovalBaroverride — therelease_resultapproval renders the full human-approved tuple (purpose, audience, columns, suppressed cells, queryId, contract and output hashes) read from the pending tool call itself, then delegates the actual decision to the stock bar so approve/deny semantics stay exactly the runtime's.AskUserPrompt/AgentStepsCard/SubAgentCardoverrides — the question pause is framed as the mission checkpoint, the steps trail is restyled, and a subagent card renders as a policy-violation banner because this deployment disables subagents (root-only enforcement).console/README.md: if the console is down, the bundled UI on the TrueForge base URL runs identical sessions against the same server.Notes
zustandis pinned to v5 at the app level to resolve the@assistant-ui(needs v5) vs@openuidev(needs v4) hoisting conflict that broke the production build; v4 stays nested under the openui packages.vite buildpasses, and the dev server serves with the/apiproxy reaching a live TrueForge (agent list confirmed through the proxy). The visual walkthrough of the full demo flow in the console (audience question → clearance card → approval hero → receipt + chart + evidence rail) is the remaining Phase 8 exit check and will be recorded before merge.AI-assisted (Claude Code); reviewed and understood by the author.