[PR #3901] [MERGED] Fix Conversation group compatibility defaults #6148

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

📋 Pull Request Information

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

Base: staging ← Head: fix/3887-conversation-group-compat


📝 Commits (3)

  • ed96859 fix conversation group compatibility
  • 97d7bde test individual conversation card scope
  • 1412089 fix review findings for conversation groups

📊 Changes

6 files changed (+124 additions, -13 deletions)

View changed files

📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+1 -1)
📝 packages/server/src/routes/generate.routes.ts (+13 -10)
📝 packages/server/src/routes/generate/conversation-prompt-formatting.ts (+9 -1)
📝 packages/server/src/services/conversation/transcript-sanitize.ts (+26 -1)
📝 scripts/regressions/open-issues.regression.ts (+25 -0)
📝 scripts/regressions/prompt.regression.ts (+50 -0)

📄 Description

Linked issue

Follow-up to #3887

Why this change

  • Existing Conversation group chats must retain their previous grouped generation behavior unless the user explicitly opts into Individual mode.
  • Individual turns were using a separate system instruction instead of the requested short instruction in Output Format, and repeated model speaker prefixes could leak into saved messages.

What changed

  • Kept missing groupChatMode metadata as Grouped and documented the metadata-independent drawer visibility for every multi-character chat.
  • Added Respond as <character> alone. to the Conversation Output Format only for explicit Individual turns.
  • Collapsed repeated known speaker prefixes such as Dottore: Dottore: before saving responses.
  • Added regressions for legacy Grouped defaults, drawer visibility, Individual Output Format, and duplicate speaker cleanup.

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

Manual verification notes

  • Manually verify an existing Conversation chat with two or more characters shows Group Chat settings with Grouped selected.
  • Manually verify Grouped generation remains one combined request and preserves existing message behavior.
  • Manually verify opting into Individual adds the selected character instruction under Output Format and duplicate speaker names are not displayed.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • Existing settings controls are reused without visual changes; no screenshot attached yet.

Summary by CodeRabbit

  • New Features

    • Enhanced multi-character conversation outputs by requiring the assistant to respond as the correct character on each turn.
    • Added improved support for legacy multi-character chats missing mode metadata, defaulting them to Grouped behavior.
  • Bug Fixes

    • Prevented duplicated speaker labels by collapsing repeated “Name: Name:” prefixes in model transcripts.
    • Improved conversation response post-processing so speaker/timestamp envelope stripping identifies speakers more reliably.
    • Refined roleplay per-character instruction generation to keep outputs consistent across conversation loops.
  • Documentation

    • Clarified how “Group Chat” settings apply to multi-character chats without required mode metadata.

🔄 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/3901 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/21/2026 **Status:** ✅ Merged **Merged:** 7/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3887-conversation-group-compat` --- ### 📝 Commits (3) - [`ed96859`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ed9685918865ab44e9d4e4fa335fe3e8b497403b) fix conversation group compatibility - [`97d7bde`](https://github.com/Pasta-Devs/Marinara-Engine/commit/97d7bde9d06eae4a858c3f8004bf869d904d2c93) test individual conversation card scope - [`1412089`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1412089b5fcfa949e29c3c8c2211727fe622a70a) fix review findings for conversation groups ### 📊 Changes **6 files changed** (+124 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+1 -1) 📝 `packages/server/src/routes/generate.routes.ts` (+13 -10) 📝 `packages/server/src/routes/generate/conversation-prompt-formatting.ts` (+9 -1) 📝 `packages/server/src/services/conversation/transcript-sanitize.ts` (+26 -1) 📝 `scripts/regressions/open-issues.regression.ts` (+25 -0) 📝 `scripts/regressions/prompt.regression.ts` (+50 -0) </details> ### 📄 Description ## Linked issue Follow-up to #3887 ## Why this change - Existing Conversation group chats must retain their previous grouped generation behavior unless the user explicitly opts into Individual mode. - Individual turns were using a separate system instruction instead of the requested short instruction in Output Format, and repeated model speaker prefixes could leak into saved messages. ## What changed - Kept missing `groupChatMode` metadata as Grouped and documented the metadata-independent drawer visibility for every multi-character chat. - Added `Respond as <character> alone.` to the Conversation Output Format only for explicit Individual turns. - Collapsed repeated known speaker prefixes such as `Dottore: Dottore:` before saving responses. - Added regressions for legacy Grouped defaults, drawer visibility, Individual Output Format, and duplicate speaker cleanup. ## 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` ### Manual verification notes - Manually verify an existing Conversation chat with two or more characters shows Group Chat settings with Grouped selected. - Manually verify Grouped generation remains one combined request and preserves existing message behavior. - Manually verify opting into Individual adds the selected character instruction under Output Format and duplicate speaker names are not displayed. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - Existing settings controls are reused without visual changes; no screenshot attached yet. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Enhanced multi-character conversation outputs by requiring the assistant to respond as the correct character on each turn. * Added improved support for legacy multi-character chats missing mode metadata, defaulting them to Grouped behavior. * **Bug Fixes** * Prevented duplicated speaker labels by collapsing repeated “Name: Name:” prefixes in model transcripts. * Improved conversation response post-processing so speaker/timestamp envelope stripping identifies speakers more reliably. * Refined roleplay per-character instruction generation to keep outputs consistent across conversation loops. * **Documentation** * Clarified how “Group Chat” settings apply to multi-character chats without required mode metadata. <!-- 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:33 +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#6148
No description provided.