[PR #8212] [MERGED] Game Mode playtest fixes: combat setup errors, weapon rows, board, party summary, update prompt #8189

Closed
opened 2026-10-25 04:04:34 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8212
Author: @kolacheee
Created: 10/23/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @kolacheee

Base: staging ← Head: claude/game-mode-cloud-nx3wjf


📝 Commits (10+)

  • aeb1d82 Game combat: show why a fight setup failed, and stop duplicate held weapon rows
  • 2e72652 Game combat board: a live creature is drawn over a body, and an area aim takes two clicks
  • f39436e Game combat: log the setup's early refusals too, and say a touch aim takes a second tap
  • 3e41bd6 Merge remote-tracking branch 'up/staging' into claude/game-mode-cloud-nx3wjf
  • 1cdde3b Game sheets: a party command's record names every member
  • cbeca1a Merge remote-tracking branch 'up/staging' into claude/game-mode-cloud-nx3wjf
  • 6f2364d Game combat: a setup that throws is logged on the refusal line, and laid shapes need no extra tap
  • 40a6064 Merge remote-tracking branch 'up/staging' into claude/game-mode-cloud-nx3wjf
  • b577920 App update: no refresh prompt for a page that already runs the served build
  • c585b97 Game Mode: a ring waits for its confirming tap, refusals stay whole, and the build probe gives up

📊 Changes

24 files changed (+417 additions, -50 deletions)

View changed files

📝 packages/client/src/components/game/DraggablePanel.tsx (+34 -0)
📝 packages/client/src/components/game/GameMap.tsx (+11 -2)
📝 packages/client/src/components/game/GameNarration.tsx (+8 -1)
📝 packages/client/src/components/game/GameSurface.tsx (+7 -2)
📝 packages/client/src/components/game/RulesetCombatBoard.tsx (+16 -4)
📝 packages/client/src/lib/combat-setup-failures.ts (+10 -0)
📝 packages/client/src/lib/ruleset-combat-board.ts (+14 -2)
📝 packages/client/src/lib/ruleset-combat-menu.ts (+2 -1)
📝 packages/client/src/lib/runtime-build.ts (+36 -0)
📝 packages/client/src/localization/locales/en.json (+3 -2)
📝 packages/client/src/main.tsx (+15 -5)
📝 packages/server/src/routes/encounter.routes.ts (+29 -17)
📝 packages/shared/src/features/combat-director.ts (+21 -0)
📝 packages/shared/src/features/ruleset-combat/encounter.ts (+9 -2)
📝 packages/shared/src/features/rulesets/sheet-commands.ts (+2 -7)
📝 packages/shared/src/utils/sheet-command-tag.ts (+21 -2)
➕ scripts/regressions/app-update-served-build.regression.ts (+42 -0)
📝 scripts/regressions/combat-boss-provider.regression.ts (+43 -1)
➕ scripts/regressions/game-combat-setup-dropped.regression.ts (+15 -0)
📝 scripts/regressions/game-ruleset-combat-damage-modifiers.regression.ts (+6 -0)

...and 4 more files

📄 Description

Linked issue

Closes #8211

Why this change

  • A fight setup could end with "Combat generation failed." and no reason, while the server logged a successful setup. Reloading the page mid-setup was enough: the old page's dropped request was saved as this turn's failure, and the reloaded page showed it instead of asking again.
  • A fight setup was refused outright when the model wrote range: 0 for a self ability (Second Wind, Cunning Action): "Invalid combat AI data: Number must be greater than or equal to 1".
  • A weapon both listed as an attack and held on the sheet appeared twice in the combat menu, and the listed copy ignored finesse.
  • A live creature that walked onto a fallen creature's square disappeared from the board.
  • A single click cast an area spell, though the hint said to press Enter, so a misclick could not be caught.
  • A whole-party long rest for four characters left the last one out of its summary, which read as if they had not rested.
  • "A Marinara update is ready. Refresh" appeared after every server restart, even on a page loaded after the new build was already serving.
  • The map panel opened over the fight board at the start of every fight and had to be folded again each time.

What changed

  • Every refused combat setup, from the missing-field check to a call that throws, logs exactly one [game/combat:init] chatId=… refused: <reason> line, and a finished one logs ready: party=N enemies=N.
  • The failure banner shows the reason ("Combat generation failed: …"), except for a cut-off answer, which keeps its own message.
  • A request the browser dropped (reload, closed tab, lost connection) is no longer remembered as the turn's failure, so reopening the chat asks again.
  • In a fight setup only, an ability's range, area radius, slot level and legendary cost are held to their bounds (range 0 becomes 1), and a value that is not a number is left out, instead of refusing the setup. The round route and saved fights still refuse an ability out of bounds. The setup prompt says an ability used on oneself takes range 1 or none.
  • An attack row whose name matches a held weapon is left out; the held weapon's action (which picks the better ability for finesse) stays.
  • The board draws a creature still up over one that is down, and one that is down over a body.
  • A single-pick area aim takes two clicks or taps: the first picks the square and shows who it catches, the second (or Enter) casts it. Both aim hints say so. A ring chosen in the menu waits the same way. Shapes laid over several picks (walls, further parts) are confirmed by their last pick, as before.
  • A party sheet command's summary has room for every member; anything that still does not fit ends with "and N more", which only ever counts members it applied to. Every refusal is named in full.
  • A waiting service worker asks the server which build it serves before prompting (giving up after 10 seconds); when the page is already that build, the new worker takes over quietly.
  • The map panel remembers whether it was folded, per chat, and starts folded during a fight.
  • Regressions: game-combat-setup-dropped and app-update-served-build (new), refusal logging in combat-boss-provider, ability bounds in ruleset-combat-director-route, a held-and-listed case in game-ruleset-combat-damage-modifiers, a shared-square case in game-ruleset-combat-footprints, the ring and multi-pick aims in ruleset-combat-screen-client, and a four-member rest plus a refusal summary in game-ruleset-live.

Validation

  • Shared/server/client typecheck, client lint, locale check, and the attack, item, weapon, board, footprint, sheet, rest, setup and update regressions pass locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Not run in a browser from here. Every bug here was found in a laptop playtest, and the setup-reason banner, the board and the update prompt fixes were re-tested there.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8212 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `claude/game-mode-cloud-nx3wjf` --- ### 📝 Commits (10+) - [`aeb1d82`](https://github.com/Pasta-Devs/Marinara-Engine/commit/aeb1d82f4d4b72fb0f10e97833982de7beaf967a) Game combat: show why a fight setup failed, and stop duplicate held weapon rows - [`2e72652`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2e726526574b93ffb214f2c38fe5d9be293ac7c3) Game combat board: a live creature is drawn over a body, and an area aim takes two clicks - [`f39436e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f39436e7cfefa14d01dc966f2fbf7579c5a41f90) Game combat: log the setup's early refusals too, and say a touch aim takes a second tap - [`3e41bd6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3e41bd68563d81ab11197be3bdc7e36ec64d139b) Merge remote-tracking branch 'up/staging' into claude/game-mode-cloud-nx3wjf - [`1cdde3b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1cdde3b14c3e87d80ff01c6bd406482185e15ee4) Game sheets: a party command's record names every member - [`cbeca1a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cbeca1a1de690570d66ab7eae76c7c7724a55bc8) Merge remote-tracking branch 'up/staging' into claude/game-mode-cloud-nx3wjf - [`6f2364d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6f2364d0fa12775ca68243bf1eff12f5bc5930c5) Game combat: a setup that throws is logged on the refusal line, and laid shapes need no extra tap - [`40a6064`](https://github.com/Pasta-Devs/Marinara-Engine/commit/40a60645bad505c3596bbd1711ae98543cf9321d) Merge remote-tracking branch 'up/staging' into claude/game-mode-cloud-nx3wjf - [`b577920`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b577920f392d349f83a7730e28413051b0d62343) App update: no refresh prompt for a page that already runs the served build - [`c585b97`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c585b97a091d57974f7ec00b901e850ade37a9a3) Game Mode: a ring waits for its confirming tap, refusals stay whole, and the build probe gives up ### 📊 Changes **24 files changed** (+417 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/game/DraggablePanel.tsx` (+34 -0) 📝 `packages/client/src/components/game/GameMap.tsx` (+11 -2) 📝 `packages/client/src/components/game/GameNarration.tsx` (+8 -1) 📝 `packages/client/src/components/game/GameSurface.tsx` (+7 -2) 📝 `packages/client/src/components/game/RulesetCombatBoard.tsx` (+16 -4) 📝 `packages/client/src/lib/combat-setup-failures.ts` (+10 -0) 📝 `packages/client/src/lib/ruleset-combat-board.ts` (+14 -2) 📝 `packages/client/src/lib/ruleset-combat-menu.ts` (+2 -1) 📝 `packages/client/src/lib/runtime-build.ts` (+36 -0) 📝 `packages/client/src/localization/locales/en.json` (+3 -2) 📝 `packages/client/src/main.tsx` (+15 -5) 📝 `packages/server/src/routes/encounter.routes.ts` (+29 -17) 📝 `packages/shared/src/features/combat-director.ts` (+21 -0) 📝 `packages/shared/src/features/ruleset-combat/encounter.ts` (+9 -2) 📝 `packages/shared/src/features/rulesets/sheet-commands.ts` (+2 -7) 📝 `packages/shared/src/utils/sheet-command-tag.ts` (+21 -2) ➕ `scripts/regressions/app-update-served-build.regression.ts` (+42 -0) 📝 `scripts/regressions/combat-boss-provider.regression.ts` (+43 -1) ➕ `scripts/regressions/game-combat-setup-dropped.regression.ts` (+15 -0) 📝 `scripts/regressions/game-ruleset-combat-damage-modifiers.regression.ts` (+6 -0) _...and 4 more files_ </details> ### 📄 Description ## Linked issue Closes #8211 ## Why this change - A fight setup could end with "Combat generation failed." and no reason, while the server logged a successful setup. Reloading the page mid-setup was enough: the old page's dropped request was saved as this turn's failure, and the reloaded page showed it instead of asking again. - A fight setup was refused outright when the model wrote `range: 0` for a self ability (Second Wind, Cunning Action): "Invalid combat AI data: Number must be greater than or equal to 1". - A weapon both listed as an attack and held on the sheet appeared twice in the combat menu, and the listed copy ignored finesse. - A live creature that walked onto a fallen creature's square disappeared from the board. - A single click cast an area spell, though the hint said to press Enter, so a misclick could not be caught. - A whole-party long rest for four characters left the last one out of its summary, which read as if they had not rested. - "A Marinara update is ready. Refresh" appeared after every server restart, even on a page loaded after the new build was already serving. - The map panel opened over the fight board at the start of every fight and had to be folded again each time. ## What changed - Every refused combat setup, from the missing-field check to a call that throws, logs exactly one `[game/combat:init] chatId=… refused: <reason>` line, and a finished one logs `ready: party=N enemies=N`. - The failure banner shows the reason ("Combat generation failed: …"), except for a cut-off answer, which keeps its own message. - A request the browser dropped (reload, closed tab, lost connection) is no longer remembered as the turn's failure, so reopening the chat asks again. - In a fight setup only, an ability's range, area radius, slot level and legendary cost are held to their bounds (range 0 becomes 1), and a value that is not a number is left out, instead of refusing the setup. The round route and saved fights still refuse an ability out of bounds. The setup prompt says an ability used on oneself takes range 1 or none. - An attack row whose name matches a held weapon is left out; the held weapon's action (which picks the better ability for finesse) stays. - The board draws a creature still up over one that is down, and one that is down over a body. - A single-pick area aim takes two clicks or taps: the first picks the square and shows who it catches, the second (or Enter) casts it. Both aim hints say so. A ring chosen in the menu waits the same way. Shapes laid over several picks (walls, further parts) are confirmed by their last pick, as before. - A party sheet command's summary has room for every member; anything that still does not fit ends with "and N more", which only ever counts members it applied to. Every refusal is named in full. - A waiting service worker asks the server which build it serves before prompting (giving up after 10 seconds); when the page is already that build, the new worker takes over quietly. - The map panel remembers whether it was folded, per chat, and starts folded during a fight. - Regressions: `game-combat-setup-dropped` and `app-update-served-build` (new), refusal logging in `combat-boss-provider`, ability bounds in `ruleset-combat-director-route`, a held-and-listed case in `game-ruleset-combat-damage-modifiers`, a shared-square case in `game-ruleset-combat-footprints`, the ring and multi-pick aims in `ruleset-combat-screen-client`, and a four-member rest plus a refusal summary in `game-ruleset-live`. ## Validation - [x] Shared/server/client typecheck, client lint, locale check, and the attack, item, weapon, board, footprint, sheet, rest, setup and update regressions pass locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Not run in a browser from here. Every bug here was found in a laptop playtest, and the setup-reason banner, the board and the update prompt fixes were re-tested there. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-25 04:04:34 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8189
No description provided.