[PR #8322] [MERGED] Game: later turns' buy notices are shown, and a party health widget follows the sheets #8272

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

📋 Pull Request Information

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

Base: staging ← Head: fix/later-turn-notices-health-widget


📝 Commits (4)

  • 5b7624a fix(game): a later turn's buys and refusals are announced, whatever an earlier turn announced
  • f8f502d feat(game): a party health widget follows the sheets without a widget tag
  • 269486c fix(game): a health track names no widget rows; health words in any script; rows of one name settle
  • 0c860e5 Merge remote-tracking branch 'origin/staging' into fix/later-turn-notices-health-widget

📊 Changes

6 files changed (+481 additions, -0 deletions)

View changed files

➕ e2e/game-inventory-later-turn.e2e.ts (+105 -0)
➕ e2e/game-widget-health-sync.e2e.ts (+67 -0)
📝 packages/client/src/components/game/GameSurface.tsx (+41 -0)
📝 packages/shared/src/features/rulesets/combat-bridge.ts (+23 -0)
📝 packages/shared/src/utils/game-widget-update.ts (+84 -0)
➕ scripts/regressions/game-widget-party-health-sync.regression.ts (+161 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #8321

Why this change

  • A refused buy on a later turn ("cannot-afford") was never told to the player, though the reply carried it.
  • A party health widget row ("Ulfgar HP") kept the GM's last tagged value while the sheet moved on.

What changed

  • A new turn starts its record of announced narration segments afresh, so a later turn's buys and refusals at a segment an earlier turn announced at are shown.
  • In a game whose ruleset names what a fight damages (battle.health), a party health widget row is brought to the sheet whenever the sheet or the widgets change: " HP" (or Health, Hit points, Vitality, or the ruleset's own word such as Grit) in any stat block, or the bare name in a widget about health. A row keeps the shape it was written in ("36/36" or a number); a word, an unknown name, or a first name two members share is left alone. The synced widgets are saved, so the GM reads them too. New shared helpers: partyHealthWidgetUpdates, rulesetSheetHealth.

Validation

  • pnpm check passes 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

  • New e2e game-inventory-later-turn (plain and rolled later turn): fails without the fix, passes with it; game-rolled-turn-buys still passes.
  • New e2e game-widget-health-sync (Ember Roads, Juno at 0 Grit, widget seeded at 99/99): the row reads 0/11 on screen and in saved metadata; the Luck row is untouched.
  • New regression game-widget-party-health-sync.

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)

UI evidence (if applicable)

None beyond the e2e screenshots.


🔄 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/8322 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/later-turn-notices-health-widget` --- ### 📝 Commits (4) - [`5b7624a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5b7624abb196f5be870a16026bf9464ad3b7f15e) fix(game): a later turn's buys and refusals are announced, whatever an earlier turn announced - [`f8f502d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f8f502d744651b982e90a9865c98cc4111d103d2) feat(game): a party health widget follows the sheets without a widget tag - [`269486c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/269486cbabe35b7cadac4db7494f89d8f3f6031f) fix(game): a health track names no widget rows; health words in any script; rows of one name settle - [`0c860e5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0c860e5faa34665d1b5aa33ccb314be5215b1aaa) Merge remote-tracking branch 'origin/staging' into fix/later-turn-notices-health-widget ### 📊 Changes **6 files changed** (+481 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `e2e/game-inventory-later-turn.e2e.ts` (+105 -0) ➕ `e2e/game-widget-health-sync.e2e.ts` (+67 -0) 📝 `packages/client/src/components/game/GameSurface.tsx` (+41 -0) 📝 `packages/shared/src/features/rulesets/combat-bridge.ts` (+23 -0) 📝 `packages/shared/src/utils/game-widget-update.ts` (+84 -0) ➕ `scripts/regressions/game-widget-party-health-sync.regression.ts` (+161 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #8321 ## Why this change - A refused buy on a later turn ("cannot-afford") was never told to the player, though the reply carried it. - A party health widget row ("Ulfgar HP") kept the GM's last tagged value while the sheet moved on. ## What changed - A new turn starts its record of announced narration segments afresh, so a later turn's buys and refusals at a segment an earlier turn announced at are shown. - In a game whose ruleset names what a fight damages (`battle.health`), a party health widget row is brought to the sheet whenever the sheet or the widgets change: "<name> HP" (or Health, Hit points, Vitality, or the ruleset's own word such as Grit) in any stat block, or the bare name in a widget about health. A row keeps the shape it was written in ("36/36" or a number); a word, an unknown name, or a first name two members share is left alone. The synced widgets are saved, so the GM reads them too. New shared helpers: `partyHealthWidgetUpdates`, `rulesetSheetHealth`. ## Validation - [x] `pnpm check` passes 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 - New e2e `game-inventory-later-turn` (plain and rolled later turn): fails without the fix, passes with it; `game-rolled-turn-buys` still passes. - New e2e `game-widget-health-sync` (Ember Roads, Juno at 0 Grit, widget seeded at 99/99): the row reads 0/11 on screen and in saved metadata; the Luck row is untouched. - New regression `game-widget-party-health-sync`. ## 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) ## UI evidence (if applicable) None beyond the e2e screenshots. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 04:04:17 +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#8272
No description provided.