mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 07:13:29 +00:00
feat(mental-health): gate the PHQ-9/GAD-7 check-in behind an opt-in module
The mental-wellbeing screener surface shipped built but unreachable: no nav entry, no module key, ungated. Add a `mentalHealth` module key (opt-in, default OFF — a depression/anxiety self-assessment is at least as sensitive as mood) to the registry, the module-hub icon map, and the exhaustive module maps. Give the check-in a nav home at /insights/mental-wellbeing, born-gated on the module so it appears only once the account opts in, and redirect the page home on a direct hit when the module is off. Item answers stay encrypted and off the AI Coach / MCP regardless of the toggle; this only controls whether the surface is visible and reachable.
This commit is contained in:
1 parent
15e740bc2b
commit
f62ba50ff0
7 files changed
+88
-7
No files matched your search
@@ -320,6 +320,7 @@ describe("doctor-report — module enable/disable gating", () => {
|
||||
environment: true,
|
||||
mcp: true,
|
||||
inboundDocuments: true,
|
||||
mentalHealth: true,
|
||||
} as const;
|
||||
|
||||
it("includes every module's data when all modules are enabled", async () => {
|
||||
|
||||
Reference in new issue
Block a user