From e0d4d809dd40d071bc44811506474f592ea3c4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 18 Jun 2026 19:17:36 +0200 Subject: [PATCH] feat(glucose): cross-link the clinical panel to Labs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Glucose has three front doors — measurements/CGM as readings over time, the clinical panel as derived TIR/GMI/estimated-A1c, and Labs as dated panel results — with no signpost between them. The clinical panel now carries a one-line cross-link clarifying that a blood-draw HbA1c or fasting glucose belongs in Labs, so the spot-estimate view and the lab-result view reference each other instead of competing. Adds insights.bloodGlucose.clinical.labsLink across all six locales. --- messages/de.json | 1 + messages/en.json | 1 + messages/es.json | 1 + messages/fr.json | 1 + messages/it.json | 1 + messages/pl.json | 1 + .../glucose/glucose-clinical-panel.tsx | 29 ++++++++++++++++++- 7 files changed, 34 insertions(+), 1 deletion(-) diff --git a/messages/de.json b/messages/de.json index 6f1f0195d..21ee4c4f2 100644 --- a/messages/de.json +++ b/messages/de.json @@ -2713,6 +2713,7 @@ "title": "Glukose-Überblick", "subtitle": "Ein Blick auf deine letzten {days} Tage, aus {count} Messungen.", "spotCaveat": "Das sind Schätzungen aus einzelnen Stichproben-Messungen, kein Profil eines kontinuierlichen Sensors – lies sie als Richtung, nicht als klinisches Urteil.", + "labsLink": "Laborergebnisse? HbA1c und Nüchternglukose aus einer Blutabnahme trägst du unter Labor ein.", "learningTitle": "Lerne deine Glukose noch kennen", "learningBody": "Bisher sind das {count} über {days}. Mit etwas mehr Verlauf wird das Bild klarer – mess weiter oder lass es ein verbundenes Gerät ergänzen.", "learningBodyEmpty": "Sobald ein paar Messungen vorliegen – von dir erfasst oder von einem Gerät synchronisiert – nehmen Zeit-im-Zielbereich, Durchschnitt und Schwankung hier Gestalt an.", diff --git a/messages/en.json b/messages/en.json index 22cd11dae..e91951fe9 100644 --- a/messages/en.json +++ b/messages/en.json @@ -2713,6 +2713,7 @@ "title": "Glucose overview", "subtitle": "A read on your last {days} days, from {count} readings.", "spotCaveat": "These are spot-reading estimates from individual measurements, not a continuous-monitor profile — read them as a direction of travel rather than a clinical verdict.", + "labsLink": "Lab results? Log a blood-draw HbA1c or fasting glucose under Labs.", "learningTitle": "Still learning your glucose", "learningBody": "So far that's {count} over {days}. A little more history and a fuller picture comes into focus — keep logging, or let a connected device fill it in.", "learningBodyEmpty": "Once a handful of readings come in — logged by you or synced from a device — your time-in-range, average, and variability take shape here.", diff --git a/messages/es.json b/messages/es.json index eeda31fe0..6f2928108 100644 --- a/messages/es.json +++ b/messages/es.json @@ -2713,6 +2713,7 @@ "title": "Resumen de glucosa", "subtitle": "Una lectura de tus últimos {days} días, a partir de {count} mediciones.", "spotCaveat": "Son estimaciones a partir de mediciones puntuales, no un perfil de un sensor continuo: léelas como una tendencia, no como un veredicto clínico.", + "labsLink": "¿Resultados de laboratorio? Registra una HbA1c o glucosa en ayunas de una analítica en Laboratorio.", "learningTitle": "Aún conociendo tu glucosa", "learningBody": "De momento son {count} en {days}. Con algo más de historial el panorama se aclara: sigue registrando o deja que lo complete un dispositivo conectado.", "learningBodyEmpty": "En cuanto lleguen unas cuantas mediciones —registradas por ti o sincronizadas desde un dispositivo— tu tiempo en rango, promedio y variabilidad tomarán forma aquí.", diff --git a/messages/fr.json b/messages/fr.json index 91ec14d05..d2a4076fe 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -2713,6 +2713,7 @@ "title": "Aperçu du glucose", "subtitle": "Un point sur vos {days} derniers jours, à partir de {count} mesures.", "spotCaveat": "Ce sont des estimations issues de mesures ponctuelles, pas le profil d’un capteur continu : lisez-les comme une tendance, non comme un verdict clinique.", + "labsLink": "Résultats de laboratoire ? Saisis une HbA1c ou une glycémie à jeun issue d'une prise de sang dans Laboratoire.", "learningTitle": "Votre glucose se découvre encore", "learningBody": "Pour l’instant, cela fait {count} sur {days}. Avec un peu plus d’historique, le tableau se précise : continuez à enregistrer ou laissez un appareil connecté compléter.", "learningBodyEmpty": "Dès que quelques mesures arrivent — saisies par vous ou synchronisées depuis un appareil — votre temps dans la cible, votre moyenne et votre variabilité prennent forme ici.", diff --git a/messages/it.json b/messages/it.json index 83ca7fdb9..8873b3ec7 100644 --- a/messages/it.json +++ b/messages/it.json @@ -2713,6 +2713,7 @@ "title": "Panoramica della glicemia", "subtitle": "Una lettura dei tuoi ultimi {days} giorni, da {count} misurazioni.", "spotCaveat": "Sono stime da singole misurazioni puntuali, non il profilo di un sensore continuo: leggile come una tendenza, non come un verdetto clinico.", + "labsLink": "Risultati di laboratorio? Registra una HbA1c o la glicemia a digiuno da un prelievo in Laboratorio.", "learningTitle": "Stiamo ancora imparando la tua glicemia", "learningBody": "Per ora sono {count} su {days}. Con un po’ più di storico il quadro si chiarisce: continua a registrare o lascia che lo completi un dispositivo connesso.", "learningBodyEmpty": "Appena arrivano alcune misurazioni — registrate da te o sincronizzate da un dispositivo — il tempo nel range, la media e la variabilità prendono forma qui.", diff --git a/messages/pl.json b/messages/pl.json index 4916f3dc7..0f4eb78f3 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -2713,6 +2713,7 @@ "title": "Przegląd glukozy", "subtitle": "Spojrzenie na ostatnie {days} dni, na podstawie {count} pomiarów.", "spotCaveat": "To szacunki z pojedynczych pomiarów punktowych, a nie profil z czujnika ciągłego — traktuj je jako kierunek, nie jako diagnozę.", + "labsLink": "Wyniki laboratoryjne? HbA1c lub glukozę na czczo z pobrania krwi zapisz w sekcji Laboratorium.", "learningTitle": "Wciąż poznajemy Twoją glukozę", "learningBody": "Na razie to {count} w ciągu {days}. Przy nieco dłuższej historii obraz się wyostrza — rejestruj dalej lub pozwól uzupełnić to podłączonemu urządzeniu.", "learningBodyEmpty": "Gdy pojawi się kilka pomiarów — wpisanych przez Ciebie lub zsynchronizowanych z urządzenia — czas w zakresie, średnia i zmienność nabiorą tu kształtu.", diff --git a/src/components/insights/glucose/glucose-clinical-panel.tsx b/src/components/insights/glucose/glucose-clinical-panel.tsx index 144447eff..3e233c593 100644 --- a/src/components/insights/glucose/glucose-clinical-panel.tsx +++ b/src/components/insights/glucose/glucose-clinical-panel.tsx @@ -1,6 +1,7 @@ "use client"; -import { Activity, Droplet, TrendingUp } from "lucide-react"; +import Link from "next/link"; +import { Activity, Droplet, FlaskConical, TrendingUp } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; @@ -113,6 +114,9 @@ export function GlucoseClinicalPanel() { } caveat={t("insights.bloodGlucose.clinical.spotCaveat")} /> +
+ +
); @@ -225,11 +229,34 @@ export function GlucoseClinicalPanel() { byContext={byContext} /> ) : null} + + ); } +/** + * v1.18.6 — signpost the measurement-vs-lab mental model. This panel + * estimates A1c / GMI from spot or CGM readings over time; a lab-ordered + * HbA1c or fasting-glucose result is a dated panel value that lives under + * Labs. The cross-link keeps the two surfaces referencing each other so a + * user knows which door to use rather than treating them as rivals. + */ +function LabsCrossLink() { + const { t } = useTranslations(); + return ( + +