mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
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.