fix(session): WebSocket auto-reconnect with exponential backoff (#18) - #125
fix(session): WebSocket auto-reconnect with exponential backoff (#18)#125angelTomo9 wants to merge 4 commits into
Conversation
…n visibility, and scale backoff to 10s
Code Review ✅ Approved 3 resolved / 3 findingsImplements WebSocket auto-reconnect with exponential backoff and visibility recovery, addressing the missing close code check, retry counter reset, and 10s backoff scaling findings. No issues found. ✅ 3 resolved✅ Edge Case: Reconnect fires on every close, ignoring close code/reason
✅ Bug: Visibility/online recovery doesn't reset exhausted retry counter
✅ Quality: Backoff never reaches the documented 10s maximum
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Important Your trial ends in 7 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
Closes #18
Summary of Changes
Implements automatic WebSocket reconnection with exponential backoff and network/visibility recovery in
frontend/components/game/session/useGameSession.ts.Features & Improvements
error: "Reconectando (N/5)..."withconnecting: trueso players are visually informed of ongoing recovery attempts.visibilitychange(returning from background / screen lock) andonlineevents to trigger immediate connection verification if closed.Summary by Gitar
npcs.jsonwithout UTF-8 BOM to unblock CI and market testsThis will update automatically on new commits.