diff options
Diffstat (limited to 'PLAN.md')
| -rw-r--r-- | PLAN.md | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -298,14 +298,14 @@ changes, room sections, spectator view. *First end-to-end moment.* ### Phase 7 — Hardening and shipping -- [ ] E2E (Playwright): two players + one spectator, a full round including secret +- [x] E2E (Playwright): two players + one spectator, a full round including secret initiative, claim/re-claim, reconnect -- [ ] Resilience: stale tabs, late updates, slow networks, server restart mid-game -- [ ] Performance: state payload size, WS bandwidth under a full table, asset caching +- [x] Resilience: stale tabs, late updates, slow networks, server restart mid-game +- [x] Performance: state payload size, WS bandwidth under a full table, asset caching headers for the 66 MB image set -- [ ] `Dockerfile` (server + built web) + deployment notes -- [ ] User-facing quickstart/README, smoke-test list -- [ ] Final cross-check pass against the reference app (feature list from Phase 5) +- [x] `Dockerfile` (server + built web) + deployment notes +- [x] User-facing quickstart/README, smoke-test list +- [x] Final cross-check pass against the reference app (feature list from Phase 5) **Milestone M7** — release. @@ -333,6 +333,7 @@ changes, room sections, spectator view. *First end-to-end moment.* | 2026-11-16 | **Phase 4 complete / M4 reached** — full card play in the browser. Client: the line renderer + in-game translations (`$lib/game/line/`, `gameI18n.ts`), card components (stat / monster-ability / modifier / loot, `ModifierCard` gfx resolver incl. `P<n>` perk graphics), monster ability decks (row card slot, deck menu — reveal top cards, draw extra, extra shuffle, activate/inactivate, drag-reorder, remove — and card zoom), the full AMD suite (`ModifierDeckWidget` + `ModifierDeckHeader` + `ModifierDeckMenu` with the six submenus — send-to-bottom, remove AMD, removed pile, faction cards, perks, plus zoom; imbue 1/2, ±1/−2/+0, reveal with the Cassandra 8-button cap, bad omen, corrosive spew, Hail/Cassandra specials, faction unlock, CS sanctuary/party cards), the loot deck (widget, cards menu — set owner, per-character loot totals, add card, enhance with the reference material/herb/coin splits, special cards 1418/1419, return top/bottom), and the bottom `DeckArea` (loot deck left; character-deck toggle with the reference open-state cycling; ally deck behind `shouldShowAlliesDeck`; global deck). Pure helper modules (`rules.ts`, `modifierDeck.ts`, `perks.ts`, `cards/lootCard.ts`) ported from the reference with unit tests. Server: all deck/loot/modifier/ability commands were already registered and tested in Phases 1–2 (592 tests green). `svelte-check` 0 errors; web build OK; 177 client tests green. | | 2026-11-17 | **Phase 5 complete / M5 reached** — full game feature set. Web: note rows end-to-end (create/edit menu — text, 12-swatch colour palette, link to player/monster with per-standee selection, delete — with the reference's create-vs-edit commit semantics; row rendering with the target's class colour / red-blue monster bases, lighten-toward-white gradient, link indent + connector, standee "N:"/"All:" prefixes, luminance-based text colour, tap-to-edit; whole-list drag-to-reorder → `reorderList`; quick per-figure note via `setFigureNote` from the status menu), special monster handling (Ice Wraith "Switch Form" behind the `deck == "Ice Wraith"` gate; summon mark toggle with the round-green / summon-gfx standee artwork + standee-nr badges and per-owner grayscale; character summon boxes above the row + AddSummonMenu — class summons gated by level and standee cap, item summons from `summons.json`, colour swatches + standee numbers → `addStandee … addAsSummon`), ally deck show/hide in the main menu (gated by `shouldShowAlliesDeck`), settings "clear unlocked" + Special Unlocks menu (4 unlockables, "???" while locked), and AddSectionMenu parity (case-insensitive search, the `findNrFromScenarioName` numeric ordering with string-compare fallback, added sections greyed + no-op, "Add Random Dungeon Card" label). Data layer: `SummonModel` + `ClassData.summons` + `summons()` fetch in `gameData.ts`. Server: added `unlock_special_command_test` (the only command missing a test — ally-deck-hide and remove-sanctuary were already covered in their consolidated files). Cross-check against the reference confirmed scenario rules are complete server-side (Timer round-1 spawns merged into the start room via `_applyRound1Spawns`, Timer notes, battle-goal reminder, `initialMessage` → `toastMessage` → web toast, Objective/Escort/AllyDeck/ResetRound/Unlock/RandomSections all handled). Verification: web 177/177 tests, `svelte-check` 0 errors; server suite green; full CI (dart analyze + test, web check + test + build) passing. | | 2026-11-19 | **Phase 6 complete / M6 reached** — settings, saves, localization parity. Server: `Settings.forClient()` payload (11 game fields + `style` enum index + `locale` + `saves`/`characterSaves` name lists — save content never crosses the wire), player-gated settings/save commands behind new wire messages (`setSetting` / `save` / `loadSave` / `deleteSave` / `saveCharacter` / `loadCharacterSave` / `deleteCharacterSave` + a `settings` broadcast), `historyLength` + `undoDescription`/`redoDescription` on `welcome`/`update`, and the ported 10-locale command descriptions. Web: `settings.ts` split (`serverSettings` from the wire vs `clientSettings` → `localStorage` with a corrupt/partial-tolerant, field-by-field typed merge), the settings menu rebuilt faithfully (locale selector with native names — locale change also syncs the server; style radios; scaling sliders; power-mode radios + ⓘ info; ally-deck toggle via `setAllyDeckInOgGloom`; clear-unlocked + special unlocks; the Load/Save State entry), multi-save menus (`SaveMenu` + `SaveModalMenu` — suggested name `campaign+nr`, rename = delete-then-save, load is the undoable `LoadSaveCommand`) and character saves (`SaveCharacterMenu` + `SaveCharacterModalMenu`, entered from the add/remove-character menus via class icons, restore = identity only with fresh battle state), undo/redo buttons labeled from the server history metadata (`undoWithDescription`), all 10 locale tables ported (new `i18n.test.ts` parity suite), the idle dimmer (15 s → 0.65 scrim, 1.2 s fade, any input/tap/visibility wakes it), scaling via CSS variables (`--list-scale`/`--bar-scale`), reduce-power mode (`[data-power='reduce']` kills box-shadows), and the visibility gates (`hideLootDeck`, `showAmdDeck` ↔ client `showCharacterAMD`, `showScenarioNames`, `showCustomContent` in the campaign picker and the custom conditions). Documented web adaptations: bar scaling via CSS `zoom` instead of a constrained content width, a 400px list baseline (reference: 740px on full-screen mobile), bar-scaling default 1.0, three style radios (reference offers two, the shared `Style` enum has three), locale synced through the settings dropdown. Omitted reference entries (no web analogue): dark-mode toggle, soft numpad, health wheel, network section. Verification: **web 195/195 tests** (14 files, incl. new `settings.test.ts` and `i18n.test.ts`), `svelte-check` 0 errors (94 pre-existing idiomatic warnings), `vite build` OK; server **604 tests green** (13 new in `test/net/settings_test.dart`). | +| 2026-11-22 | **Phase 7 complete / M7 reached** — hardening and shipping. **E2E** (Playwright, `e2e/`): a `table` fixture boots a real compiled server per test (temp saves dir, free port, `workers: 1`) and a `Tab` helper drives the real UI (menus, rows, initiative, draw, seats) against one real WS per fresh browser context (= one session). **9 specs green**: a full round (onboarding, secret initiative masked to `??` per connection, draw revealing on every screen, turns, next round, round-2 secrecy); seat claim / re-claim / reload (owner-leave releases the seat for re-claim; a reload keeps the session and re-claims; two sessions can't own one character); resilience (a dropped tab resyncs on reconnect — no drift; a SIGKILL'd server restarts with state **and** seats surviving, incl. the owner's secret initiative and enabled draw; a throttled tab converges on the same state as the fast tabs; a double-tapped draw runs once with the error sent only to the sender); and character level + rename from the status menu. **Session persistence (root-cause fix found by the restart test):** a client never learned its session id before the first `welcome`, so a reconnect minted a new id and orphaned the persisted/restored seat — fixed with `establishSessionCookie()` (a `GET /session` before the WS upgrade, with a vite `/session` proxy) so the upgrade carries the `x-haven-session` cookie and the server's `resolve()` re-adopts the restored seat. Also seeded the initiative input from re-synced state (the `CharacterRow` prefill `$effect`, guarded against clobbering a live edit) so a reload/reconnect doesn't blank an entry. **Cross-check vs the reference** (registry ↔ UI command-surface diff): every one of the 82 registered commands is reachable from the web UI (incl. `changeHealth`/`changeMaxHealth`/`changeXP`/`addCondition`/`removeCondition` via the StatusMenu `change()`/`toggleCondition()` helpers, amdImbue*/corrosiveSpew in the AMD header, and `trackStandees` via the `noStandees` setting). Four genuine gaps closed: `setCharacterLevel` + `changeName` (level pills + a name field in the StatusMenu, mirroring the reference `SetCharacterLevelMenu`) and the draw-pile-only "send to bottom" (`reorderAbilityList` → index 0) + "shuffle undrawn cards" (`shuffleDrawnAbilityCard`) in the ability-card removal confirm (mirroring `RemoveCardMenu`). **Resilience / deployment:** `Dockerfile` (3-stage: server + built web), `docs/DEPLOYMENT.md` (incl. a measured performance table via `server/tool/perf_measure.dart` and a 10-step smoke-test list), README quickstart + production/Docker/testing sections, and immutable asset-cache headers for the image set. Verification: **web 196/196 tests**, `svelte-check` 0 errors (93 pre-existing idiomatic warnings), `vite build` OK; **E2E 9/9 green** (~17 s). | ## 7. Risks and open items |
