Merge v1.25.1: drop the repeated inline disclaimers from medication, insights, and labs

This commit is contained in:
Marc-André Bombeck committed 2026-06-28 21:48:21 +02:00
commit d7fd3ea9b4
10 files changed
+1 -53

No files matched your search

-6
View File
@@ -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}
<LabList onAddFirst={() => 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. */}
<MedicalDisclaimer variant="labs" className="px-1 pt-2" />
</div>
);
}
-7
View File
@@ -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() {
</div>
)}
{/* 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. */}
<MedicalDisclaimer variant="medications" className="px-1 pt-2" />
{/* 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
+1 -13
View File
@@ -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<DisclaimerVariant, string> = {
intendedPurpose: "selfDescription.intendedPurpose",
coach: "selfDescription.coach",
insights: "selfDescription.insights",
labs: "selfDescription.labs",
medications: "selfDescription.medications",
emergency: "selfDescription.emergency",
dataPosture: "selfDescription.dataPosture",
};
@@ -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. */}
<MedicalDisclaimer variant="insights" className="px-1" />
</div>
);
}