From 9f3baf940d90a01369292235f6f02108214080bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 10 May 2026 18:11:16 +0200 Subject: [PATCH] fix(insights): MED-bucket polish across coach + report surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - weekly-report eyebrow chip drops uppercase + tracking-wide for the sentence-case rule the rest of the app follows; print stylesheet now neutralises bg + colour so monochrome output reads clean (Design-M4, Design-L3). - correlation-card "Try a 7-day experiment" CTA flips from default to outline while disabled. Disabled-primary read as "the system is broken right now"; outline reads as "this is on the roadmap" (Design-M7). - coach-drawer settings cog aria-label switches to the coming-soon tooltip copy so SR users hear the same "arrives in v1.4.21" message sighted users see (Design-M9). - sources-rail static "fresh" dot becomes aria-hidden — v1.4.20 has no real freshness state behind it; SR users no longer hear "Fresh" five times in a row (Design-L4). - summariseTitle slices on Unicode code points rather than UTF-16 code units so a user message ending mid-emoji ("🩺") no longer produces a half-character on disk (Code-LOW-04). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../insights/coach-panel/coach-drawer.tsx | 5 ++++- .../insights/coach-panel/sources-rail.tsx | 9 ++++++--- src/components/insights/correlation-card.tsx | 6 +++++- src/components/insights/weekly-report-view.tsx | 2 +- src/lib/ai/coach/persistence.ts | 15 ++++++++++----- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/components/insights/coach-panel/coach-drawer.tsx b/src/components/insights/coach-panel/coach-drawer.tsx index e993579f6..1db449ce7 100644 --- a/src/components/insights/coach-panel/coach-drawer.tsx +++ b/src/components/insights/coach-panel/coach-drawer.tsx @@ -186,7 +186,10 @@ export function CoachDrawer({ variant="ghost" size="icon" disabled - aria-label={t("insights.coach.settings")} + // Match the visible disabled state — sighted users + // see a coming-soon tooltip; SR users hear the same + // copy instead of a working "Coach settings" label. + aria-label={t("insights.coach.settingsTooltip")} data-slot="coach-drawer-settings" className="size-8" > diff --git a/src/components/insights/coach-panel/sources-rail.tsx b/src/components/insights/coach-panel/sources-rail.tsx index 20bbaa090..27e13e4b4 100644 --- a/src/components/insights/coach-panel/sources-rail.tsx +++ b/src/components/insights/coach-panel/sources-rail.tsx @@ -98,10 +98,13 @@ export function SourcesRail({ className }: SourcesRailProps) { {t(row.metricKey)} - {/* Fresh / stale indicator — v1.4.20 is a static dot. - v1.4.21 will reuse . */} + {/* Fresh / stale indicator — v1.4.20 is a static dot + with no real freshness state behind it (v1.4.21 plugs + in ). aria-hidden so SR users + don't hear "Fresh" five times in a row for what is + actually a placeholder. */}