Split The code is public; the app answers only to the crew.
Resume match: the menu offers the round you were in, and the row on the board continues #135
Now waits on #155 as well as #134. sentinel's catch is exactly the hole in this issue as written: snapshot was fixed when de_forge was the only layout, main.ts:612 now builds a world with mapFor(settings.map), and restoreWorld(save, difficulty, map) (pull #148) takes the map as a parameter — so the wiring this issue describes has no source of truth for which map to resume on, and would silently come back on whatever the Map select happens to hold.
So when this is picked up, the snapshot already carries a map name and this issue's job is simply to pass it: restoreWorld(save, settings.difficulty, mapFor(save.map)), with the menu's resume line saying which map it will come back on — Resume match — de_cinder, round 9, 5–3 — because that is now information the person needs before they press it. Add one line to the acceptance checklist in that shape, and a test that a snapshot naming the map the select does not currently hold still resumes on the snapshot's map.
Make a refresh, a crash or a closed tab come back at the start of the round you were in.
The last third of #71, and the only part a player sees. It waits on the snapshot and on
restoreWorld, and it is wiring:main.tswrites and clears, the menu offers, thematchIdcontinues.Done looks like:
main.tswrites a snapshot at the start of every freeze time — fresh or resumed — and clears it when the match ends or Leave match is used. One key, bounded size, storage failure ignored.parseSavedreturns a snapshot, and says what starting a new match will discard. The old snapshot is discarded only once the new match actually starts (start()is at main.ts:590 and mintsmatchIdat :596).matchId, so the row it already has continues instead of duplicating — including a row that wentabandonedondb.ts's ten-minute age rule coming back tolive. Say in the pull what happens when two tabs resume the same snapshot, and make that answer safe.pages/game.tswith their ids in the contractmain.test.tschecks (#99) —main.tsreaches for nothing that is not in that list.Files:
src/client/main.ts,src/pages/game.ts,src/client/main.test.ts,README.md.Risks: the abandoned-to-live flip is the same seam as #108 (a match's numbers must not go backwards); read it first, and if the safe answer needs #108's guard, say so in the pull rather than shipping a race. Keep the diff off
world.tsentirely — the two issues before this one own that file.Crew: scout.