mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 15:42:24 +00:00
feat(dashboard): emit mood and BMI on the summary payload
Both metrics exist in the record but the summary route emitted neither, so a native client could render every home-screen tile except those two. Mood reads the canonical daily series (`buildMoodDailySeries`) — the same rollup-backed aggregation the web mood analytics and the dashboard snapshot render — and emits the newest day's score with a trailing seven-day sparkline. BMI comes from `computeBmi`, the one implementation the web vitals dashboard already renders through the derived-metric dispatch; the route resolves the figure so no client re-derives weight over height squared. Mood gates on the mood module through a synthetic `MOOD_ENTRY` key, the same route `NUTRIENT_WATER` takes, because mood is not a measurement type; without the join the card would ship past a disabled module. BMI belongs to no module and rides through with the other core vitals. The BMI card is omitted rather than emitted empty when the profile has no height or no weight in the window: the card shape carries no honest "unknown" state, and a null value would read as a logging gap rather than a missing profile field.
This commit is contained in:
1 parent
8168e60dfd
commit
4ddc08f784
11 files changed
+262
-14
No files matched your search
@@ -81,6 +81,7 @@ const LEGIT_IDENTICAL = new Set<string>([
|
||||
// Clinical abbreviations / SI units — identical across locales.
|
||||
"charts.vo2Max",
|
||||
"cycle.insights.crosstab.unitGlucose",
|
||||
"dashboard.metric.unit.bmi",
|
||||
"dashboard.metric.unit.glucose",
|
||||
"dashboard.vo2Max",
|
||||
"dashboard.vo2MaxShort",
|
||||
|
||||
Reference in new issue
Block a user