refactor(insights): drop the per-page generic medical disclaimers

Remove the page-level Insights disclaimer footer and the health-score and
correlation card disclaimers now that the not-a-diagnosis acknowledgment
is shown once at onboarding and the legal text stays on the privacy page.
Device-provenance, contraception-safety, statistical-method and
shared-report notes stay where they convey specific information.
This commit is contained in:
Marc-André Bombeck committed 2026-06-18 22:11:45 +02:00
1 parent bfba92cb83
commit 04a50b2702
10 files changed
+11 -110

No files matched your search

-5
View File
@@ -1971,7 +1971,6 @@
"componentWeight": "Gewicht",
"componentMood": "Stimmung",
"componentCompliance": "Therapietreue",
"disclaimer": "Orientierungshilfe — keine ärztliche Bewertung.",
"deltaExplainer": {
"trigger": "Was bedeutet diese Veränderung?",
"title": "So wird die Veränderung berechnet",
@@ -2052,7 +2051,6 @@
},
"correlationRow": {
"title": "Zusammenhänge",
"disclaimer": "Zusammenhänge sind beobachtend, nicht kausal — sprich mit deinem Arzt, wenn der Blutdruck hoch ist.",
"experimentCta": "7-Tage-Experiment starten",
"experimentTooltip": "Bald verfügbar",
"emptyTitle": "Mehr Daten nötig, um diesen Zusammenhang zu zeigen",
@@ -3452,9 +3450,6 @@
"target": {
"heading": "Ziel"
},
"disclaimer": {
"footer": "HealthLog beschreibt deine eigenen erfassten Daten — es ist keine klinische Bewertung und keine Diagnose. Sprich mit deiner Ärztin oder deinem Arzt über alles, was dich beunruhigt."
},
"settings": {
"overviewTitle": "Übersicht anordnen",
"overviewDescription": "Abschnitte ein- oder ausblenden und ihre Reihenfolge auf der Insights-Übersicht festlegen."
-5
View File
@@ -1971,7 +1971,6 @@
"componentWeight": "Weight",
"componentMood": "Mood",
"componentCompliance": "Adherence",
"disclaimer": "Indicative — not a clinical assessment.",
"deltaExplainer": {
"trigger": "What does this delta mean?",
"title": "How the delta is computed",
@@ -2052,7 +2051,6 @@
},
"correlationRow": {
"title": "Relationships",
"disclaimer": "Relationships are observational, not causal — talk to your doctor if BP runs high.",
"experimentCta": "Try a 7-day experiment",
"experimentTooltip": "Coming soon",
"emptyTitle": "Need more data to see this relationship",
@@ -3452,9 +3450,6 @@
"target": {
"heading": "Target"
},
"disclaimer": {
"footer": "HealthLog describes your own tracked data — it is not a clinical assessment or diagnosis. Talk to your doctor about anything that concerns you."
},
"settings": {
"overviewTitle": "Arrange the overview",
"overviewDescription": "Show or hide sections and set their order on the Insights overview."
-5
View File
@@ -1971,7 +1971,6 @@
"componentWeight": "Peso",
"componentMood": "Estado de ánimo",
"componentCompliance": "Cumplimiento",
"disclaimer": "Orientación — no es valoración médica.",
"deltaExplainer": {
"trigger": "¿Qué significa este cambio?",
"title": "Cómo se calcula el cambio",
@@ -2052,7 +2051,6 @@
},
"correlationRow": {
"title": "Correlaciones",
"disclaimer": "Las correlaciones son observacionales, no causales — habla con tu médico si tu tensión es alta.",
"experimentCta": "Iniciar experimento de 7 días",
"experimentTooltip": "Próximamente",
"emptyTitle": "Necesitamos más datos para mostrar esta correlación",
@@ -3452,9 +3450,6 @@
"target": {
"heading": "Objetivo"
},
"disclaimer": {
"footer": "HealthLog describe tus propios datos registrados — no es una evaluación clínica ni un diagnóstico. Habla con tu médico sobre cualquier cosa que te preocupe."
},
"settings": {
"overviewTitle": "Organizar la vista general",
"overviewDescription": "Muestra u oculta secciones y define su orden en la vista general de Análisis."
-5
View File
@@ -1971,7 +1971,6 @@
"componentWeight": "Poids",
"componentMood": "Humeur",
"componentCompliance": "Observance",
"disclaimer": "Repère — pas un avis médical.",
"deltaExplainer": {
"trigger": "Que signifie cet écart ?",
"title": "Comment l'écart est calculé",
@@ -2052,7 +2051,6 @@
},
"correlationRow": {
"title": "Corrélations",
"disclaimer": "Les corrélations sont observationnelles, pas causales — parle à ton médecin si ta tension est élevée.",
"experimentCta": "Lancer une expérience de 7 jours",
"experimentTooltip": "Bientôt disponible",
"emptyTitle": "Il faut plus de données pour afficher cette corrélation",
@@ -3452,9 +3450,6 @@
"target": {
"heading": "Objectif"
},
"disclaimer": {
"footer": "HealthLog décrit vos propres données suivies — il ne s'agit pas d'une évaluation clinique ni d'un diagnostic. Parlez à votre médecin de tout ce qui vous préoccupe."
},
"settings": {
"overviewTitle": "Organiser la vue d'ensemble",
"overviewDescription": "Affichez ou masquez des sections et définissez leur ordre sur la vue d'ensemble des Analyses."
-5
View File
@@ -1971,7 +1971,6 @@
"componentWeight": "Peso",
"componentMood": "Umore",
"componentCompliance": "Aderenza",
"disclaimer": "Indicazione — non è una valutazione medica.",
"deltaExplainer": {
"trigger": "Cosa significa questa variazione?",
"title": "Come si calcola la variazione",
@@ -2052,7 +2051,6 @@
},
"correlationRow": {
"title": "Correlazioni",
"disclaimer": "Le correlazioni sono osservazionali, non causali — parla con il medico se la pressione è alta.",
"experimentCta": "Avvia esperimento di 7 giorni",
"experimentTooltip": "In arrivo",
"emptyTitle": "Servono più dati per mostrare questa correlazione",
@@ -3452,9 +3450,6 @@
"target": {
"heading": "Obiettivo"
},
"disclaimer": {
"footer": "HealthLog descrive i tuoi dati registrati — non è una valutazione clinica né una diagnosi. Parla con il tuo medico di qualsiasi cosa ti preoccupi."
},
"settings": {
"overviewTitle": "Organizza la panoramica",
"overviewDescription": "Mostra o nascondi le sezioni e definisci il loro ordine nella panoramica degli Approfondimenti."
-5
View File
@@ -1971,7 +1971,6 @@
"componentWeight": "Waga",
"componentMood": "Nastrój",
"componentCompliance": "Przestrzeganie",
"disclaimer": "Wskazówka — nie ocena medyczna.",
"deltaExplainer": {
"trigger": "Co oznacza ta zmiana?",
"title": "Jak liczona jest ta zmiana",
@@ -2052,7 +2051,6 @@
},
"correlationRow": {
"title": "Korelacje",
"disclaimer": "Korelacje są obserwacyjne, nie przyczynowe — porozmawiaj z lekarzem, jeśli ciśnienie jest wysokie.",
"experimentCta": "Uruchom 7-dniowy eksperyment",
"experimentTooltip": "Wkrótce",
"emptyTitle": "Potrzeba więcej danych, aby pokazać tę korelację",
@@ -3452,9 +3450,6 @@
"target": {
"heading": "Cel"
},
"disclaimer": {
"footer": "HealthLog opisuje Twoje własne zarejestrowane dane — nie jest oceną kliniczną ani diagnozą. Porozmawiaj z lekarzem o wszystkim, co Cię niepokoi."
},
"settings": {
"overviewTitle": "Uporządkuj przegląd",
"overviewDescription": "Pokaż lub ukryj sekcje i ustaw ich kolejność w przeglądzie Analiz."
@@ -192,19 +192,6 @@ describe("<HealthScoreCard>", () => {
expect(moodSliceMatch?.[1]).toBe("—");
});
it("renders the disclaimer", () => {
const html = ssr(
<HealthScoreCard
score={86}
band="green"
components={baseComponents}
delta={null}
/>,
);
expect(html).toMatch(/data-slot="health-score-card-disclaimer"/);
expect(html).toContain("Indicative");
});
it("v1.4.27 B1 — no longer mounts an inline Ask-the-Coach button (hero strip carries the CTA)", () => {
// The hero strip's existing "Ask the coach" action covers this
// surface; the card-internal duplicate button retired. The
@@ -245,7 +232,6 @@ describe("<HealthScoreCard>", () => {
);
expect(html).toContain("Gesundheitsscore");
expect(html).toContain("im Vergleich zur Vorwoche");
expect(html).toContain("Orientierungshilfe");
// v1.4.27 B1 — the inline Coach button retired; hero strip carries
// the action now.
expect(html).not.toContain("Coach fragen");
@@ -308,27 +294,6 @@ describe("<HealthScoreCard>", () => {
expect(cardOpen?.[0]).toContain("flex-col");
});
it("pins the disclaimer to the bottom of the stretched card via mt-auto", () => {
// Without `mt-auto` the disclaimer rides directly under the
// provenance accordion and leaves the recovered space below the
// disclaimer instead of between the body and the footer. The
// FB-H2 contract is "score number on top, disclaimer on bottom,
// recovered space in the middle".
const html = ssr(
<HealthScoreCard
score={86}
band="green"
components={baseComponents}
delta={null}
/>,
);
const disclaimerOpen = html.match(
/<p[^>]*data-slot="health-score-card-disclaimer"[^>]*>/,
);
expect(disclaimerOpen).not.toBeNull();
expect(disclaimerOpen?.[0]).toContain("mt-auto");
});
// v1.4.37 W4a item 1 — the inner column switched from `flex
// flex-col gap-3` to a 7-row grid so the slack collects on row 6
// (the provenance accordion) instead of clumping under the
+3 -19
View File
@@ -627,25 +627,9 @@ export function HealthScoreCard({
)}
</div>
{/* v1.4.27 B1 — disclaimer bumped from text-[10px] to
text-[11px] (BL-P4-9 L2: the 10 px size was borderline
against the 12 px mobile floor). The hero strip already
carries an "Ask the coach" action so the inline button
here retires; the parent still receives onAskCoach via
other surfaces but the card no longer mounts a duplicate
CTA.
v1.4.28 R3c-Insights — `mt-auto` pins the disclaimer to
the bottom of the stretched card so the score number and
sub-bars stay anchored at the top while the recovered
vertical space (when the parent column is taller) sits
quietly between the provenance accordion and the
disclaimer footer. */}
<p
data-slot="health-score-card-disclaimer"
className="text-muted-foreground mt-auto text-[11px] leading-snug"
>
{t("insights.healthScore.disclaimer")}
</p>
{/* v1.18.6 (DISC-01) — the "indicative, not a clinical assessment"
card disclaimer is removed; the one-time onboarding acknowledgment
now covers the not-a-diagnosis framing app-wide. */}
</div>
</div>
);
@@ -3,7 +3,6 @@
import { useMemo, type ReactNode } from "react";
import { useQuery } from "@tanstack/react-query";
import { useTranslations } from "@/lib/i18n/context";
import { useAuth } from "@/hooks/use-auth";
import { useMounted } from "@/hooks/use-mounted";
import { useFeatureFlags } from "@/hooks/use-feature-flags";
@@ -52,7 +51,6 @@ interface ComprehensivePayload {
}
export function InsightsLayoutShell({ children }: { children: ReactNode }) {
const { t } = useTranslations();
const { isAuthenticated, user } = useAuth();
// v1.4.33 F18 — gate the advisor POST on the operator's assistant
// feature flag. Pre-fix, every /insights mount fired POST
@@ -160,24 +158,11 @@ export function InsightsLayoutShell({ children }: { children: ReactNode }) {
modules={user?.modules}
/>
{children}
{/* v1.12.6 — SINGLE SOURCE of the generic Insights disclaimer.
The "describes your own data, not a clinical assessment / diagnosis"
sentence used to repeat across the overview, the metric tiles, the
mood page, and the medications page. It now lives here once, as a
page-level footer under every `/insights/*` route. Metric-SPECIFIC
caveats (health score, correlations, mood relations, derived cards,
rhythm events) stay on their own cards — those convey real,
non-generic information. Other waves remove the generic line from the
overview / mood / medications pages; this footer is where it lives.
v1.18.0 — Coach moved to the standalone `/coach` route (its own
disclaimer), so this footer now renders under every `/insights/*`
route unconditionally. */}
<p
data-slot="insights-disclaimer-footer"
className="text-muted-foreground border-border/60 border-t pt-4 text-center text-xs leading-relaxed"
>
{t("insights.disclaimer.footer")}
</p>
{/* v1.18.6 (DISC-01) — the page-level generic medical disclaimer is
removed. The "HealthLog is a private tracking tool, not a clinical
assessment or diagnosis" acknowledgment now lives once at the start
of onboarding, and the legal text stays reachable on the public
privacy page. */}
</div>
);
}
@@ -84,12 +84,9 @@ export function MetricCorrelationCard({ slug }: MetricCorrelationCardProps) {
{t("insights.correlationRow.title")}
</h2>
<CorrelationCard result={result} />
<p
data-slot="metric-correlation-disclaimer"
className="text-muted-foreground text-xs italic"
>
{t("insights.correlationRow.disclaimer")}
</p>
{/* v1.18.6 (DISC-01) — the "observational, not causal / talk to your
doctor" disclaimer is removed; the one-time onboarding acknowledgment
now covers the not-medical-advice framing app-wide. */}
</section>
);
}