mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
Gate badge evaluation on the per-user module map: mood badges no longer evaluate, render, or persist while the mood module is off, and the same holds for any metric that maps to a toggleable module (sleep). Core and account-wide badges have no owning module and always pass through. Move unlock persistence out of the cached builder. The builder now returns the not-yet-persisted unlocks and the handler runs the idempotent createMany after the cache read, so a cache hit can no longer skip the write and a concurrent miss can no longer duplicate it. Add the parity fields the iOS DTO dropped (category, points, target, current, isHidden) so the native client groups and renders badges in lock-step with the web surface.