mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 22:50:51 +00:00
fix(settings): finish the D0-D8 settings/admin frame cleanup
- Drop the leading blurb paragraph from the Channels + Integrations connection panels so each body starts at its first card (D0 alignment). - Correct three stale CORE/always-on comments: medications has been a fail-open toggleable module since D3; CORE is now weight/BP/pulse only. - Remove the dead variant/isSubtab branch from SourcesSection — no callers after the D4 split; render the standalone header unconditionally. - Render the admin AI-quality card frame + header once and branch only the body across loading/error/empty/data, matching the coach-feedback card. - Rename the Coach activation card's section id from the legacy settings-ai-* namespace to settings-coach-activate-* after the S5 move. - Gate the medication low-stock reminder card on the medications module so it hides when the account turns medications off, mirroring mood/coach.
This commit is contained in:
1 parent
a3217ff767
commit
dadb6e2d34
8 files changed
+99
-122
No files matched your search
+12
-10
@@ -10,11 +10,12 @@
|
||||
*
|
||||
* Two classes of domain:
|
||||
*
|
||||
* - CORE (always-on): weight, blood pressure, pulse, medications — the
|
||||
* measurement engine + meds. These are NOT in `MODULE_KEYS` and have
|
||||
* NO registry entry. They can never be disabled; the gate has no key
|
||||
* to flip and the write endpoint refuses them. This is structural,
|
||||
* not a runtime check future code can soften.
|
||||
* - CORE (always-on): weight, blood pressure, pulse — the measurement
|
||||
* engine. These are NOT in `MODULE_KEYS` and have NO registry entry.
|
||||
* They can never be disabled; the gate has no key to flip and the
|
||||
* write endpoint refuses them. This is structural, not a runtime check
|
||||
* future code can soften. (Medications was CORE through v1.18.0; D3
|
||||
* graduated it to a fail-open toggleable module below.)
|
||||
*
|
||||
* - TOGGLEABLE (the "secondary domains"): the maintainer-chosen scope
|
||||
* below. Each carries a stable key, an i18n label + description key,
|
||||
@@ -118,11 +119,12 @@ export const MODULE_KEYS = [
|
||||
export type ModuleKey = (typeof MODULE_KEYS)[number];
|
||||
|
||||
/**
|
||||
* CORE domains — the always-on measurement engine + medications. Listed
|
||||
* here for documentation + the write-endpoint denylist; they have NO
|
||||
* `ModuleDefinition` and can never appear as a toggle. A crafted
|
||||
* `{ "weight": false }` blob is inert: `weight` is not a `ModuleKey`, so
|
||||
* the gate never reads it and the PATCH validator rejects it.
|
||||
* CORE domains — the always-on measurement engine (weight / blood pressure
|
||||
* / pulse). Listed here for documentation + the write-endpoint denylist;
|
||||
* they have NO `ModuleDefinition` and can never appear as a toggle. A
|
||||
* crafted `{ "weight": false }` blob is inert: `weight` is not a
|
||||
* `ModuleKey`, so the gate never reads it and the PATCH validator rejects
|
||||
* it. (Medications is a toggleable module since D3 — see `MODULE_KEYS`.)
|
||||
*/
|
||||
export const CORE_DOMAIN_KEYS = [
|
||||
"weight",
|
||||
|
||||
Reference in new issue
Block a user