mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6920] [MERGED] fix(roleplay): turn whispers typed into edited replies into whispers #7383
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#7383
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/6920
Author: @SpicyMarinara
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/roleplay-private-history-parts📝 Commits (1)
a3879aefix(roleplay): turn whispers typed into edited replies into whispers📊 Changes
9 files changed (+98 additions, -5 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/roleplay/getting-started.md(+2 -0)📝
e2e/roleplay-commands.e2e.ts(+24 -0)📝
packages/client/src/localization/locales/en.json(+1 -1)📝
packages/server/src/routes/chats.routes.ts(+1 -1)📝
packages/server/src/services/generation/roleplay-commands.ts(+1 -1)📝
packages/server/src/services/storage/chats.storage.ts(+9 -2)📝
scripts/regressions/roleplay-commands.regression.ts(+25 -0)📝
scripts/regressions/roleplay-user-private-generation.regression.ts(+34 -0)📄 Description
Fixes #6918
Why this change
In a Roleplay group chat, editing the narrator's message to add
[whisper: character="Maukie" text="..."]saved the tag as plain text. It didn't become a whisper, so the part meant only for Maukie reached every character, and the message showed the raw tag instead of a whisper field.The same command already worked in your own messages and in replies the model writes.
updateMessageContentturned typed private tags (whisper,notes) into command records only for user messages.The maintainer also asked for whispered dialogue to keep its quotes, like
text=""I love you."", with real line breaks allowed, and for the prompt to say so.What changed
PATCH /chats/:chatId/messages/:messageId) now passes{ authored: true }toupdateMessageContent. That runs the existing user-tag preparer,prepareUserRoleplayCommands, for character and narrator messages in Roleplay chats too. So a typed whisper becomes the message's whisper, with its recipient and position, like one the model wrote.updateMessageContentwithout the flag, so model text with bracketed prose is never reinterpreted as a typed tag. A regression checks this.roleplay.commands.whisper.description) now say the text may span several lines and quote dialogue as is.docs/roleplay/getting-started.mdgains one sentence covering whispers typed while editing a character's or the narrator's message, plus the quoting note. The translation follow-up is #6919.{{char}}inside earlier messages still resolves to that message's author, as the maintainer decided. A greeting that says "{{char}}waves" keeps its own character's name in every prompt.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run results (not substitutes for the checklist above):
pnpm checkpasses, as doespnpm regression:prompt(prompt, prompt-attachments, context-fit).roleplay-user-private-generation: a whisper typed while editing the narrator's reply, with nested quotes and a line break, becomes Bob's whisper. It appears only in Bob's prompt, not Alice's, and a generated rewrite keeps[notes about the harbor]as prose. It fails without the route flag.e2e/roleplay-commands.e2e.ts("Roleplay users send and edit private whispers and notes"): edits a narrator reply through the real editor, then checks the whisper field appears (no raw tag remains), reveals the quoted, multi-line text, and checks Bob's and Alice's prompts. It passes on desktop Chromium, mobile Chromium and mobile WebKit, and fails at the whisper field without the fix.e2e/roleplay-commands.e2e.tsfile passes 20/20 on desktop Chromium.To check by hand:
[whisper: character="<name>" text=""Hello." And a second line."](with a real line break), save, and confirm it shows as a whisper field.[whisper/[notes) saves unchanged.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)The CHANGELOG entry and the Roleplay guide sentence are included; the translation follow-up is #6919.
UI evidence (if applicable)
The e2e run covers the edited narrator message showing a whisper field (concealed, then revealed) on desktop and mobile.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.