mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #306] [MERGED] feat(game): Interrupt button with risky/force confirmation flow #4552
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#4552
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/306
Author: @LukaTheHero
Created: 4/29/2026
Status: ✅ Merged
Merged: 4/29/2026
Merged by: @SpicyMarinara
Base:
main← Head:feat/interrupt-button📝 Commits (2)
2d4ea4cfeat(game): add Interrupt button with risky/force confirmation flow08d280aAddress interrupt review feedback📊 Changes
3 files changed (+609 additions, -41 deletions)
View changed files
📝
packages/client/src/components/game/GameInput.tsx(+60 -3)📝
packages/client/src/components/game/GameNarration.tsx(+339 -35)📝
packages/client/src/components/game/GameSurface.tsx(+210 -3)📄 Description
Summary
Adds an Interrupt! button to game-mode narration so the player can stop the GM mid-action and write back early. Click → confirmation modal → soft-pause → type → send. Nothing is mutated server-side until the player actually sends, so backing out (Resume / No) is a true undo.
The confirmation modal exposes three options:
using dice recommendedhint appears next to it.#20C20Ehacker green) — cuts in cleanly. The GM's last message is truncated at the segment the player saw, but no system message is added, so the GM has no idea anything was cut. Input bar gets a matching green ring +force interruptinglabel.The truncation reuses the same line-based emission logic as
parseNarrationSegments, so the prior assistant message is shortened to end at the segment the player was reading. On send, the truncationPATCHis awaited before/generatereads from the DB, so prompt construction sees the cut.Auto-play state is snapshotted on pause and restored on Resume — if it was off, it stays off. A stale interrupt anchor self-clears on chat switch or when a new GM turn arrives, so it can never be applied to the wrong message.
Screenshots
Desktop
Mobile
Test plan
using dice recommendedlabel visible (>=640px).force interruptinglabel visible, dice not glowing.[Interrupt] …system message appears just before your user turn. Next AI response acknowledges the interrupt.Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.