mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
The analytics compliance streak keyed days with host-local getFullYear/getMonth/getDate against a timeline whose slot.day is minted in the user's IANA zone, so the streak drifted off by a day whenever the server clock's zone differed from the user's. Consolidate onto the detail-page streaksFromTimeline helper threaded with the medication's timezone so both call sites share one correct day-keyed walk. Also fix the DST step in that helper: it stepped a fixed +24h while its comment claimed 25h, which could skip a local day on the 23h spring-forward boundary and run the window short. Snap each cursor to the user-local midnight and advance +25h then re-snap, mirroring the cadence expander, so every local calendar day is visited exactly once across 23/24/25h boundaries. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>