• Mahmoud Aglan's avatar
    fix: Phase 1 + 5 — chess multiplayer bugs, lobby race conditions, UX fixes · c508fdfb
    Mahmoud Aglan authored
    Phase 1 (Chess Multiplayer Bulletproof):
    - net.js: check content-type before JSON parse, clear error on HTML responses
    - modal.js: stack-based resolve — stacked modals no longer hang
    - match-session.js: fix null dereference after destroy, remove listener on cleanup
    - match-session.js: only fire onConnectionRestored after actual disconnect
    - lobby.js: prevent duplicate startGame calls with gameStarted flag
    - lobby.js: add pollInFlight guard, clear timeouts on unmount
    - lobby.js: derive color from match data when undefined (friend invite fix)
    - scene.js: queue navigation during transition instead of dropping it
    - chess/game.js: pass timeControl to result scene for correct rematch
    
    Phase 5 (Core UX):
    - table.js: hide "My Games" button for non-chess games (no history scenes)
    - queue.js: add polling overlap guard
    - profile/view.js: show "Unrated" for new players instead of 1200
    - i18n: add profile.unrated key (ar/en)
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    c508fdfb
net.js 3.39 KB