mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Three CONFIRMED findings from the campaign's feature-wiring audit + structural verification: - Sleep rendered nothing in the doctor-report PDF: the sleep section is default-on and the data layer reconstructs per-night SLEEP_DURATION rows, but DOCTOR_REPORT_VITAL_TYPES omitted SLEEP_DURATION, so the vitals table showed nothing (FHIR already emitted it). Added it to the allowlist with a minutes-to-hours conversion; corrected the stale 'intentionally excluded' comment. - Glucose had no doctor-report section toggle — it rendered whenever the global glucose module was on, with no report-level privacy control. The toggle actually already existed in the UI (with i18n) but was dead because the prefs fold dropped the key. Wired it end to end (glucose added to the prefs Zod schema + defaults, default-on to preserve behaviour; gated the render loop + the query). Also fixed a grouped-vs-flat prefs mis-detection: 'glucose' in GROUPED_SECTION_KEYS would have flagged flat blobs (incl. EMPTY prefs) as grouped and defaulted them all on. No migration (prefs is a JSON blob). - environment fed the coach with no exclusion: MODULE_EXCLUDED_SOURCES omitted it, so module-off still leaked audio_env/audio_headphone/audio_event/daylight/ skin_temp to the snapshot. Added, scoped exactly to the environment cluster's five sources. Regression test per fix.
991 KiB
991 KiB