mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5979] [MERGED] fix(game): keep every roll and resolve text dice requests #7011
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7011
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5979
Author: @SpicyMarinara
Created: 9/8/2026
Status: ✅ Merged
Merged: 9/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/game-dice-results-5956-5961📝 Commits (8)
92c07cdchore: start Game dice issue sweepad8b596fix(game): preserve every roll and narrate actual dice outcomesec76bb5Merge remote-tracking branch 'origin/staging' into fix/game-dice-results-5956-5961144035afix: keep Game log actions on their Chroma colors6e0faa1fix: preserve queued dice when the next Game turn startsec24f4dMerge remote-tracking branch 'origin/staging' into fix/game-dice-results-5956-596194743deMerge remote-tracking branch 'origin/staging' into fix/game-dice-results-5956-59615d3c6a6fix: keep Game log actions and translations on narration📊 Changes
16 files changed (+746 additions, -232 deletions)
View changed files
📝
CHANGELOG.md(+3 -1)📝
docs/game/dice-and-skill-checks.md(+12 -2)📝
e2e/game-native-dice.e2e.ts(+120 -14)📝
packages/client/src/components/game/GameNarration.tsx(+54 -28)📝
packages/client/src/components/game/GameSurface.tsx(+41 -37)📝
packages/client/src/lib/chat-message-visibility.ts(+1 -0)📝
packages/client/src/lib/dice-roll-result.ts(+5 -0)📝
packages/client/src/stores/game-mode.store.ts(+16 -5)📝
packages/server/src/routes/generate.routes.ts(+177 -102)📝
packages/server/src/services/game/dice.service.ts(+100 -0)📝
packages/server/src/services/game/gm-prompts.ts(+8 -7)📝
packages/server/src/services/game/skill-check-resolution.service.ts(+9 -4)📝
packages/shared/src/types/chat.ts(+2 -0)📝
scripts/regressions/game-mode-dice-tool.regression.ts(+2 -2)➕
scripts/regressions/game-text-dice.regression.ts(+170 -0)📝
scripts/regressions/gm-skill-check-resolution.regression.ts(+26 -30)📄 Description
Linked issue
Closes #5956
Closes #5960
Closes #5959
Closes #5961
Why this change
A Game turn can roll multiple real dice but retain or animate only one result. Text-only connections also need real dice outside d20 checks, with narration kept consistent with outcomes the engine resolves after generation.
What changed
Keep every Game dice result on its swipe and queue the existing dice/skill-check cards in order. Logs retain the full roll history after reload; regeneration clears replaced rolls and continuation preserves them. Logs use readable light-theme colors and localized accessible names for their icon controls.
Reuse the shared dice grammar for text-requested ordinary dice and explicitly defined success pools. After resolving fresh requests, make one text-only follow-up on the same connection to rewrite the complete narration using real outcomes. Preserve the engine's roll records exactly once, discard superseded package/movement commands, and save actual results if that follow-up fails. This adds one model request on turns using the text-roll fallback; native tool rolls retain their existing loop.
Validation
Passed
pnpm check,pnpm regression:prompt, and focused dice-tool, text-dice, skill-check, notation, GM-verb, and spatial-visibility regressions. The new real-route regression exercises both subscription adapters with a synthetic transport, including a failed continuation; disabling the continuation makes its two-call assertion fail. The browser regression fails on baseline because only the final roll is presented.All nine
game-native-dice.e2e.tscases passed across desktop Chromium, mobile Chromium, and mobile WebKit in light/dark themes. They exercise multi-round cards, two sequential checks, reload/Logs, continuation/regeneration persistence, and unchanged Conversation cards. Inspected the saved light/dark screenshots.Docs and release impact
Updated the Unreleased changelog and
docs/game/dice-and-skill-checks.md. Translation follow-up: #5980. No release version bump.Additional integration proof: 14 browser cases passed, including all dice-card scenarios, the existing Game log Chroma regression, and mobile Conversation editing. The Chroma regression caught and verified removal of a conflicting desktop text-color override.
Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.