feat(socket): reconnect host and candidates with stable identity (#1) #25
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: jeux/le-grand-concours#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/1-reconnect-participants"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements ticket #1 — stable participant identifiers and reconnection tokens for the host (MJ) and candidates.
Changes
socket.id: each participant (host included) gets a stableid+ secrettoken(crypto.randomUUID). The socket id is now a live binding reassigned on every (re)connection. Round 2 structures keyed byplayer.idsurvive reconnects unchanged.RECONNECT_GRACE_SECONDS = 30s): disconnection flags the participant offline and defers removal. A host drop keeps the room open so it can be resumed.room:resume { code, token }event; the client persists its identity inlocalStorageand replays it on everyconnect. Invalid/expired token →room:error("Session expirée"), local session cleared.myId,hostConnected, per-candidateconnected; the client resolves "me" viamyIdinstead ofsocket.id, with offline indicators.Verification (local, all green)
node:test82 pass / 1 skip (incl. 3 reconnection integration scenarios)useSocket.test.ts); coverage above floors and improvedDocs updated:
docs/Implémentation.mdanddocs/Regles.md.Refs #1