M4: name prompt, connection badge, reconnect and resync #68
Notifications
Due Date
No due date set.
Blocks
Depends on
#69 M4: map tiles, grid and pan/zoom
SirStone/FFF_vtt_frozen
#71 M4: tokens, labels, statuses and lists
SirStone/FFF_vtt_frozen
#74 M4: GM roster, player keys and token panel
SirStone/FFF_vtt_frozen
#67 M4: client shell, sign-in and protocol client
SirStone/FFF_vtt_frozen
Reference: SirStone/FFF_vtt_frozen#68
Reference in New Issue
Block a user
Part of #63
Goal
First-sign-in name, badge states, jittered backoff, full view rebuild after reconnect, two devices in sync.
Acceptance criteria
name-takenvisibledevbox run testgreen on a clean checkout, no test weakened or skipped, and the behaviour above proven at the seam(s) listed under "Proven at".User stories covered
Proven at
reducer connection slice, WS client, e2e
Notes
Landed on
mainas465259c(rebased onto2727617, #65).What shipped (client only, no wire change)
me.name === nullgets#name, no HUD and no Pixi stage (the server sends no scene until named).player.setnameis acked before the secondhello(#33);name-taken,invalidandnot-allowedrender as visible text and the prompt stays. Acceptance triggershello+ the 6.3 resync, so it is asked once and survives a reload.#badge[data-state]:connected/reconnecting/offline.offlineis driven bynavigator.onLineand terminal close outcomes;reconnectingkeeps the stale map on screen.revoked/proto-mismatchstay terminal; pendingreqIds die with the socket; the browseronlineevent skips the remaining wait. A drop keeps the view;helloresets all slices and the resync rebuilds tokens, fog, explored, markers and lists.Proven at
devbox run client-test, 61 tests):test/ws.test.tsschedule + retry state machine + pending drop;test/reducer.test.tsbadge transitions, reconnect reset, name errors.devbox run e2e, 8 tests): newe2e/session.test.mjs— name prompt once + taken name; kill/restart the real server under a live page and assert reconnecting → connected plus the full resync frames (roster, encountered, vision, explored, marker, token, allfull:truewhere applicable);context.setOfflinenetwork drop; two pages on one key.devbox run test157 tests + 19 group evidence OK,devbox run client-test61 OK,devbox run e2e8 OK. Scratchresults/*reverted before push.AC: name prompt once +
name-takenvisible ✓; badge transitions ✓; backoff 1/2/4/8/10 s ± jitter ✓; reconnect restores tokens/fog/explored/markers/lists ✓; two connections live ✓; pending reqIds dropped with the close ✓; fulldevbox run testgreen on a clean checkout, no test weakened or skipped ✓.