7.6 KiB
7.6 KiB
Changelog
All notable changes to History are listed here, newest first.
v0.6.0 — 2026-10-11 18:27
- Advisor fetches now show a "thinking" indicator (mirroring the turn's "Simulating…" hint) while the model responds, and the Ask-advisor button disables during the fetch; the top-bar status shows "Advisor thinking…" in the meantime. Fixes #15.
v0.5.0 — 2026-10-11 17:36
- HUD revamp — removed the "Map" window (the full-screen map is directly interactive via scroll/trackpad; no floating zoom control, and the now-dead
MapApi/onMapReadymap plumbing is removed fromWorldMap); the top bar is now a fixed, non-movable element pinned to top-center a few px from the top (a newpinnedmode onFloatingWindow— viewport-centered, no drag, no persisted position, always above other windows); and the dossier / event-feed / action panels can each be docked into a left or right full-height pane (a newdock/onDockChangemode onFloatingWindow, with small left/right/float controls in each title bar, choice persisted inlocalStorageand reproduced on reload; the default "float" reproduces the current first-run layout exactly). The legend stays a small floating widget. Fixes #4, Fixes #5. FloatingWindow— new optional props:pinned(top-center fixed bar),dock('left'/'right'full-height columns) andonDockChange(renders the dock controls and reports the mode), plusdataTestId(adata-testidon the window root for e2e).anchoris now optional (defaults totop-center).- New
data-testids —top-bar(pinned header),panel-dossier/panel-feed/panel-action(per-window roots), anddock-left/dock-right/dock-float(per-window dock controls). - New localStorage key —
history.floatwin.v1.dock(per-id dock mode); mirrors the existinghistory.floatwin.v1.collapsed. - E2E — new "HUD revamp" suite: asserts the Map window and its zoom buttons are gone, the top bar is pinned and horizontally centered a few px from the top (and doesn't move under a drag attempt), the dossier docks to the left edge (full-height) and the feed to the right edge, and a dock choice survives a page reload — all deterministic under
LLM_STUB=1(11 tests, up from 9).
v0.4.0 — 2026-10-11 16:02
- Fix: queued items disappearing from the pending list (#10). Root cause: SSE
stateevents carried no freshness information, and the client'sonState/onTurnhandlers applied any incoming snapshot unconditionally. A stale snapshot — e.g. the SSE on-connect resync taken just before an add was saved, or an EventSource auto-reconnect — could arrive after the add's REST response and clobber it, so "add one: nothing happens, add another: both appear". Fix: every mutation now bumps a monotonicGameState.version(persisted in SQLite, started at 1 on create, bumped byqueueRoundItem, the newremoveRoundItem, andapplyTurnResult; legacy games without the field are treated as version 0), and the client routes every state ingestion (SSE events, add/remove/jump responses, game loads) through a single "never go backwards" rule: a different game id is always adopted, the same game only when the incoming version is not older than the current one (compared inside the functionalsetGameupdater, so it is stale-closure-proof). - New: remove button for queued items (#11). Each pending-queue row in "Your move" has a small trash-icon button that opens a shadcn
Dialogconfirmation (item quoted, Cancel / destructive Remove, dark command-center styling). Confirming calls the newPOST /api/games/:id/queue/remove(body{ index }) — same fast save → broadcast → respond order as the add routes, no LLM, no turn advance; invalid indices get a 400. The clientapi.removeQueueItem(id, index)is version-gated like every other state update, so the list can never regress after a removal. - Unit tests — new
removeRoundItemtests (valid removal + version bump, out-of-bounds/non-integer →null), version-bump assertions forqueueRoundItem/applyTurnResult/stub turn, a legacy-no-version case, and version round-trip indb.test.ts(39 tests, up from 35). - E2E — new "queue add is never clobbered by a stale SSE snapshot" test (one add appears immediately, still there after a 1s grace period for late SSE events, version strictly increases across adds, queue survives a full page reload) and a "remove with confirmation" test (cancel keeps the item, confirm removes it, no turn advance, version persisted) — all deterministic under
LLM_STUB=1.
v0.3.0 — 2026-10-11 15:29
- Deep-linking — the active game's id now lives in the URL (
#/game/<id>), so a link opens that exact game and two tabs can run two different games; a bad or missing id falls back to the home screen. Fixes #3.
v0.2.0 — 2026-10-11 14:24
- Batched round model — replaced the single-action/turn with a queued-round model. Actions and diplomatic messages accumulate in
game.pending(no LLM call, no turn advance); a single "Jump forward" button commits the whole batch in one LLM turn. This fixes the 502 reliability problem by making each LLM call do one coherent batch of work instead of one tiny fragment. - New routes —
POST /api/games/:id/actionandPOST /api/games/:id/diplomacy(fast, no LLM);POST /api/games/:id/jump(the single LLM call);POST /api/games/:id/turnremoved. - New client API functions —
api.addAction(id, text),api.addDiplomacy(id, to, message),api.jump(id);api.turn(...)removed. - ActionPanel rewrite — Action tab: textarea + small "Add action" button. Diplomacy tab: target select + textarea + small "Add to round" button. Advisor tab: input + "Ask advisor" button. Below the tabs: a visible pending-queue list (⚡ for action, 💬 for diplomacy with target name, truncated text, count badge) and a large "Jump forward" primary button that shows the pending count and disables while a jump is in flight.
- App.tsx —
runAddAction/runAddDiplomacyhandlers (no busy state);runJump(with busy); the "Your move" window's title bar now shows a pending-count badge chip instead of the old jump button. - Deterministic stub updated —
deterministicTurnnow emits one event per queued item (action → military/success, diplomacy → diplomatic/partial) instead of one event per turn; still sets player military toclamp(cur+5)and allies with the first other nation. - Unit tests — rewrote
engine.test.tswith batch-aware tests (7 new tests, 35 total up from 28); updateddb.test.tsandmap.test.tsfixtures to includepending: []. - E2E — rewrote
e2e/sim.spec.tsto the new flow: queue action → assert pending list → queue diplomacy → assert pending list → jump → assert turn+1, date+2, military 80→85, two events, pending cleared, ally relation. - AGENTS.md — added Gitea-issue step to the change process; updated Layout and Conventions to reflect the batched-round model.
v0.1.0 — 2026-10-11 08:02
- Added a Gitea Actions CI pipeline (
.gitea/workflows/ci.yml:typecheck → lint → unit → build → deterministic Playwright e2e). E2e runs against the app's own dev webServer (LLM_STUB=1) — no dind/docker. - Committed
package-lock.jsonso CI uses a reproduciblenpm ci. - Switched to the mandatory PR-based workflow: feature branch → PR to
master→ CI green → auto-merge → tag + manual deploy (documented inAGENTS.md). - Versioned the repo at
0.1.0(package.json) and addedCHANGELOG.md,.env(gitignored) and.env.example. - This change is the first one landed through the new PR process (dogfooding it).