From 75380d5f39342616424e97c01546375957959c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 31 May 2026 22:33:36 +0200 Subject: [PATCH] fix(insights): lift explainer popover body to 12px + correct target-summary doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two small polish items on the insights category surface. The desktop explainer popover body rendered at 11px while the mobile sheet used the larger `text-sm`, an uncomfortable and asymmetric read. Lift the popover body to `text-xs` (12px) so both surfaces sit on the type scale. The `MetricTargetSummary` docstring claimed both the range and the in-target share are hidden when the route flags `insufficientData`. The range stays visible — only the share is suppressed. Correct the comment to match the code. --- src/components/insights/metric-explainer.tsx | 2 +- src/components/insights/metric-target-summary.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/insights/metric-explainer.tsx b/src/components/insights/metric-explainer.tsx index 2d0327d56..6f9ba4630 100644 --- a/src/components/insights/metric-explainer.tsx +++ b/src/components/insights/metric-explainer.tsx @@ -113,7 +113,7 @@ export function MetricExplainer({ metric, className }: MetricExplainerProps) {

{body}

diff --git a/src/components/insights/metric-target-summary.tsx b/src/components/insights/metric-target-summary.tsx index d1b5fe0bb..b2733a0a8 100644 --- a/src/components/insights/metric-target-summary.tsx +++ b/src/components/insights/metric-target-summary.tsx @@ -29,9 +29,10 @@ import { Card, CardContent } from "@/components/ui/card"; * * The "in target" share reads `daysInRange30d / daysLogged30d` — the * fraction of logged days over the last 30 whose mean reading landed in - * the green band. We hide the share (and the range) entirely when the - * route flags `insufficientData`, matching the `/targets` consistency - * strip so the two surfaces never disagree. + * the green band. We hide the share alone when the route flags + * `insufficientData`; the range stays visible so the band is always + * legible. This matches the `/targets` consistency strip so the two + * surfaces never disagree. * * A discreet "Adjust target range" link routes to `/targets`, which * stays the canonical place to view / tune the bands.