diff --git a/src/components/insights/coach-panel/__tests__/message-thread.test.tsx b/src/components/insights/coach-panel/__tests__/message-thread.test.tsx index efa51bc33..443571ed5 100644 --- a/src/components/insights/coach-panel/__tests__/message-thread.test.tsx +++ b/src/components/insights/coach-panel/__tests__/message-thread.test.tsx @@ -304,10 +304,13 @@ describe("", () => { expect(html).toContain('data-slot="coach-evidence-list"'); const rows = (html.match(/data-slot="coach-evidence-row"/g) ?? []).length; expect(rows).toBe(2); - expect(html).toContain("avg7 systolic"); + // v1.4.25 W5 — per-row source labels were dropped. The values + + // units + window framing stay; the redundant `kv.label` prefix + // (e.g. "avg7 systolic:") does not appear. + expect(html).not.toContain("avg7 systolic"); + expect(html).not.toContain("avg30 systolic"); expect(html).toContain("138 mmHg"); expect(html).toContain("(last7days)"); - expect(html).toContain("avg30 systolic"); expect(html).toContain("134 mmHg"); // Disclosure is collapsed by default (no `open` attribute). expect(html).not.toMatch(/]*\bopen\b/); @@ -355,11 +358,11 @@ describe("", () => { ], }; const html = render(); - expect(html).toContain("30-day adherence"); - // No stray empty unit/window markup. - expect(html).not.toMatch( - /30-day adherence:\s*<\/span>\s*]*>\s*]*>\s*96\s*<\/strong>/); }); it("hides the disclosure entirely when keyValues is empty or absent", () => { diff --git a/src/components/insights/coach-panel/message-thread.tsx b/src/components/insights/coach-panel/message-thread.tsx index b73ade936..897029fa3 100644 --- a/src/components/insights/coach-panel/message-thread.tsx +++ b/src/components/insights/coach-panel/message-thread.tsx @@ -427,7 +427,12 @@ function ChatBubble({ data-slot="coach-evidence-row" className="leading-relaxed" > - {kv.label}:{" "} + {/* v1.4.25 W5 — `kv.label` (e.g. "avg7 systolic") + was rendered prefixed to every row, repeating + framing the disclosure heading already gives. + Drop the label and lead with the value; the + window stays as a parenthetical tail so the row + still answers "over what timeframe?". */} {kv.value} {kv.unit ? ` ${kv.unit}` : ""}