mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 15:42:24 +00:00
Raising the record-session hold clears the query cache, which remounts the account query, so the switching tab has a GET /api/auth/me in flight beside its own POST /api/account/switch. When the server answered that read from the record being left and the answer was applied after the commit, fetchMe rewrote the scope mirror back to the old record. A peer tab that had already settled read that write as a foreign switch and published a hold expecting the old record, which no /me would ever confirm, so every tab sat behind the hydration gate until the stored transition aged out. The transition store now counts the changes a tab applies, and fetchMe repeats a read whose request straddled one instead of applying it.