mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2229] [MERGED] Fix legacy game narration segment parsing #5491
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#5491
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/2229
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-2150-legacy-narration📝 Commits (2)
a3bfc0bFix legacy game narration segment parsing02ba776Refresh PR metadata checks📊 Changes
3 files changed (+222 additions, -3 deletions)
View changed files
➕
src/features/modes/game/components/GameNarration.test.tsx(+186 -0)📝
src/features/modes/game/components/GameNarration.tsx(+29 -2)📝
src/features/modes/game/lib/game-tag-parser.ts(+7 -1)📄 Description
Linked issue
Closes #2150
Why this change
Old saved game histories can contain
Narration: ...andDialogue [Name] [expr]: "..."lines. The engine edit parser still treated those as standalone segments, but GameNarration display/truncation no longer did, so prefixes leaked into the UI and edit/delete/interrupt segment indices could diverge.What changed
Narration:parsing in GameNarration display so the prefix is stripped and the line remains a standalone narration segment.Dialogue [Name] [expr]:/Dialogue [Name]:parsing for display and interrupt truncation while preserving compact[Name] [expr]:dialogue.Refactor impact
Primary owner:
game mode
Impact areas reviewed:
src/features/modes/game/components/GameNarration.tsxsrc/features/modes/game/lib/game-tag-parser.tssrc/engine/modes/game/state/segment-edits.tsfor existing legacy edit parser behaviorBoundary notes:
Pressure points touched:
GameNarrationsegment display and interrupt truncationValidation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
Codex ran:
upstream/refactorworktree: failed with legacy narration/dialogue collapsed into fallback narration and truncation segment 0 including the following legacy dialogue line.pnpm exec vitest run src/features/modes/game/components/GameNarration.test.tsx --reporter verbose: passed, 3 tests.pnpm typecheck: passed.pnpm check:unused: passed.pnpm check: passed.node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch/issue-2150-bugfix-verification.json: passed locally.Manual/UI note: no reviewer-visible before/after screenshot from an actual old saved Tauri game chat is attached yet; the core parser claim is covered by the component-level regression test and full local checks. External CI, Bunny, and CodeRabbit are clean; this is kept draft for any desired human visual check.
Feature Discoverability
Check exactly one:
src/features/shell/discovery/because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.Reason:
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
No uploaded screenshot evidence yet. The draft relies on focused component regression proof for rendered text and interrupt truncation, plus local and GitHub baseline checks.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.