[PR #7420] [MERGED] perf(roleplay): look up the persona only for an edit with a whisper tag #7725

Closed
opened 2026-10-24 04:06:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7420
Author: @SpicyMarinara
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/typed-whisper-persona-lookup


📝 Commits (1)

  • e8d674b perf(roleplay): look up the persona only for an edit with a whisper tag

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 packages/server/src/services/storage/chats.storage.ts (+2 -1)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7411 (follow-up to #7412)

Why this change

  • GitHub CodeRabbit on #7412 noted that every edit of a character's or narrator's Roleplay reply resolved the chat's persona, but only a typed whisper uses it.
  • The fix commit (75e062510) was pushed to the #7412 branch just after that PR merged, so it never reached staging. This PR lands it.

What changed

  • updateMessageContent asks userRoleplayPreparer for the persona only when the edited text contains a [whisper tag. Other edits skip the persona lookup. No behaviour changes: without a whisper tag, no whisper is created.
  • No CHANGELOG entry, since users see no difference.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Commands run by the agent: pnpm check, and node ./scripts/run-regressions.mjs --filter scripts/regressions/roleplay-user-private-generation.regression.ts, whose persona-whisper case still passes.

Manual verification notes

  • Manually verify that editing a character's reply to add [whisper: character="<persona name>" text="secret"] still shows "Whisper to " in the message.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

🔄 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/7420 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/typed-whisper-persona-lookup` --- ### 📝 Commits (1) - [`e8d674b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e8d674b8591619d71414f79f950daa4f7a0cbf03) perf(roleplay): look up the persona only for an edit with a whisper tag ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/services/storage/chats.storage.ts` (+2 -1) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #7411 (follow-up to #7412) ## Why this change - GitHub CodeRabbit on #7412 noted that every edit of a character's or narrator's Roleplay reply resolved the chat's persona, but only a typed whisper uses it. - The fix commit (75e062510) was pushed to the #7412 branch just after that PR merged, so it never reached staging. This PR lands it. ## What changed - `updateMessageContent` asks `userRoleplayPreparer` for the persona only when the edited text contains a `[whisper` tag. Other edits skip the persona lookup. No behaviour changes: without a whisper tag, no whisper is created. - No CHANGELOG entry, since users see no difference. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Commands run by the agent: `pnpm check`, and `node ./scripts/run-regressions.mjs --filter scripts/regressions/roleplay-user-private-generation.regression.ts`, whose persona-whisper case still passes. ### Manual verification notes - Manually verify that editing a character's reply to add `[whisper: character="<persona name>" text="secret"]` still shows "Whisper to <persona>" in the message. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:06:54 +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#7725
No description provided.