mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2150] [Issue]: Game mode — legacy Narration: / Dialogue [Name]: formats no longer parsed (display + segment-edit divergence) #1061
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#1061
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?
Originally created by @Romuromylus on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2150
Originally assigned to: @cha1latte on GitHub.
Summary
Severity: minor (affects pre-existing legacy histories). The narration display parser dropped the legacy
Narration:andDialogue [Name] [expr]:formats. Old saved turns render with leaked prefixes and lose their speaker box/sprite — and because the engine's edit parser still recognizes those formats, display and edit segment indices diverge, so edit/delete/interrupt can target the wrong segment.Expected behavior
As in main:
parseNarrationSegmentsandtruncateMessageContentAtSegmentrecognizeNarration: textandDialogue [Name] [expr]: "text"(alongside the compact[Name] [expr]:form), matching the engine'ssegment-edits.tsparser.Actual behavior
The two client parsers keep only
compactDialogueRegex(which requires a leading[), so a legacyDialogue [Alice] [happy]: "Hi"line falls through to raw narration with the prefix leaked, andNarration:lines leak their prefix. Meanwhilesegment-edits.tsstill emits these as distinct segments, so the display segment list and the edit segment list no longer share indices.Steps to reproduce
Narration: ...and/orDialogue [Name] [expr]: "..."lines (old prompt format).Dialogue [Name] [expr]:prefix (no speaker box/sprite); the narration line leaksNarration:.Impact area
Environment
refactor@14894608main@c49f1d95(legacy web app)Regression notes
Worked in the legacy web app.
packages/client/src/components/game/GameNarration.tsx:5316-5319(legacy regexes), used at :5416-5456 and intruncateMessageContentAtSegment:5495-5523.src/features/modes/game/components/GameNarration.tsx:5174-5175/:5330 keep onlycompactDialogueRegex; enginesrc/engine/modes/game/state/segment-edits.ts:233-234still matches legacy forms. Fix: restore the legacy regexes in both client parsers (or drop them fromsegment-edits.tsso all three agree).