strat-gameplay-webapp/frontend-sba/composables
Cal Corum ee12f6210e CLAUDE: Fix WebSocket SSR hydration and add connection debugging
Problem: WebSocket wouldn't connect on page load because Pinia auth
state doesn't automatically transfer from SSR to client hydration.
The auth store showed isAuthenticated=false on client mount.

Solution:
- useWebSocket.onMounted now proactively calls checkAuth() if not authenticated
- This ensures auth state is initialized before attempting WebSocket connection
- Added forceReconnect() function to clear stale singleton connections

Debug UI (temporary):
- Added connection status debug info to loading overlay and banner
- Shows Auth/Connected/Connecting/Error states
- Retry button triggers auth check + reconnect

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 23:33:11 -06:00
..
CLAUDE.md CLAUDE: Fix cookie security and SSR data fetching for iPad/Safari 2025-11-27 21:06:42 -06:00
useGameActions.ts CLAUDE: Add Undo Last Play feature for game rollback 2025-11-27 21:34:48 -06:00
useWebSocket.ts CLAUDE: Fix WebSocket SSR hydration and add connection debugging 2025-11-27 23:33:11 -06:00