PR: #477: feat(filings): Blake review surface — proposed/accepted/open-question + run banner [Story-1889] by @ankitmaheshwari-com
View PR →
Story-1889

Blake review surface in the Exhibit Register

The Exhibit Register now shows the state of Blake's work. When Blake labels documents in a proceeding, a run banner sits above the register — "Blake labeled N documents · M ready · K open questions" — and each Blake-proposed row is tagged and offered Accept / Revert. Human-confirmed rows carry no review chrome. The state is derived entirely from the synced marking contract (source, agentRunId, lifecycleStatus) — no new fields invented.

What shipped

Three review states from marking data

blakeReviewState(marking) in lib/filings/presentation.ts maps source==='agent' → PROPOSED (awaiting counsel review) and source==='human' → ACCEPTED (human-confirmed). The OPEN-QUESTION state is fully built (tag, amber accent, Answer action) — see the gap below for why no live row reaches it yet.

Blake run banner

BlakeRunBanner renders above the register whenever an agent-sourced marking exists (summarizeBlakeRun returns a summary, else null → no banner). It shows the labeled count, ready count (green), open-question count (amber), and the run id, with whole-run Revert run / Accept N controls.

Per-row controls + accent

A proposed row shows a "Blake proposed" tag, a blue left-edge accent, and Accept / Revert. An accepted row is plain. The tribunal lifecycle column (Marked / Admitted / Rejected) is unchanged and orthogonal — admission is a human-only tribunal act (DR-1), not a review state.

Empty / zero first-run handled

A proceeding with no markings shows the existing empty state — no banner, no phantom controls. A proceeding with only human markings shows the register with no banner (no Blake run). Covered by summarizeBlakeRun tests and the Storybook stories.

Read-only by contract (HR-22) — the gap, not faked

The brief's contract-latitude clause was exercised: the synced contract has no accept / revert write endpoint. Blake's revert lives agent-side (Story-1884); src/gen exposes only the read register and the renumber PATCH (renumber is out of scope here, #1895). So the surface renders the states + controls, but the controls are disabled with a gap note in the title attribute rather than wired to an invented endpoint.

Brief itemStatus
Proposed / accepted row states Live. Derived from source + agentRunId on the real marking view.
Accept / Revert (per-row and whole-run) Rendered, disabled. No accept/revert endpoint in the contract. The affordance ships; the wire lands when the endpoint does.
Open-question state + route to inbox Built, data-gapped. DocumentExhibitMarkingView carries no question signal and there is no inbox route, so no live marking maps to OPEN-QUESTION. The tag + accent + Answer button exist (demonstrated in the banner story); they activate the day Blake's question feed is exposed.
Human-edit-after-Blake conflict (DL-14) Deferred. Requires an edit/version signal not in this read contract; surfaced together with the accept/revert endpoint.

Files

Verify

pnpm lint (0 errors), tsc --noEmit (clean), pnpm build (green), and pnpm test (Blake derivation unit tests + filings suite passing). i18n parity confirmed across en / hi; no raw color literals (status-badge tones + Tailwind palette classes only). No codegen run — types imported from src/gen off current main.

Files changed

9 file(s), +325 / -17 lines

Path Role + -
messages/en.jsonConfig+21-1
messages/hi.jsonConfig+21-1
src/components/matters/filings/blake-run-banner.stories.tsxComponent+43-0
src/components/matters/filings/blake-run-banner.tsxComponent+51-0
src/components/matters/filings/exhibit-register-table.stories.tsxComponent+5-3
src/components/matters/filings/exhibit-register-table.tsxComponent+53-11
src/components/matters/filings/filings-tab.tsxComponent+7-1
src/lib/filings/presentation.test.tsLibrary+56-0
src/lib/filings/presentation.tsLibrary+68-0