Files
HealthLog/src/hooks/__tests__
Marc-André Bombeck 23a6f85b0f fix(sharing): drop an account read answered across a record switch
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.
2026-11-15 10:58:06 +01:00
..