feat(settings): make medications a toggleable module

Medications graduated from the always-on core set (weight / blood
pressure / pulse stay core) to an opt-out module. The surface gates
off the resolved module map — the left-nav entry, the dashboard
medication widget, and the dedicated Medikamente settings entry hide
when the account turns the module off. The medication data routes stay
exempt from the gate (same data-layer reasoning as mood / labs): an
importer, a sync, and the user's ability to clean up entries keep
working while the surface is hidden, and re-enabling finds the
schedule and intake history intact.

Wire the module-route gate inventory, the dashboard widget/summary
maps, the PATCH allowlist, and the nav model; regenerate the OpenAPI
contract for the new module key.
This commit is contained in:
Marc-André Bombeck committed 2026-06-16 21:31:54 +02:00
1 parent 930c4a75dd
commit 559366e308
13 files changed
+119 -28

No files matched your search

+5 -4
View File
@@ -12,10 +12,11 @@
*
* The body schema (`modulePrefsPatchSchema`) is `strict()` over the
* directly-owned toggleable key set, so a core-domain key (`weight`,
* `bloodPressure`, `pulse`, `medications`), a delegated key (`cycle`,
* `coach`), or any unknown key is a 422 — the core measurement engine +
* meds can never be disabled here, and a value for a delegated module can
* never land inert in `modulePreferencesJson`. The delegated modules are
* `bloodPressure`, `pulse`), a delegated key (`cycle`, `coach`), or any
* unknown key is a 422 — the core measurement engine can never be disabled
* here, and a value for a delegated module can never land inert in
* `modulePreferencesJson`. v1.18.1 (D3) — `medications` graduated to a
* toggleable module, so it IS accepted here now. The delegated modules are
* managed at their real control (cycle in Account, coach in Settings →
* Coach); the Modules hub deep-links there rather than offering a dead
* toggle.