[GH-ISSUE #8626] [Issue]: Speaker-tagged roleplay swipes leave stale narration in the selected message #8433

Closed
opened 2026-11-07 16:42:55 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @DSBwizzard on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8626

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Switching swipes in Roleplay can leave narration from the previous swipe attached to the selected response. Reproduced with synthetic text on staging 04e328e06f97b42e1c6b05cbc8019309760ec17b in Chromium and WebKit.

Expected behavior

Only the selected swipe's content appears, with its dialogue colours and Markdown formatting preserved.

Actual behavior

Italic narration from a speaker-tagged swipe remains in the DOM when switching back to a plain-text swipe. Repeated switches can accumulate fragments. Reloading clears the display; the saved message and both saved swipe bodies remain correct.

Steps to reproduce

  1. Create a merged group Roleplay chat with two characters and enable Color Dialogues.
  2. Give an assistant message a plain first swipe: BETA Lorem ipsum. This is the entire alternate swipe.
  3. Add a second swipe containing:
*ALPHA opening narration.*

<speaker="Alice">"ALPHA first dialogue."</speaker> *ALPHA middle narration.* <speaker="Alice">"ALPHA second dialogue."</speaker>

*ALPHA closing narration.*

<speaker="Bob">"ALPHA final dialogue."</speaker> *ALPHA final narration.*
  1. Switch to the second swipe, then back to the first.
  2. Observe ALPHA narration preceding BETA. Reload to restore the expected display.

Environment

  • Marinara Engine version: 2.5.1, staging 04e328e06f97b42e1c6b05cbc8019309760ec17b
  • Install type: isolated Docker build from source
  • OS + version: Linux container; Windows 11 browser runners
  • Browser or app shell: Chromium 153.0.8010.12 and Playwright WebKit 27.2 (actual Safari/macOS not tested)

Logs, screenshots, or video

Automated browser checks reproduced the failure in both engines beginning on the first return to the plain swipe. The displayed text included:

ALPHA opening narration.ALPHA middle narration.ALPHA closing narration.BETA Lorem ipsum...

The same text with speaker tags removed passed three round trips in both engines. Stored contents were checked through the API and remained intact. No provider connection or private chat export is required.

Synthetic before/after screenshots

Before: old narration remains in the plain swipe.

Before switching fix

After the renderer fix at 2b1c09ea2: only the selected plain swipe remains after three round trips, before refreshing.

After switching fix

Additional context

The renderer flattens narration chunks from separate speaker sections into one sibling array, while each chunk restarts Markdown keys such as mi0. Manually pasted speaker tags also reproduce this in a single-character chat.

Implementation owned by @DSBwizzard using Codex. Scope: isolate each narration chunk's React keys and add a focused browser regression; preserve text, formatting, colours, and stored swipes.

@SpicyMarinara: this account cannot assign itself through the upstream assignment API; ownership is recorded above.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @DSBwizzard on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8626 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Switching swipes in Roleplay can leave narration from the previous swipe attached to the selected response. Reproduced with synthetic text on staging `04e328e06f97b42e1c6b05cbc8019309760ec17b` in Chromium and WebKit. ## Expected behavior Only the selected swipe's content appears, with its dialogue colours and Markdown formatting preserved. ## Actual behavior Italic narration from a speaker-tagged swipe remains in the DOM when switching back to a plain-text swipe. Repeated switches can accumulate fragments. Reloading clears the display; the saved message and both saved swipe bodies remain correct. ## Steps to reproduce 1. Create a merged group Roleplay chat with two characters and enable **Color Dialogues**. 2. Give an assistant message a plain first swipe: `BETA Lorem ipsum. This is the entire alternate swipe.` 3. Add a second swipe containing: ```text *ALPHA opening narration.* <speaker="Alice">"ALPHA first dialogue."</speaker> *ALPHA middle narration.* <speaker="Alice">"ALPHA second dialogue."</speaker> *ALPHA closing narration.* <speaker="Bob">"ALPHA final dialogue."</speaker> *ALPHA final narration.* ``` 4. Switch to the second swipe, then back to the first. 5. Observe ALPHA narration preceding BETA. Reload to restore the expected display. ## Environment - Marinara Engine version: 2.5.1, staging `04e328e06f97b42e1c6b05cbc8019309760ec17b` - Install type: isolated Docker build from source - OS + version: Linux container; Windows 11 browser runners - Browser or app shell: Chromium 153.0.8010.12 and Playwright WebKit 27.2 (actual Safari/macOS not tested) ## Logs, screenshots, or video Automated browser checks reproduced the failure in both engines beginning on the first return to the plain swipe. The displayed text included: ```text ALPHA opening narration.ALPHA middle narration.ALPHA closing narration.BETA Lorem ipsum... ``` The same text with speaker tags removed passed three round trips in both engines. Stored contents were checked through the API and remained intact. No provider connection or private chat export is required. ### Synthetic before/after screenshots Before: old narration remains in the plain swipe. ![Before switching fix](https://github.com/user-attachments/assets/e9b5e70a-27a1-4b56-ae36-92a8448483f8) After the renderer fix at 2b1c09ea2: only the selected plain swipe remains after three round trips, before refreshing. ![After switching fix](https://github.com/user-attachments/assets/ba9344a8-6408-4411-847f-a1248b2593b4) ## Additional context The renderer flattens narration chunks from separate speaker sections into one sibling array, while each chunk restarts Markdown keys such as `mi0`. Manually pasted speaker tags also reproduce this in a single-character chat. Implementation owned by @DSBwizzard using Codex. Scope: isolate each narration chunk's React keys and add a focused browser regression; preserve text, formatting, colours, and stored swipes. @SpicyMarinara: this account cannot assign itself through the upstream assignment API; ownership is recorded above. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:42:55 +07:00
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#8433
No description provided.