Settle the loading gate on the gate, not on a "load started" flag

Fixkamo-internal
Ya
26 Agosti 2026, 06:12 UTC
Mwandishi
kamo
Ahadi ya
0b0984c

Two follow-ups to the session store, one of them a real defect. ensureLoaded decided foreground-vs-background from an `everLoaded` flag set when the first foreground pass STARTED. That pass can return without settling anything — it bails when nothing is subscribed, which is the same guard that stops a subscriber-less module from redirecting to /logout. When it did, the flag was already set, so every later mount took the background path, and the background path deliberately skips the finally that clears `loading`. The result is `loading` stuck true for the rest of the tab's life: no crash, no failing test, just the whole app sitting on its loading state forever. It now tests the gate itself — still loading means still foreground — which is self-healing and drops the flag entirely. Also removes refreshNow(). It was public API that nothing but the tests called, and the thing the tests actually wanted to exercise was the five-minute path. They now go through refreshSession(), which is what the interval and the visibilitychange listener call, so the background-refresh cases cover the real seam instead of a door opened for them. Verified: tsc clean, 10 guards pass, 3293 tests green (26 in this file), build compiles, and the standalone server still renders the shell — 200, 16,239 bytes across 153 elements, two headers, ten buttons, My Businesses / My Profile / Log out.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei