From adb7892b97800bd4307e3e8792e2609946119ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 28 Jun 2026 21:39:40 +0200 Subject: [PATCH] fix(ui): drop the repeated inline disclaimers from medication, insights, and labs The layered self-description standard already carries the canonical intended-purpose line, the Coach standing note, the emergency note and the data-posture note. The medication, insights and labs surfaces each repeated a further context-specific disclaimer footer that added noise without adding meaning. Remove the three rendered footers and retire the now-unused `insights` / `labs` / `medications` disclaimer variants from the shared component (type, key map and doc). Drop the orphaned selfDescription keys from all six locale bundles so call-site and reverse i18n coverage stay in parity. --- messages/de.json | 3 --- messages/en.json | 3 --- messages/es.json | 3 --- messages/fr.json | 3 --- messages/it.json | 3 --- messages/pl.json | 3 --- src/app/labs/page.tsx | 6 ------ src/app/medications/page.tsx | 7 ------- src/components/common/medical-disclaimer.tsx | 14 +------------- src/components/insights/insights-layout-shell.tsx | 9 --------- 10 files changed, 1 insertion(+), 53 deletions(-) diff --git a/messages/de.json b/messages/de.json index a90fecd6a..c2171a49b 100644 --- a/messages/de.json +++ b/messages/de.json @@ -7855,9 +7855,6 @@ "selfDescription": { "intendedPurpose": "HealthLog ist ein persönliches Werkzeug zur Gesundheitsdokumentation und zum Wohlbefinden. Es hilft dir, deine eigenen Gesundheitsdaten zu erfassen, zu visualisieren und zu exportieren. Es diagnostiziert, behandelt, heilt oder verhindert keine Krankheit und ist kein Medizinprodukt.", "coach": "Der Coach arbeitet mit deinen eigenen erfassten Daten. Er ist kein Arzt und gibt keine medizinische Beratung — für Diagnose oder Behandlung wende dich an medizinisches Fachpersonal.", - "insights": "Das sind beschreibende Muster aus deinen eigenen erfassten Daten, keine klinische Beurteilung und keine Diagnose.", - "labs": "Das sind deine eigenen Aufzeichnungen, keine medizinische Diagnose. Referenzbereiche unterscheiden sich je nach Labor und Person — nur deine Ärztin oder dein Arzt kann sie für dich einordnen.", - "medications": "Das erfasst die von dir dokumentierten Medikamente und deine eigene Einnahmetreue. Es beurteilt weder Dosierung noch Wechselwirkungen und ist keine medizinische Beratung — kläre das mit Apotheke oder Arztpraxis.", "emergency": "Falls das ein Notfall sein könnte, wende dich jetzt an deine örtliche Notrufnummer oder an eine ärztliche Stelle. HealthLog kann im Notfall nicht helfen.", "dataPosture": "HealthLog wird selbst gehostet: Deine Gesundheitsdaten bleiben auf deiner eigenen Instanz und sind im Ruhezustand verschlüsselt. KI-Funktionen nutzen einen von dir mitgebrachten Anbieter-Schlüssel oder ein lokales Modell — nichts verlässt deine Instanz über den von dir konfigurierten Anbieter hinaus, und es gibt keine Drittanbieter-Analyse deiner Gesundheitsdaten." } diff --git a/messages/en.json b/messages/en.json index 511493b1c..ac0dad74e 100644 --- a/messages/en.json +++ b/messages/en.json @@ -7855,9 +7855,6 @@ "selfDescription": { "intendedPurpose": "HealthLog is a personal health record-keeping and wellness tool. It helps you log, visualise, and export your own health data. It does not diagnose, treat, cure, or prevent any disease, and it is not a medical device.", "coach": "The Coach works from your own logged data. It isn't a doctor and doesn't give medical advice — for diagnosis or treatment, talk to a healthcare professional.", - "insights": "These are descriptive patterns computed from your own logged data, not a clinical assessment or diagnosis.", - "labs": "These are your own records, not a medical diagnosis. Reference ranges vary by lab and person — only your clinician can interpret them for you.", - "medications": "This tracks the medications you log and your own adherence. It doesn't assess dosing or interactions and isn't medical advice — confirm those with a pharmacist or doctor.", "emergency": "If this might be an emergency, contact your local emergency number or a clinician now. HealthLog can't help in an emergency.", "dataPosture": "HealthLog is self-hosted: your health data stays on your own instance, encrypted at rest. AI features use a provider key you bring or a local model, so nothing leaves your instance beyond the provider you configure, and there is no third-party analytics on your health data." } diff --git a/messages/es.json b/messages/es.json index 298329f0c..a73b565b1 100644 --- a/messages/es.json +++ b/messages/es.json @@ -7855,9 +7855,6 @@ "selfDescription": { "intendedPurpose": "HealthLog es una herramienta personal de registro de salud y bienestar. Te ayuda a registrar, visualizar y exportar tus propios datos de salud. No diagnostica, trata, cura ni previene ninguna enfermedad, y no es un producto sanitario.", "coach": "El Coach trabaja con tus propios datos registrados. No es un médico y no da consejo médico: para un diagnóstico o tratamiento, consulta a un profesional sanitario.", - "insights": "Son patrones descriptivos calculados a partir de tus propios datos registrados, no una evaluación clínica ni un diagnóstico.", - "labs": "Son tus propios registros, no un diagnóstico médico. Los rangos de referencia varían según el laboratorio y la persona: solo tu médico puede interpretarlos por ti.", - "medications": "Esto registra los medicamentos que anotas y tu propia adherencia. No evalúa dosis ni interacciones y no es consejo médico: confírmalo con tu farmacéutico o médico.", "emergency": "Si esto pudiera ser una emergencia, llama ahora a tu número de emergencias local o a un profesional sanitario. HealthLog no puede ayudar en una emergencia.", "dataPosture": "HealthLog es autoalojado: tus datos de salud permanecen en tu propia instancia, cifrados en reposo. Las funciones de IA usan una clave de proveedor que tú aportas o un modelo local, así que nada sale de tu instancia más allá del proveedor que configures, y no hay analítica de terceros sobre tus datos de salud." } diff --git a/messages/fr.json b/messages/fr.json index ae54eb4e2..955be80d4 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -7855,9 +7855,6 @@ "selfDescription": { "intendedPurpose": "HealthLog est un outil personnel de suivi de santé et de bien-être. Il vous aide à enregistrer, visualiser et exporter vos propres données de santé. Il ne diagnostique, ne traite, ne guérit ni ne prévient aucune maladie, et n'est pas un dispositif médical.", "coach": "Le Coach s'appuie sur vos propres données enregistrées. Ce n'est pas un médecin et il ne donne pas de conseil médical : pour un diagnostic ou un traitement, consultez un professionnel de santé.", - "insights": "Ce sont des tendances descriptives calculées à partir de vos propres données enregistrées, pas une évaluation clinique ni un diagnostic.", - "labs": "Ce sont vos propres relevés, pas un diagnostic médical. Les valeurs de référence varient selon le laboratoire et la personne : seul votre médecin peut les interpréter pour vous.", - "medications": "Ceci suit les médicaments que vous enregistrez et votre propre observance. Cela n'évalue ni les doses ni les interactions et n'est pas un conseil médical : confirmez-les avec votre pharmacien ou votre médecin.", "emergency": "Si cela pourrait être une urgence, contactez maintenant votre numéro d'urgence local ou un professionnel de santé. HealthLog ne peut pas aider en cas d'urgence.", "dataPosture": "HealthLog est auto-hébergé : vos données de santé restent sur votre propre instance, chiffrées au repos. Les fonctions d'IA utilisent une clé de fournisseur que vous apportez ou un modèle local, donc rien ne quitte votre instance au-delà du fournisseur que vous configurez, et il n'y a aucune analyse tierce de vos données de santé." } diff --git a/messages/it.json b/messages/it.json index 7d47c79f9..4a697d6c8 100644 --- a/messages/it.json +++ b/messages/it.json @@ -7855,9 +7855,6 @@ "selfDescription": { "intendedPurpose": "HealthLog è uno strumento personale per la registrazione della salute e il benessere. Ti aiuta a registrare, visualizzare ed esportare i tuoi dati di salute. Non diagnostica, cura, guarisce né previene alcuna malattia e non è un dispositivo medico.", "coach": "Il Coach lavora sui tuoi dati registrati. Non è un medico e non fornisce consigli medici: per una diagnosi o una terapia rivolgiti a un professionista sanitario.", - "insights": "Sono andamenti descrittivi calcolati dai tuoi dati registrati, non una valutazione clinica né una diagnosi.", - "labs": "Sono i tuoi referti, non una diagnosi medica. Gli intervalli di riferimento variano da laboratorio a persona: solo il tuo medico può interpretarli per te.", - "medications": "Questo registra i farmaci che annoti e la tua aderenza. Non valuta dosaggi o interazioni e non è un consiglio medico: confermali con il farmacista o il medico.", "emergency": "Se potrebbe trattarsi di un'emergenza, contatta subito il numero di emergenza locale o un medico. HealthLog non può aiutare in caso di emergenza.", "dataPosture": "HealthLog è self-hosted: i tuoi dati di salute restano sulla tua istanza, cifrati a riposo. Le funzioni di IA usano una chiave del provider che fornisci tu o un modello locale, quindi nulla lascia la tua istanza oltre il provider che configuri, e non c'è alcuna analisi di terze parti sui tuoi dati di salute." } diff --git a/messages/pl.json b/messages/pl.json index 6e0a5ce53..1ba29bb61 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -7855,9 +7855,6 @@ "selfDescription": { "intendedPurpose": "HealthLog to osobiste narzędzie do rejestrowania zdrowia i dbania o dobre samopoczucie. Pomaga zapisywać, wizualizować i eksportować własne dane zdrowotne. Nie diagnozuje, nie leczy ani nie zapobiega żadnej chorobie i nie jest wyrobem medycznym.", "coach": "Coach korzysta z Twoich własnych zapisanych danych. Nie jest lekarzem i nie udziela porad medycznych — po diagnozę lub leczenie zwróć się do pracownika ochrony zdrowia.", - "insights": "To opisowe wzorce wyliczone z Twoich własnych zapisanych danych, a nie ocena kliniczna ani diagnoza.", - "labs": "To Twoje własne zapisy, a nie diagnoza medyczna. Zakresy referencyjne różnią się w zależności od laboratorium i osoby — tylko Twój lekarz może je dla Ciebie zinterpretować.", - "medications": "To rejestruje leki, które zapisujesz, oraz Twoje stosowanie się do zaleceń. Nie ocenia dawkowania ani interakcji i nie jest poradą medyczną — potwierdź to u farmaceuty lub lekarza.", "emergency": "Jeśli to może być nagły przypadek, zadzwoń teraz pod lokalny numer alarmowy lub skontaktuj się z lekarzem. HealthLog nie pomoże w nagłym przypadku.", "dataPosture": "HealthLog jest hostowany samodzielnie: Twoje dane zdrowotne pozostają na Twojej instancji, zaszyfrowane w spoczynku. Funkcje AI korzystają z dostarczonego przez Ciebie klucza dostawcy lub modelu lokalnego, więc nic nie opuszcza Twojej instancji poza skonfigurowanym dostawcą i nie ma analityki firm trzecich na Twoich danych zdrowotnych." } diff --git a/src/app/labs/page.tsx b/src/app/labs/page.tsx index 359f8d1b2..b10436be5 100644 --- a/src/app/labs/page.tsx +++ b/src/app/labs/page.tsx @@ -6,7 +6,6 @@ import { useRouter } from "next/navigation"; import { useQueryClient } from "@tanstack/react-query"; import { Loader2, Pencil, Plus, ScanLine, Wrench } from "lucide-react"; -import { MedicalDisclaimer } from "@/components/common/medical-disclaimer"; import { LabForm } from "@/components/labs/lab-form"; import { LabList } from "@/components/labs/lab-list"; import { OcrReviewDialog } from "@/components/labs/ocr-review-dialog"; @@ -174,11 +173,6 @@ export default function LabsPage() { ) : null} setDialogOpen(true)} /> - - {/* v1.25 — calm, context-specific framing for lab values: your own - records, ranges vary by lab and person, only a clinician interprets - them. One footer line, not a per-row banner. */} - ); } diff --git a/src/app/medications/page.tsx b/src/app/medications/page.tsx index 6b48c6dbc..a65d0182e 100644 --- a/src/app/medications/page.tsx +++ b/src/app/medications/page.tsx @@ -7,7 +7,6 @@ import { useRouter, useSearchParams } from "next/navigation"; import { useAuth } from "@/hooks/use-auth"; import { useTranslations } from "@/lib/i18n/context"; import { queryKeys } from "@/lib/query-keys"; -import { MedicalDisclaimer } from "@/components/common/medical-disclaimer"; import { MedicationWizardDialog } from "@/components/medications/wizard/medication-wizard-dialog"; import { MedicationCard } from "@/components/medications/medication-card"; import { Glp1MedicationCard } from "@/components/medications/glp1-medication-card"; @@ -525,12 +524,6 @@ export default function MedicationsPage() { )} - {/* v1.25 — calm framing for the medications surface: this tracks what - you log and your own adherence, it doesn't assess dosing or - interactions and isn't medical advice. One footer line, neutral — - the med cards themselves stay un-tinted. */} - - {/* v1.5.5 — the per-card kebab triggers used to open inline IntakeImportDialog / ApiEndpointDialog mounts here, but both state slots were only ever set from inside the dialogs diff --git a/src/components/common/medical-disclaimer.tsx b/src/components/common/medical-disclaimer.tsx index ba27663cf..b2c44da48 100644 --- a/src/components/common/medical-disclaimer.tsx +++ b/src/components/common/medical-disclaimer.tsx @@ -18,9 +18,6 @@ import { useTranslations } from "@/lib/i18n/context"; * - `intendedPurpose` — the canonical "what this is / is not, not a medical * device" line. Reuse verbatim; do not paraphrase per surface. * - `coach` — the Coach standing line (works from your data, not a doctor). - * - `insights` — descriptive-patterns framing for insights + the briefing. - * - `labs` — your own records, ranges vary, only a clinician interprets. - * - `medications` — tracks what you log, not dosing/interaction advice. * - `emergency` — the red-flag interstitial note (contact emergency services). * - `dataPosture` — self-hosted, data stays on your instance, BYOK / local AI. * @@ -29,20 +26,11 @@ import { useTranslations } from "@/lib/i18n/context"; * floor; these notes are the gentle, in-context layer above it. */ export type DisclaimerVariant = - | "intendedPurpose" - | "coach" - | "insights" - | "labs" - | "medications" - | "emergency" - | "dataPosture"; + "intendedPurpose" | "coach" | "emergency" | "dataPosture"; const VARIANT_KEY: Record = { intendedPurpose: "selfDescription.intendedPurpose", coach: "selfDescription.coach", - insights: "selfDescription.insights", - labs: "selfDescription.labs", - medications: "selfDescription.medications", emergency: "selfDescription.emergency", dataPosture: "selfDescription.dataPosture", }; diff --git a/src/components/insights/insights-layout-shell.tsx b/src/components/insights/insights-layout-shell.tsx index e7ee0c0ce..c4e01849a 100644 --- a/src/components/insights/insights-layout-shell.tsx +++ b/src/components/insights/insights-layout-shell.tsx @@ -8,7 +8,6 @@ import { useMounted } from "@/hooks/use-mounted"; import { useFeatureFlags } from "@/hooks/use-feature-flags"; import { useWorkouts } from "@/hooks/use-workouts"; import { InsightsTabStrip } from "@/components/insights/insights-tab-strip"; -import { MedicalDisclaimer } from "@/components/common/medical-disclaimer"; import { nextAdvisorPollInterval, useInsightsAdvisorQuery, @@ -160,14 +159,6 @@ export function InsightsLayoutShell({ children }: { children: ReactNode }) { modules={user?.modules} /> {children} - {/* v1.18.6 (DISC-01) — the page-level generic medical disclaimer was - removed; the standing acknowledgment lives once at the start of - onboarding and the legal text on the public privacy page. - v1.25 — one calm, context-specific framing line for the whole - Insights surface (the briefing, trends and correlations included): - these are descriptive patterns from the user's own data, not a - clinical assessment. Layered, not a wall of warnings. */} - ); }