Ports the data that arrived with the merge into the rebuilt detail view, so
nothing the API returns is left unrendered and there is one visual language.
- SourceDocument: invoice_pdf was write-only — uploaded, OCR'd, then shown
nowhere. Fetched as a Blob (the endpoint forces an attachment) and rendered
inline via an object URL, revoked on unmount
- AuditTrail: the history as a timeline — actor AI-vs-human, resulting state,
per-activity headline and how long each hop waited
- AiActivity: decisions with status/confidence/model, the model's plan,
reasoning and self-check, escalations, and a per-run trace waterfall with
durations, tokens and cost
- adopts lib/matchSummary for both free-text AI fields: it parses entity
labels our inline version dropped ("PO-3001:", "GR:"), treats
PARTIAL/MISSING as warnings and "Payments: NONE" as neutral, and turns
analysis_so_far into evidence rows instead of a paragraph
- drops the five pre-migration components these replace, plus the TONE_PILL /
TONE_DOT class maps they were the only users of — the last hardcoded
slate/zinc palette in the app. CSS 115.8 -> 98.1 kB
STATE_META stays: keying display metadata off state UUIDs beats matching
served names, and folding it into lib/workflow.ts is the next step.