- Shipped
- August 26, 2026 at 6:12 AM UTC
- Author
- kamo
- Commit
- 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.