[PR #1388] [MERGED] Fix inactive group chat characters #5058

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1388
Author: @ghost
Created: 5/27/2026
Status: ✅ Merged
Merged: 5/27/2026
Merged by: @undefined

Base: refactor ← Head: fix/group-chat-inactive-characters


📝 Commits (1)

  • a93cd79 Fix inactive group chat characters

📊 Changes

9 files changed (+186 additions, -23 deletions)

View changed files

📝 src/engine/contracts/types/chat.ts (+2 -0)
➕ src/engine/generation/active-characters.ts (+32 -0)
📝 src/engine/generation/prompt-assembly.test.ts (+34 -0)
📝 src/engine/generation/prompt-assembly.ts (+2 -1)
📝 src/engine/generation/start-generation.test.ts (+14 -0)
📝 src/engine/generation/start-generation.ts (+6 -3)
📝 src/features/modes/conversation/components/ConversationView.tsx (+25 -14)
📝 src/features/modes/roleplay/components/ChatRoleplaySurface.tsx (+16 -4)
📝 src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx (+55 -1)

📄 Description

Summary

  • Add per-chat inactive character tracking for group chats.
  • Exclude inactive characters from generation prompt context, reply target pickers, mention suggestions, and fallback assistant attribution.
  • Guard direct/manual generation requests so inactive characters cannot be selected until reactivated.

Fixes #1357

Proof

Core claim:

  • Group chats can keep characters attached while marking individual characters inactive, and inactive characters are excluded from generation.

Verification run:

  • pnpm typecheck
  • pnpm exec vitest run src/engine/generation/prompt-assembly.test.ts src/engine/generation/start-generation.test.ts
  • pnpm check:architecture

Evidence:

  • Added prompt assembly coverage proving inactive character cards are excluded from assembled context.
  • Added start-generation coverage proving manual/direct replies for inactive characters fail before saving messages.
  • Architecture check passed with no dependency violations.

Risk coverage:

  • Positive rows: active group members remain in prompt context; inactive IDs persist in chat metadata while characters stay attached to the chat.
  • Negative controls: inactive character card text does not appear in prompt context; inactive manual target is rejected.
  • Untested/manual blockers: no browser UI pass was run for the settings drawer toggle.

Manual verification requested:

  • In a group chat, toggle one character to Inactive in Chat Settings, confirm the input picker only offers active characters, then toggle back to Active.

Notes

  • Docs/release notes not updated: this is a narrow parity/QoL behavior fix without a durable architecture change.

🔄 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/1388 **Author:** [@ghost](https://github.com/ghost) **Created:** 5/27/2026 **Status:** ✅ Merged **Merged:** 5/27/2026 **Merged by:** [@undefined](undefined) **Base:** `refactor` ← **Head:** `fix/group-chat-inactive-characters` --- ### 📝 Commits (1) - [`a93cd79`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a93cd79dce775aacecba8e9ef32b8b63306a2f63) Fix inactive group chat characters ### 📊 Changes **9 files changed** (+186 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/contracts/types/chat.ts` (+2 -0) ➕ `src/engine/generation/active-characters.ts` (+32 -0) 📝 `src/engine/generation/prompt-assembly.test.ts` (+34 -0) 📝 `src/engine/generation/prompt-assembly.ts` (+2 -1) 📝 `src/engine/generation/start-generation.test.ts` (+14 -0) 📝 `src/engine/generation/start-generation.ts` (+6 -3) 📝 `src/features/modes/conversation/components/ConversationView.tsx` (+25 -14) 📝 `src/features/modes/roleplay/components/ChatRoleplaySurface.tsx` (+16 -4) 📝 `src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx` (+55 -1) </details> ### 📄 Description ## Summary - Add per-chat inactive character tracking for group chats. - Exclude inactive characters from generation prompt context, reply target pickers, mention suggestions, and fallback assistant attribution. - Guard direct/manual generation requests so inactive characters cannot be selected until reactivated. Fixes #1357 ## Proof Core claim: - Group chats can keep characters attached while marking individual characters inactive, and inactive characters are excluded from generation. Verification run: - `pnpm typecheck` - `pnpm exec vitest run src/engine/generation/prompt-assembly.test.ts src/engine/generation/start-generation.test.ts` - `pnpm check:architecture` Evidence: - Added prompt assembly coverage proving inactive character cards are excluded from assembled context. - Added start-generation coverage proving manual/direct replies for inactive characters fail before saving messages. - Architecture check passed with no dependency violations. Risk coverage: - Positive rows: active group members remain in prompt context; inactive IDs persist in chat metadata while characters stay attached to the chat. - Negative controls: inactive character card text does not appear in prompt context; inactive manual target is rejected. - Untested/manual blockers: no browser UI pass was run for the settings drawer toggle. Manual verification requested: - In a group chat, toggle one character to Inactive in Chat Settings, confirm the input picker only offers active characters, then toggle back to Active. ## Notes - Docs/release notes not updated: this is a narrow parity/QoL behavior fix without a durable architecture change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:51 +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#5058
No description provided.