mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 15:42:24 +00:00
feat(self-description): add the non-diagnostic / intended-purpose standard
Introduce one canonical "what this is / is not, not a medical device" statement plus a layered, calm disclaimer set, and apply it on the surfaces that earn a context note. - New shared `MedicalDisclaimer` component renders the copy as plain React text (no markdown renderer, per the XSS posture). Variants: intendedPurpose, coach, insights, labs, medications, emergency, dataPosture. - New `selfDescription` i18n namespace across all six locales: the intended-purpose line, the per-surface notes, the emergency note, and an explicit data-posture statement (self-hosted, data stays on your instance, encrypted at rest, BYOK / local model, no third-party analytics). - Apply once per surface, layered not plastered: a calm standing line on the Coach new-chat hero, one framing line in the Insights layout shell (covers the briefing and trends), a labs note (ranges vary, only a clinician interprets), a neutral medications note, and the data-posture line where the provider key is configured. Mental-wellbeing keeps its existing crisis copy; records keep their existing note. - Extend the Coach system prompt (EN + DE) with a self-description ground rule so the Coach answers "what are you / where does my data go" honestly and stays non-diagnostic. App-authored copy was already observational; the few diagnose/treat tokens are negations, idioms, or framed as the user's own self-reported statement, so no softening was required.
This commit is contained in:
1 parent
a27a1ee71d
commit
3bd52a322b
13 files changed
+195
-5
No files matched your search
@@ -19,6 +19,7 @@ import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { Sparkles } from "lucide-react";
|
||||
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { MedicalDisclaimer } from "@/components/common/medical-disclaimer";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { NativeSelect } from "@/components/ui/native-select";
|
||||
import { SettingsCard } from "@/components/settings/settings-card";
|
||||
@@ -201,6 +202,11 @@ export function AiInsightsCard({
|
||||
})
|
||||
}
|
||||
/>
|
||||
|
||||
{/* v1.25 — the data-posture statement lives where the provider key is
|
||||
configured: self-hosted, data stays on this instance, BYOK / local
|
||||
model, no third-party analytics. One calm line, not a banner. */}
|
||||
<MedicalDisclaimer variant="dataPosture" />
|
||||
</div>
|
||||
</SettingsCard>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user