mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
The Settings page's instant score-ring toggle PUT the full dashboard layout, built from the client's cached `remote` snapshot. That snapshot can go stale mid-flight: if a normal tile/chart Save committed a newer layout first, the ring request's explicit stale `widgets` (and `comparisonBaseline` / `chartOverlayPrefs`) still won on write and silently reverted the just-saved layout whenever it resolved last. The ring mutation now PUTs only the two ring fields (`buildRingMutationPayload`). `widgets` joins the existing preserve-when-absent merge (`LAYOUT_FIELD_MERGE_DISPOSITION`) so an omitted field is carried forward from whatever is currently stored instead of a client-held copy, closing the race regardless of request order.