mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 04:12:04 +00:00
The provider sent PUT /api/auth/me/locale on mount and on every switch, signed in or not. Signed out the route answers 401, the once-per-tab marker was never set, and every signed-out page load repeated the refused write. The mirror moves out of the provider into LocaleServerSyncBridge, which watches the account payload without fetching it and writes only once an account is known. The choice made on the sign-in page therefore reaches the account right after signing in, and the marker is keyed on the account as well as the language, so another account signing in on the same tab is written for too. The browser test stub no longer treats the PUT as ambient, which is what lets its test see a stray write.