Skip to content

fix: make app boot recover instead of hanging on the loader - #337

Merged
Makisuo merged 2 commits into
mainfrom
fix/durable-app-boot
Oct 15, 2026
Merged

Makisuo merged 2 commits into
mainfrom
fix/durable-app-boot

fix(web): keep shapes syncing through a token exchange outage

8785304
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 15, 2026 in 6m 13s

Confidence 9/10 · No issues found

🟢 Confidence 9/10 · safe to merge
Session- and org-gate changes touch auth-adjacent state, but each risky path has a story test I traced through the update and view code.
quality 100/100 · no findings · tests covered · risk medium

The boot path now surfaces failures instead of hanging: live queries report a stall, the org gate has explicit Found/NotFound/Stalled states, stalled loaders offer a reload, and an unreachable API no longer signs the user out. Contained, and pinned by tests that exercise each of those paths.

  • readSession fails when the API cannot answer instead of silently returning SignedOut
  • liveQueryStream takes onStalled, and appLoader shows a note plus a Reload button
  • orgLoad (Found/NotFound/Stalled) replaces loadedOrgSlug, and an unknown workspace shows a not-found page
  • electricOnError retries a 401 with a fresh token and stops the shape on other errors
What was checked
  • readBrowserSession still returns SignedOut for a missing session (auth.ts:24-28), so dropping orElseSucceed cannot strand a signed-out browser on the loader
  • StalledOrganization ignores a stall once the slug is Found/NotFound (main.ts:502-509), matching the root story test
  • isCurrentUserStalled is read by the view (view.ts:164), so the stalled user.me loader does offer reload

8785304 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.