Fix mobile white screen when localStorage throws on access (#54) #55

Merged
westfarn merged 1 commits from fix/54-mobile-localstorage-white-screen into master 2026-07-29 03:00:05 -07:00
Owner

Summary

Problem

On mobile browsers, hesychia.ai flashes the UI briefly after login then goes white. Auth startup reads tokens from localStorage without guarding against storage access errors (common in private mode or blocked storage).

Test plan

  • Open hesychia.ai on mobile Safari/Chrome (normal mode) and sign in — dashboard should render
  • Repeat in private/incognito mode — app should not white-screen (may require re-login each session if storage blocked)
  • Verify existing web login/logout still works on desktop
  • Run npm test -- tokenStorage in llm-fe
## Summary - Closes #54 - Add `getLocalStorageSafe()` helper in `tokenStorage.js` to handle browsers that expose `localStorage` but throw `SecurityError` on access - Wrap all JWT token get/set/remove calls in try/catch so auth bootstrap no longer crashes React on mobile ## Problem On mobile browsers, hesychia.ai flashes the UI briefly after login then goes white. Auth startup reads tokens from `localStorage` without guarding against storage access errors (common in private mode or blocked storage). ## Test plan - [ ] Open hesychia.ai on mobile Safari/Chrome (normal mode) and sign in — dashboard should render - [ ] Repeat in private/incognito mode — app should not white-screen (may require re-login each session if storage blocked) - [ ] Verify existing web login/logout still works on desktop - [ ] Run `npm test -- tokenStorage` in `llm-fe`
westfarn added 1 commit 2026-07-29 02:41:59 -07:00
Fix mobile white screen when localStorage throws on access (#54).
Unit Tests / test (pull_request) Successful in 25s
4d00131854
Guard JWT token reads/writes so auth bootstrap no longer crashes React when mobile browsers block storage.
westfarn merged commit 103ca2c5e4 into master 2026-07-29 03:00:05 -07:00
westfarn deleted branch fix/54-mobile-localstorage-white-screen 2026-07-29 03:00:05 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_web_app#55