From 4c9c0687b5b3da47eb05d2926112660e8467995f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 14 May 2026 13:19:49 +0200 Subject: [PATCH] style(coach): drop redundant per-row source labels in evidence disclosure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each row in "What I'm looking at" / "Worauf bezieht sich das?" was prefixed with `kv.label` — the same framing the disclosure heading already supplies. The label is gone; rows lead with the value + unit and keep the window as a parenthetical tail. --- .../__tests__/message-thread.test.tsx | 17 ++++++++++------- .../insights/coach-panel/message-thread.tsx | 7 ++++++- 2 files changed, 16 insertions(+), 8 deletions(-) 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}` : ""}