feat(mental-health): make the wellbeing check-in a standalone module page

Move the PHQ-9 / GAD-7 screener off `/insights/mental-wellbeing` to a
top-level `/mental-wellbeing` route so it no longer borrows the Insights
tab strip and layout shell. The page now uses the standard module-page
frame at the wider content width the other module pages use.

Replace the standing screening disclaimer block and the opt-in/private
line in the header with an info icon after the page heading whose
hover/focus tooltip carries the screening-not-a-diagnosis note. Drop the
now-orphaned `disclaimer` / `optInNote` strings across all six locales
and add the `infoTooltip` string in their place.

The questionnaire, scoring, severity result, PHQ-9 item-9 crisis-resource
handling, focus-on-submit, and 44px touch targets are unchanged. Repoint
the module nav entry and the registry comments at the new route.
This commit is contained in:
Marc-André Bombeck committed 2026-06-28 20:48:39 +02:00
1 parent 651b02bc1b
commit 37c977e3a4
10 files changed
+21 -28

No files matched your search

+3 -3
View File
@@ -87,10 +87,10 @@ export const NAV_DESTINATIONS: ReadonlyArray<NavDestination> = [
// Born-gated: `requiresModule: "mentalHealth"` reads the opt-in (default-off)
// key from the resolved module map, so the entry is absent until the account
// turns the module on from the Modules hub. The destination is the dedicated
// `/insights/mental-wellbeing` check-in surface (its own nav home — the
// active-detection helper defers `/insights` to it on that path).
// top-level `/mental-wellbeing` check-in surface (its own module page — it
// no longer borrows the Insights tab strip / layout shell).
{
href: "/insights/mental-wellbeing",
href: "/mental-wellbeing",
tKey: "nav.mentalWellbeing",
icon: Brain,
tourId: "nav-mental-wellbeing",
@@ -21,6 +21,7 @@ import { apiGet, apiPost } from "@/lib/api/api-fetch";
import { queryKeys } from "@/lib/query-keys";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { InfoHint } from "@/components/ui/info-hint";
import {
INSTRUMENTS,
PHQ_GAD_ATTRIBUTION,
@@ -122,20 +123,17 @@ export function MentalWellbeing() {
);
return (
<div className="mx-auto flex max-w-2xl flex-col gap-6">
<div className="mx-auto flex max-w-3xl flex-col gap-6">
<header className="flex flex-col gap-2">
<h1 className="text-2xl font-semibold">
{t("mentalHealth.pageTitle")}
</h1>
<div className="flex items-center gap-1.5">
<h1 className="text-2xl font-semibold">
{t("mentalHealth.pageTitle")}
</h1>
<InfoHint label={t("mentalHealth.infoTooltip")} />
</div>
<p className="text-muted-foreground text-sm">
{t("mentalHealth.pageDescription")}
</p>
<p className="text-muted-foreground border-border/60 bg-muted/40 rounded-md border p-3 text-xs">
{t("mentalHealth.disclaimer")}
</p>
<p className="text-muted-foreground text-xs">
{t("mentalHealth.optInNote")}
</p>
</header>
{phase === "choose" && (