[PR #1128] [MERGED] fix(chat): strip speaker tags in roleplay mode when no character has a colour #4934

Closed
opened 2026-10-22 04:11:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1128
Author: @aeriondyseti
Created: 5/24/2026
Status: ✅ Merged
Merged: 5/24/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/1125-speaker-tag-no-colour-leak


📝 Commits (3)

  • 6344b5b fix(chat): strip speaker tags in roleplay mode when no character has a colour
  • 8f023c0 docs: add #1125 before/after screenshots
  • a21ebd7 Merge remote-tracking branch 'upstream/refactor' into pr-1128-refactor-local

📊 Changes

3 files changed (+4 additions, -2 deletions)

View changed files

➕ docs/evidence/issue-1125/after-fix.png (+0 -0)
➕ docs/evidence/issue-1125/before-fix.png (+0 -0)
📝 src/features/modes/shared/chat-ui/components/ChatMessage.tsx (+4 -2)

📄 Description

Linked issue

Closes #1125.

Why this change

In roleplay-mode group chats where no character has a dialogue colour set, raw <speaker="Name">...</speaker> markup could render as visible text. The plain-text speaker-tag renderer was returning early when no colour map existed, even though the same loop is responsible for stripping the tags.

What changed

  • Updated src/features/modes/shared/chat-ui/components/ChatMessage.tsx so speaker tags are processed whenever tags are present, even without a speaker colour map.
  • Made speaker colour lookup tolerate an undefined map and fall back to the default dialogue colour.
  • Kept the PR scoped to the reported leak; related pre-existing tag parser cleanup remains in #1126 and #1127.
  • Retargeted the PR from staging to refactor and merged upstream/refactor into the PR branch so it is mergeable on the current release lane.

Validation

  • Codex local validation completed: pnpm install --frozen-lockfile, pnpm check, and git diff --check upstream/refactor...HEAD passed in C:\tmp\Marinara-Engine-pr-1128.

GitHub checks on the current head:

  • CI / Frontend, Architecture, and Organization: pass
  • CI / Rust Capability Layer: pass
  • CI / Browser Smoke and Performance: pass
  • Auto-label: pass
  • Pull Request template check: pass after the validation checkbox update
  • CodeRabbit status: success; no actionable inline comments found. The latest CodeRabbit event after the body-only edit reports skipped, with no code changes since the successful current-head review status.

Original PR evidence:

  • Before screenshot: docs/evidence/issue-1125/before-fix.png
  • After screenshot: docs/evidence/issue-1125/after-fix.png

Manual verification

Original browser verification is documented by the committed before/after screenshots. No additional human-only blocker is known after retargeting to refactor.

Docs and release impact

No docs, schema, dependency, version, or release metadata changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1128 **Author:** [@aeriondyseti](https://github.com/aeriondyseti) **Created:** 5/24/2026 **Status:** ✅ Merged **Merged:** 5/24/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/1125-speaker-tag-no-colour-leak` --- ### 📝 Commits (3) - [`6344b5b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6344b5b2c86a68ce90d4c950270df2272d77f400) fix(chat): strip speaker tags in roleplay mode when no character has a colour - [`8f023c0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8f023c0f8c4764989b1e28e9e649e466909fc151) docs: add #1125 before/after screenshots - [`a21ebd7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a21ebd74eeddd128a9ac3d6e4bf3c0681a60a5ce) Merge remote-tracking branch 'upstream/refactor' into pr-1128-refactor-local ### 📊 Changes **3 files changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `docs/evidence/issue-1125/after-fix.png` (+0 -0) ➕ `docs/evidence/issue-1125/before-fix.png` (+0 -0) 📝 `src/features/modes/shared/chat-ui/components/ChatMessage.tsx` (+4 -2) </details> ### 📄 Description ## Linked issue Closes #1125. ## Why this change In roleplay-mode group chats where no character has a dialogue colour set, raw `<speaker="Name">...</speaker>` markup could render as visible text. The plain-text speaker-tag renderer was returning early when no colour map existed, even though the same loop is responsible for stripping the tags. ## What changed - Updated `src/features/modes/shared/chat-ui/components/ChatMessage.tsx` so speaker tags are processed whenever tags are present, even without a speaker colour map. - Made speaker colour lookup tolerate an undefined map and fall back to the default dialogue colour. - Kept the PR scoped to the reported leak; related pre-existing tag parser cleanup remains in #1126 and #1127. - Retargeted the PR from `staging` to `refactor` and merged `upstream/refactor` into the PR branch so it is mergeable on the current release lane. ## Validation - [x] Codex local validation completed: `pnpm install --frozen-lockfile`, `pnpm check`, and `git diff --check upstream/refactor...HEAD` passed in `C:\tmp\Marinara-Engine-pr-1128`. GitHub checks on the current head: - CI / Frontend, Architecture, and Organization: pass - CI / Rust Capability Layer: pass - CI / Browser Smoke and Performance: pass - Auto-label: pass - Pull Request template check: pass after the validation checkbox update - CodeRabbit status: success; no actionable inline comments found. The latest CodeRabbit event after the body-only edit reports skipped, with no code changes since the successful current-head review status. Original PR evidence: - Before screenshot: `docs/evidence/issue-1125/before-fix.png` - After screenshot: `docs/evidence/issue-1125/after-fix.png` ## Manual verification Original browser verification is documented by the committed before/after screenshots. No additional human-only blocker is known after retargeting to `refactor`. ## Docs and release impact No docs, schema, dependency, version, or release metadata changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:50 +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#4934
No description provided.