[PR #3839] [MERGED] Add character-scoped Roleplay message visibility #6124

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3839
Author: @SpicyMarinara
Created: 7/19/2026
Status: ✅ Merged
Merged: 7/20/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/illustrator-cadence-targeted-ai-visibility


📝 Commits (5)

  • bb16254 chore: start roleplay visibility and cadence fixes
  • 129a4e9 feat: add character-scoped roleplay visibility
  • 50f0253 fix: clip AI visibility avatars to their frames
  • eadcb49 fix: preserve scoped prompt audiences
  • 58bf043 Merge remote-tracking branch 'origin/staging' into fix/illustrator-cadence-targeted-ai-visibility

📊 Changes

16 files changed (+628 additions, -57 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 docs/chats/messages.md (+3 -1)
📝 packages/client/src/components/chat/ChatArea.tsx (+8 -2)
📝 packages/client/src/components/chat/ChatMessage.tsx (+355 -28)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+5 -1)
📝 packages/server/src/routes/chats.routes.ts (+4 -1)
📝 packages/server/src/routes/generate.routes.ts (+15 -0)
📝 packages/server/src/routes/generate/dry-run-route.ts (+14 -0)
📝 packages/server/src/routes/generate/generate-route-utils.ts (+16 -0)
📝 packages/server/src/services/generation/prompt-message-scope.ts (+16 -0)
📝 packages/server/src/services/prompt/assembler.ts (+13 -4)
📝 packages/server/src/services/prompt/merger.ts (+41 -19)
📝 packages/server/src/services/storage/chats.storage.ts (+8 -1)
📝 packages/shared/src/types/chat.ts (+2 -0)
📝 packages/shared/src/types/prompt.ts (+2 -0)
📝 scripts/regressions/prompt.regression.ts (+124 -0)

📄 Description

Why

Roleplay group chats need message visibility scoped to selected characters so private information can remain available to the rest of the cast. The existing control also briefly used a browser tap-highlight color instead of the configured chat chroma.

The accompanying Illustrator cadence report was investigated on the same branch. Persisted state for the reported chat shows three swipes and one accepted assistant reply since an interval-2 run; the cadence endpoint reports that the next accepted assistant reply is eligible. No cadence behavior was changed without a reproducible failing state, and #3820 remains open for manual confirmation.

Fixes #3838
Refs #3820

Changes

  • preserve the existing direct global toggle outside multi-character Roleplay chats
  • add a compact avatar chooser for All or one or more current chat characters
  • scale and wrap avatar options on narrow screens, with vertical overflow for large casts
  • clip current-format avatar crops inside their circular menu and marker frames
  • show restricted-character avatars beside the crossed-eye message marker
  • persist restrictions across swipes and filter prompt history per responding character
  • preserve audience metadata through prompt merging, strict-role formatting, and system-message squashing
  • use configured chat chroma/accent tokens and suppress the browser tap highlight
  • document the group-chat behavior

Automated evidence

  • pnpm check
  • pnpm regression:prompt
  • pnpm --filter @marinara-engine/client build
  • focused mobile Chromium smoke test for the previously flaky Noodle flow

Test plan

  • Manually verify Illustrator runs on the next accepted Roleplay reply at the configured interval
  • Manually verify swipes and continuations do not count toward Illustrator cadence
  • Manually verify single-character Hide From AI remains a direct toggle
  • Manually verify All and multi-character selections in a Roleplay group chat
  • Manually verify circular avatars stay clipped in the chooser and message marker
  • Manually verify the compact chooser wraps and scrolls vertically on mobile
  • Manually inspect prompts for selected and non-selected responding characters
  • Run pnpm regression:prompt
  • Run pnpm check

Summary by CodeRabbit

  • New Features

    • Added per-character “Hide from AI” controls for Roleplay group chats.
    • Select all characters or specific recipients using an avatar picker.
    • Hidden-message indicators now show selected recipients, while global hiding remains available.
    • Character-specific visibility is respected when generating responses.
  • Bug Fixes

    • Preserved selected accent colors and removed unwanted tap-highlight effects.
  • Documentation

    • Updated message-action guidance for group and single-character chats.

🔄 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/3839 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/19/2026 **Status:** ✅ Merged **Merged:** 7/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/illustrator-cadence-targeted-ai-visibility` --- ### 📝 Commits (5) - [`bb16254`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bb16254a13a4da24b95ef73732684e575c7c820f) chore: start roleplay visibility and cadence fixes - [`129a4e9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/129a4e991764878c030874462b75834fd697f0eb) feat: add character-scoped roleplay visibility - [`50f0253`](https://github.com/Pasta-Devs/Marinara-Engine/commit/50f025389f404f7ff5dbaf919f77ea3f252b06e3) fix: clip AI visibility avatars to their frames - [`eadcb49`](https://github.com/Pasta-Devs/Marinara-Engine/commit/eadcb495b444f8832f8e282b0acc6ad6128c67b7) fix: preserve scoped prompt audiences - [`58bf043`](https://github.com/Pasta-Devs/Marinara-Engine/commit/58bf043d2083fefad06fd972c226a0d8cd7bf061) Merge remote-tracking branch 'origin/staging' into fix/illustrator-cadence-targeted-ai-visibility ### 📊 Changes **16 files changed** (+628 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `docs/chats/messages.md` (+3 -1) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+8 -2) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+355 -28) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+5 -1) 📝 `packages/server/src/routes/chats.routes.ts` (+4 -1) 📝 `packages/server/src/routes/generate.routes.ts` (+15 -0) 📝 `packages/server/src/routes/generate/dry-run-route.ts` (+14 -0) 📝 `packages/server/src/routes/generate/generate-route-utils.ts` (+16 -0) 📝 `packages/server/src/services/generation/prompt-message-scope.ts` (+16 -0) 📝 `packages/server/src/services/prompt/assembler.ts` (+13 -4) 📝 `packages/server/src/services/prompt/merger.ts` (+41 -19) 📝 `packages/server/src/services/storage/chats.storage.ts` (+8 -1) 📝 `packages/shared/src/types/chat.ts` (+2 -0) 📝 `packages/shared/src/types/prompt.ts` (+2 -0) 📝 `scripts/regressions/prompt.regression.ts` (+124 -0) </details> ### 📄 Description ## Why Roleplay group chats need message visibility scoped to selected characters so private information can remain available to the rest of the cast. The existing control also briefly used a browser tap-highlight color instead of the configured chat chroma. The accompanying Illustrator cadence report was investigated on the same branch. Persisted state for the reported chat shows three swipes and one accepted assistant reply since an interval-2 run; the cadence endpoint reports that the next accepted assistant reply is eligible. No cadence behavior was changed without a reproducible failing state, and #3820 remains open for manual confirmation. Fixes #3838 Refs #3820 ## Changes - preserve the existing direct global toggle outside multi-character Roleplay chats - add a compact avatar chooser for **All** or one or more current chat characters - scale and wrap avatar options on narrow screens, with vertical overflow for large casts - clip current-format avatar crops inside their circular menu and marker frames - show restricted-character avatars beside the crossed-eye message marker - persist restrictions across swipes and filter prompt history per responding character - preserve audience metadata through prompt merging, strict-role formatting, and system-message squashing - use configured chat chroma/accent tokens and suppress the browser tap highlight - document the group-chat behavior ## Automated evidence - `pnpm check` - `pnpm regression:prompt` - `pnpm --filter @marinara-engine/client build` - focused mobile Chromium smoke test for the previously flaky Noodle flow ## Test plan - [ ] Manually verify Illustrator runs on the next accepted Roleplay reply at the configured interval - [ ] Manually verify swipes and continuations do not count toward Illustrator cadence - [ ] Manually verify single-character Hide From AI remains a direct toggle - [ ] Manually verify **All** and multi-character selections in a Roleplay group chat - [ ] Manually verify circular avatars stay clipped in the chooser and message marker - [ ] Manually verify the compact chooser wraps and scrolls vertically on mobile - [ ] Manually inspect prompts for selected and non-selected responding characters - [ ] Run `pnpm regression:prompt` - [ ] Run `pnpm check` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added per-character “Hide from AI” controls for Roleplay group chats. * Select all characters or specific recipients using an avatar picker. * Hidden-message indicators now show selected recipients, while global hiding remains available. * Character-specific visibility is respected when generating responses. * **Bug Fixes** * Preserved selected accent colors and removed unwanted tap-highlight effects. * **Documentation** * Updated message-action guidance for group and single-character chats. <!-- 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:07:18 +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#6124
No description provided.