Fix mobile white screen: stop Outlet Date.now() remount loop (#54) #56

Merged
westfarn merged 1 commits from fix/54-outlet-date-now-remount into master 2026-07-29 04:04:35 -07:00
Owner

Summary

  • Follow-up for #54 (localStorage guard in #55 did not fix mobile white screen)
  • Confirmed in production bundle: ProtectedRoutes rendered <Outlet key={Date.now()} />
  • That remounts the entire authenticated tree on every parent re-render (account fetch, WebSocket connect/status, conversations, messages)
  • On mobile this shows as: brief UI flash → solid white page (matches screen recording)
  • Also memoize styled-components theme in GlobalThemeWrapper so ParticleBackground does not tear down/restart its canvas on unrelated re-renders

Evidence

Production JS currently contains:

e?(0,ma.jsx)(a.sv,{},Date.now()):(0,ma.jsx)(a.C5,{to:"/signin/",replace:!0})

i.e. authenticated → <Outlet key={Date.now()} />

Test plan

  • Mobile Vivaldi/Chrome: sign in on hesychia.ai → dashboard stays visible (header, conversations toggle, input)
  • Pull-to-refresh while logged in → UI returns and stays
  • Desktop login still works; switching conversations / WS reconnect does not blank the page
  • Open mobile menu / Conversations sidebar still works
## Summary - Follow-up for #54 (localStorage guard in #55 did not fix mobile white screen) - Confirmed in production bundle: `ProtectedRoutes` rendered `<Outlet key={Date.now()} />` - That remounts the entire authenticated tree on **every** parent re-render (account fetch, WebSocket connect/status, conversations, messages) - On mobile this shows as: brief UI flash → solid white page (matches screen recording) - Also memoize styled-components theme in `GlobalThemeWrapper` so `ParticleBackground` does not tear down/restart its canvas on unrelated re-renders ## Evidence Production JS currently contains: ```js e?(0,ma.jsx)(a.sv,{},Date.now()):(0,ma.jsx)(a.C5,{to:"/signin/",replace:!0}) ``` i.e. authenticated → `<Outlet key={Date.now()} />` ## Test plan - [ ] Mobile Vivaldi/Chrome: sign in on hesychia.ai → dashboard stays visible (header, conversations toggle, input) - [ ] Pull-to-refresh while logged in → UI returns and stays - [ ] Desktop login still works; switching conversations / WS reconnect does not blank the page - [ ] Open mobile menu / Conversations sidebar still works
westfarn added 1 commit 2026-07-29 04:03:34 -07:00
Fix mobile white screen from Outlet remount loop (#54).
Unit Tests / test (pull_request) Successful in 25s
4e32abc788
Stop keying protected routes with Date.now(), which remounted the dashboard on every context update, and memoize the styled-components theme so ParticleBackground stops restarting each render.
westfarn merged commit e6ae9d6b1e into master 2026-07-29 04:04:35 -07:00
westfarn deleted branch fix/54-outlet-date-now-remount 2026-07-29 04:04:35 -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#56