[GH-ISSUE #6615] [Issue]: Editing narration segment in Game (GM) mode does not update or invalidate translation cache #3702

Closed
opened 2026-10-21 06:06:20 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @menemorofaan on GitHub (Sep 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6615

Originally assigned to: @SpicyMarinara on GitHub.

Summary

In Game (GM) mode, editing the text of a narration segment does not update the translation: the translator keeps translating the pre-edit draft, so the translated output no longer matches the message on screen, and auto-translate never retriggers.

Expected behavior

After editing one or more segments of a Game message, requesting a translation (or letting auto-translate run) should translate the edited text, and the translated segments should line up 1:1 with the edited segments.

Actual behavior

Translation is produced strictly from the original, un-edited message content. Because the stored translation source still matches the stale text, the old translation stays valid and is shown for text that no longer exists; the freshly edited text is never sent to the translator.

Conversation and Roleplay modes are unaffected — editing a reply there translates the new text correctly. The issue is specific to Game/GM mode.

Steps to reproduce

  1. Open a Game (GM) chat that contains an assistant message.
  2. Edit one or more segments of that message (using the segment editor or log entry editor) so the text differs from the original draft.
  3. Trigger a translation (manual translate button, or let auto-translate run).
  4. Notice that the translation does not update to reflect your edits and keeps showing the translation of the original unedited text.

Environment

  • Marinara Engine version: 2.4.6 (staging)
  • Install type: source
  • OS + version: Windows 10/11 x64
  • Browser or app shell: Chrome / Edge / Browser

Logs, screenshots, or video

No errors are logged — this is a state and cache mismatch rather than an unhandled exception, so the console remains clean.

Additional context

  • getGameTranslationSource() in GameNarration.tsx only reads raw message content, ignoring segmentEdits and segmentDeletes.
  • Saving segment edits currently has no mechanism to invalidate cached translations without also setting hiddenTranslationIds, which prevents auto-translation from re-running.
  • Rebuilding segments for translation requires preserving canonical segment structure so translated text maps back to segment indices correctly.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @menemorofaan on GitHub (Sep 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6615 Originally assigned to: @SpicyMarinara on GitHub. ## Summary In Game (GM) mode, editing the text of a narration segment does not update the translation: the translator keeps translating the pre-edit draft, so the translated output no longer matches the message on screen, and auto-translate never retriggers. ## Expected behavior After editing one or more segments of a Game message, requesting a translation (or letting auto-translate run) should translate the edited text, and the translated segments should line up 1:1 with the edited segments. ## Actual behavior Translation is produced strictly from the original, un-edited message content. Because the stored translation source still matches the stale text, the old translation stays valid and is shown for text that no longer exists; the freshly edited text is never sent to the translator. Conversation and Roleplay modes are unaffected — editing a reply there translates the new text correctly. The issue is specific to Game/GM mode. ## Steps to reproduce 1. Open a Game (GM) chat that contains an assistant message. 2. Edit one or more segments of that message (using the segment editor or log entry editor) so the text differs from the original draft. 3. Trigger a translation (manual translate button, or let auto-translate run). 4. Notice that the translation does not update to reflect your edits and keeps showing the translation of the original unedited text. ## Environment - Marinara Engine version: 2.4.6 (staging) - Install type: source - OS + version: Windows 10/11 x64 - Browser or app shell: Chrome / Edge / Browser ## Logs, screenshots, or video No errors are logged — this is a state and cache mismatch rather than an unhandled exception, so the console remains clean. ## Additional context - `getGameTranslationSource()` in `GameNarration.tsx` only reads raw message content, ignoring `segmentEdits` and `segmentDeletes`. - Saving segment edits currently has no mechanism to invalidate cached translations without also setting `hiddenTranslationIds`, which prevents auto-translation from re-running. - Rebuilding segments for translation requires preserving canonical segment structure so translated text maps back to segment indices correctly. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:06:20 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 24, 2026):

Codex for @SpicyMarinara is finishing and validating the existing PR #6618 for its authorized staging merge. I am reproducing the remaining stale-completion and edited-segment alignment cases from its review, adding the missing changelog/regression coverage, and investigating the browser CI failure. I will update the existing contributor PR rather than duplicate its implementation.

<!-- gh-comment-id:5823013211 --> @SpicyMarinara commented on GitHub (Sep 24, 2026): Codex for @SpicyMarinara is finishing and validating the existing PR #6618 for its authorized staging merge. I am reproducing the remaining stale-completion and edited-segment alignment cases from its review, adding the missing changelog/regression coverage, and investigating the browser CI failure. I will update the existing contributor PR rather than duplicate its implementation.
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#3702
No description provided.