[PR #6897] [MERGED] feat(roleplay): let a private note be shown to one character #7371

Closed
opened 2026-10-23 04:19:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6897
Author: @SpicyMarinara
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/private-note-narrator


📝 Commits (3)

  • 8aace33 feat(roleplay): let a private note be shown to one character
  • 5417862 test(roleplay): prove shared notes stay out of merged group prompts
  • 822320d Merge branch 'staging' into feat/private-note-narrator

📊 Changes

11 files changed (+343 additions, -14 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 docs/roleplay/getting-started.md (+2 -0)
➕ e2e/private-note-narrator.e2e.ts (+124 -0)
📝 packages/client/src/components/chat/ChatMessage.tsx (+13 -3)
📝 packages/client/src/components/chat/MessageMarks.tsx (+68 -2)
📝 packages/client/src/localization/locales/en.json (+7 -1)
📝 packages/server/src/routes/generate.routes.ts (+11 -0)
📝 packages/server/src/routes/generate/dry-run-route.ts (+10 -0)
📝 packages/server/src/services/generation/roleplay-commands.ts (+22 -0)
📝 packages/shared/src/utils/message-marks.ts (+26 -5)
📝 scripts/regressions/message-marks.regression.ts (+57 -3)

📄 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 #6895

Why this change

  • The narrator can already read the user's [notes: content="…"] command, but few users discover that format, because it's written into the message text. The Private note under a message's Bookmark, pin or note action is easy to find, but it's never sent to the model. This lets that note reach one chosen character.
  • The whisper format is supported but wasn't shown anywhere in the UI.

What changed

  • Private note sharing: under the note there's a switch, Show the note to the narrator character. When it's on, a selector appears, preselected to the chat's command narrator (or the first character). The note is attached to its own message only in that character's prompt, in both the live generate route and Peek Prompt (dry run). It counts as private context, like a whisper (roleplayPrivateContext).
    • Default is off. Remove note also stops sharing. While a note is shared, the placeholder reads "Only you and the selected character can see this."
    • Roleplay only. Sharing needs per-character replies (a solo chat or Individual group generation). In merged group chats the switch explains why it's unavailable, and it can only be turned off.
    • Storage: a message-level privateNoteRecipientId in the message marks (validated, mirrored across swipes, removed from exports along with the note). It stores a character ID, so a rename can't redirect a note.
  • Whisper description: appended, verbatim: You can also use this command to whisper other characters: [whisper: character="name" text="text hidden from anyone but specified character"].
  • Docs: a new paragraph in docs/roleplay/getting-started.md → Your private notes. Translation follow-up: #6896.
  • Six new English UI strings (placed where the catalog's sort order puts them), the whisper description edit, and two changelog entries.

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

Automated checks run locally:

  • Full pnpm check: exit 0 on 8aace332d. The follow-up commit only changes the e2e test and is Prettier-clean.
  • message-marks regression: covers recipient validation, removal from exports, and appendRoleplayMessageNotes delivering a note only to its recipient character. It checks that no note reaches another character, the persona, a viewer with none shared, or non-history prompt parts.
  • The 17 regressions touching roleplay commands, whispers, private user commands, message marks/trash and multiplayer pass, and so does pnpm regression:prompt.
  • e2e/private-note-narrator.e2e.ts, 3/3 (desktop Chromium, mobile Chromium, mobile WebKit), using real Peek Prompt dry runs:
    • a saved note stays out of prompts;
    • sharing preselects the narrator and only the narrator's prompt contains the note;
    • switching to another character moves the note;
    • turning it off removes it;
    • after a switch to a merged group, a still-shared note doesn't reach the merged prompt, and the switch can be turned off but not on.
  • Local CodeRabbit: one trivial finding about merged-mode test coverage. Fixed in the second commit.

Manual verification notes

  • In a solo Roleplay chat, write a private note on your message, turn on Show the note to the narrator character, then check Peek Prompt: the note appears after that message. Turn it off and confirm it's gone.
  • In an Individual group chat, share a note with one character, generate for another character, and confirm Peek Prompt for the other character has no note.
  • Open Chat Settings → Agents → Roleplay Commands and confirm the Whisper description shows the new sentence.

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)

docs/roleplay/getting-started.md and CHANGELOG.md are updated. Translated docs follow-up: #6896.

UI evidence (if applicable)

In the mobile WebKit capture from the e2e test, the Private note shows the Show the note to the narrator character switch on, with its hint, and "Mira Narrator" preselected below it.

Summary by CodeRabbit

  • New Features
    • Private message notes can now be shared with one selected character in solo chats or Individual group generation. Notes remain private by default, and removing a note also removes its sharing setting.
  • Updates
    • The Whisper command description now shows the [whisper: ...] format.
  • Documentation
    • Getting-started guidance now explains how character-specific note sharing works and when it is available.

🔄 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/6897 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/30/2026 **Status:** ✅ Merged **Merged:** 9/30/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/private-note-narrator` --- ### 📝 Commits (3) - [`8aace33`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8aace332d5ca763a84dce6561fab303c60ed3f00) feat(roleplay): let a private note be shown to one character - [`5417862`](https://github.com/Pasta-Devs/Marinara-Engine/commit/54178627dfb4c7de63a98bb5f84c431405412101) test(roleplay): prove shared notes stay out of merged group prompts - [`822320d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/822320d354bd6abfd8cc68c4bb51094a6d3a0bb6) Merge branch 'staging' into feat/private-note-narrator ### 📊 Changes **11 files changed** (+343 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `docs/roleplay/getting-started.md` (+2 -0) ➕ `e2e/private-note-narrator.e2e.ts` (+124 -0) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+13 -3) 📝 `packages/client/src/components/chat/MessageMarks.tsx` (+68 -2) 📝 `packages/client/src/localization/locales/en.json` (+7 -1) 📝 `packages/server/src/routes/generate.routes.ts` (+11 -0) 📝 `packages/server/src/routes/generate/dry-run-route.ts` (+10 -0) 📝 `packages/server/src/services/generation/roleplay-commands.ts` (+22 -0) 📝 `packages/shared/src/utils/message-marks.ts` (+26 -5) 📝 `scripts/regressions/message-marks.regression.ts` (+57 -3) </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`. ## Linked issue Closes #6895 ## Why this change - The narrator can already read the user's `[notes: content="…"]` command, but few users discover that format, because it's written into the message text. The **Private note** under a message's **Bookmark, pin or note** action is easy to find, but it's never sent to the model. This lets that note reach one chosen character. - The whisper format is supported but wasn't shown anywhere in the UI. ## What changed - **Private note sharing:** under the note there's a switch, **Show the note to the narrator character**. When it's on, a selector appears, preselected to the chat's command narrator (or the first character). The note is attached to its own message only in that character's prompt, in both the live generate route and Peek Prompt (dry run). It counts as private context, like a whisper (`roleplayPrivateContext`). - Default is off. **Remove note** also stops sharing. While a note is shared, the placeholder reads "Only you and the selected character can see this." - Roleplay only. Sharing needs per-character replies (a solo chat or **Individual** group generation). In merged group chats the switch explains why it's unavailable, and it can only be turned off. - Storage: a message-level `privateNoteRecipientId` in the message marks (validated, mirrored across swipes, removed from exports along with the note). It stores a character ID, so a rename can't redirect a note. - **Whisper description:** appended, verbatim: *You can also use this command to whisper other characters: [whisper: character="name" text="text hidden from anyone but specified character"].* - Docs: a new paragraph in `docs/roleplay/getting-started.md` → **Your private notes**. Translation follow-up: #6896. - Six new English UI strings (placed where the catalog's sort order puts them), the whisper description edit, and two changelog entries. ## 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` Automated checks run locally: - Full `pnpm check`: exit 0 on `8aace332d`. The follow-up commit only changes the e2e test and is Prettier-clean. - `message-marks` regression: covers recipient validation, removal from exports, and `appendRoleplayMessageNotes` delivering a note only to its recipient character. It checks that no note reaches another character, the persona, a viewer with none shared, or non-history prompt parts. - The 17 regressions touching roleplay commands, whispers, private user commands, message marks/trash and multiplayer pass, and so does `pnpm regression:prompt`. - `e2e/private-note-narrator.e2e.ts`, 3/3 (desktop Chromium, mobile Chromium, mobile WebKit), using real Peek Prompt dry runs: - a saved note stays out of prompts; - sharing preselects the narrator and only the narrator's prompt contains the note; - switching to another character moves the note; - turning it off removes it; - after a switch to a merged group, a still-shared note doesn't reach the merged prompt, and the switch can be turned off but not on. - Local CodeRabbit: one trivial finding about merged-mode test coverage. Fixed in the second commit. ### Manual verification notes - In a solo Roleplay chat, write a private note on your message, turn on **Show the note to the narrator character**, then check **Peek Prompt**: the note appears after that message. Turn it off and confirm it's gone. - In an **Individual** group chat, share a note with one character, generate for another character, and confirm Peek Prompt for the other character has no note. - Open **Chat Settings → Agents → Roleplay Commands** and confirm the Whisper description shows the new sentence. ## 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) `docs/roleplay/getting-started.md` and `CHANGELOG.md` are updated. Translated docs follow-up: #6896. ## UI evidence (if applicable) In the mobile WebKit capture from the e2e test, the Private note shows the **Show the note to the narrator character** switch on, with its hint, and "Mira Narrator" preselected below it. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Private message notes can now be shared with one selected character in solo chats or Individual group generation. Notes remain private by default, and removing a note also removes its sharing setting. * **Updates** * The Whisper command description now shows the `[whisper: ...]` format. * **Documentation** * Getting-started guidance now explains how character-specific note sharing works and when it is available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:19:07 +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#7371
No description provided.