From 35d4d975043bac88f181e064cbf7c40aab699662 Mon Sep 17 00:00:00 2001 From: Yashas Date: Thu, 17 Sep 2026 13:46:44 +0530 Subject: [PATCH] fix: re-check verdict comes from the decision, and renders as labelled rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'Within baseline' was re-derived by the console from two rates — a 0% rate on a mostly-pending window read as recovery. The badge now follows the activity Ava chose (Confirm Recovery closes the case; Flag Still Elevated does not), and the four-line re-check summary (since approval / actions / rate / verdict) renders as rows like the review coverage. Co-Authored-By: Claude Fable 5.1 --- src/components/Findings.tsx | 26 ++++++++++++++++++-------- src/format.ts | 5 +++++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/components/Findings.tsx b/src/components/Findings.tsx index e34e4c1..e0b443f 100644 --- a/src/components/Findings.tsx +++ b/src/components/Findings.tsx @@ -95,12 +95,15 @@ export function Verdict({ /** What was covered, as rows of short facts — not a paragraph. Ava writes it * as labelled lines; older cases wrote prose, which falls back to sentence * bullets so nothing renders as a wall of text. */ -function WorkStatement({ text }: { text: string }) { +function WorkStatement({ text, heading = 'Review coverage', bare = false }: { text: string; heading?: string; bare?: boolean }) { const rows = workStatement(text); - const TONE: Record = { FOUND: 'text-warn', WATCHED: 'text-muted', CLEAR: 'text-good', REVIEWED: 'text-ink' }; + const TONE: Record = { + FOUND: 'text-warn', WATCHED: 'text-muted', CLEAR: 'text-good', REVIEWED: 'text-ink', + 'SINCE APPROVAL': 'text-ink', ACTIONS: 'text-ink', RATE: 'text-ink', VERDICT: 'text-warn', + }; return ( -
-

Review coverage

+
+ {heading &&

{heading}

} {rows ? (
{rows.map((r) => ( @@ -269,24 +272,31 @@ export function Recheck({ row }: { row: Row }) { const current = num(row.current_rate); const baseline = num(row.baseline_rate); const recovered = num(row.recovered_amount); - const better = current != null && baseline != null && current - baseline <= 2; + // The verdict is the decision she made, not a rate comparison the console + // re-derives: Confirm Recovery closes the case, Flag Still Elevated sends it + // back for a person. A low rate on a mostly-pending window is not recovery. + const confirmed = str(row.current_state_name) === 'Closed'; return ( {better ? 'Within baseline' : 'Still elevated'}} + actions={{confirmed ? 'Recovery confirmed' : 'Not confirmed'}} >
-

{summary}

+ {workStatement(summary) ? ( + + ) : ( +

{summary}

+ )}
); diff --git a/src/format.ts b/src/format.ts index 6924813..1458dd7 100644 --- a/src/format.ts +++ b/src/format.ts @@ -194,6 +194,11 @@ export const WORK_LABELS: Record = { FOUND: 'Found', WATCHED: 'Watched, below the bar', CLEAR: 'Checked, nothing', + // the re-check + 'SINCE APPROVAL': 'Since approval', + ACTIONS: 'Actions taken', + RATE: 'Denial rate', + VERDICT: 'Verdict', }; export function workStatement(v: unknown): Array<{ key: string; label: string; items: string[] }> | null { const lines = str(v).split(/\n+/).map((l) => l.trim()).filter(Boolean);