From 424d6ee5e108062ad9ecd9ed3f4ef3368046f837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 5 Jun 2026 12:30:47 +0200 Subject: [PATCH] insights(mood): drop the per-card generic disclaimer, defer to the page footer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The better-days board, the tag-influence list, and the tag × metric crosstab each repeated a generic associations-not-causes / talk-to-your- doctor caveat. That sentence now lives once in the page-level Insights footer, so the three mood cards no longer restate it; the genuinely specific FDR caveat on the discovered-relations board stays. Drop the now-unused betterDays / influence / crosstab disclaimer keys from every locale and update the two component tests that pinned the removed copy. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../insights/mood/__tests__/mood-better-days.test.tsx | 6 ++++-- .../insights/mood/__tests__/mood-tag-influence.test.tsx | 6 ++++-- src/components/insights/mood/mood-better-days.tsx | 6 ++---- src/components/insights/mood/mood-tag-influence.tsx | 6 ++---- src/components/insights/mood/mood-tag-metric-crosstab.tsx | 6 ++---- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/components/insights/mood/__tests__/mood-better-days.test.tsx b/src/components/insights/mood/__tests__/mood-better-days.test.tsx index c2d483750..5f7c048b1 100644 --- a/src/components/insights/mood/__tests__/mood-better-days.test.tsx +++ b/src/components/insights/mood/__tests__/mood-better-days.test.tsx @@ -80,12 +80,14 @@ describe("", () => { expect(html).toContain("r -0.45"); }); - it("renders the description and disclaimer once each", () => { + it("renders the description once and no local generic disclaimer", () => { const html = render( , ); - expect((html.match(/Associations only/g) ?? []).length).toBe(1); expect((html.match(/ranked by how strongly/g) ?? []).length).toBe(1); + // The generic "associations only, not causes" disclaimer now lives once + // in the page-level Insights footer, not on this board. + expect(html).not.toContain("Associations only"); // one row per factor expect((html.match(/data-slot="mood-better-day-factor"/g) ?? []).length).toBe( 2, diff --git a/src/components/insights/mood/__tests__/mood-tag-influence.test.tsx b/src/components/insights/mood/__tests__/mood-tag-influence.test.tsx index 317409bc5..e08d4f1b9 100644 --- a/src/components/insights/mood/__tests__/mood-tag-influence.test.tsx +++ b/src/components/insights/mood/__tests__/mood-tag-influence.test.tsx @@ -79,10 +79,12 @@ describe("", () => { expect(html).not.toContain("charts.weekdaysFull.mon"); }); - it("renders the observational disclaimer once", () => { + it("does not render a local generic disclaimer", () => { const html = render( , ); - expect((html.match(/not proof of cause/g) ?? []).length).toBe(1); + // The generic "associations, not causes" caveat now lives once in the + // page-level Insights footer, not on this list. + expect(html).not.toContain("not proof of cause"); }); }); diff --git a/src/components/insights/mood/mood-better-days.tsx b/src/components/insights/mood/mood-better-days.tsx index 4a489a4e7..19a7b9873 100644 --- a/src/components/insights/mood/mood-better-days.tsx +++ b/src/components/insights/mood/mood-better-days.tsx @@ -15,7 +15,8 @@ import type { MoodInfluenceConfidence } from "./mood-tag-influence"; * surface — the headline "relations" answer to "what goes with my good * days?". The merge + ranking is pre-computed in `mood-aggregates.ts` * (`computeBetterDays`); this component only paints. Observational only; - * the standing disclaimer is rendered once below the board. + * the standing "describes your own data, not a diagnosis" disclaimer lives + * once in the page-level Insights footer, not on this board. */ export interface MoodBetterDayFactor { @@ -138,9 +139,6 @@ export function MoodBetterDays({ ); })} -

- {t("insights.mood.betterDays.disclaimer")} -

); } diff --git a/src/components/insights/mood/mood-tag-influence.tsx b/src/components/insights/mood/mood-tag-influence.tsx index e2ca76acd..5ebef5105 100644 --- a/src/components/insights/mood/mood-tag-influence.tsx +++ b/src/components/insights/mood/mood-tag-influence.tsx @@ -12,7 +12,8 @@ import { cn } from "@/lib/utils"; * the delta, and a confidence chip. The math is pre-computed in * `mood-aggregates.ts` (shared with the LLM snapshot), gated on per-group * sample floors — sparse tags never reach here. Observational only: the - * "association, not cause" caption is rendered once below the list. + * generic "associations, not causes" caveat lives once in the page-level + * Insights footer, so this list no longer repeats it. */ export type MoodInfluenceConfidence = "low" | "medium" | "high"; @@ -110,9 +111,6 @@ export function MoodTagInfluence({ ); })} -

- {t("insights.mood.influence.disclaimer")} -

); } diff --git a/src/components/insights/mood/mood-tag-metric-crosstab.tsx b/src/components/insights/mood/mood-tag-metric-crosstab.tsx index 907561769..3c0062672 100644 --- a/src/components/insights/mood/mood-tag-metric-crosstab.tsx +++ b/src/components/insights/mood/mood-tag-metric-crosstab.tsx @@ -14,7 +14,8 @@ import type { MoodInfluenceConfidence } from "./mood-tag-influence"; * pre-computed in `mood-aggregates.ts` (`computeTagMetricCrosstab`) — the * same Welch t-test + day floors + Benjamini-Hochberg FDR the rest of the * relations surface uses; only FDR-surviving rows reach here. Observational - * only: the "association, not cause" caption renders once below the list. + * only: the generic "associations, not causes" caveat lives once in the + * page-level Insights footer, so this card no longer repeats it. */ export type MoodCrosstabDisplay = "hours" | "kcal" | "score"; @@ -150,9 +151,6 @@ export function MoodTagMetricCrosstab({ ); })} -

- {t("insights.mood.crosstab.disclaimer")} -

); }