mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2798] [Issue]: Convo mode: group-chat bubbles merge — multiple characters' messages render inside one bubble #1422
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1422
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Jun 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2798
Summary
In Bubbles (Messenger-style) chat layout, a single assistant turn that contains replies from multiple characters renders all of those replies stacked inside one shared chat bubble, with only a tiny name label per speaker. Switching to Classic (line) layout renders the same content correctly, giving each speaker its own avatar + name + row. The defect is purely a Bubbles-style rendering branch; no content is lost.
This is most visible in Convo mode group chats (where multi-character replies are common), but the trigger is the Bubbles-style flag, not the chat mode.
Symptom & UX impact
0.75rem) name labels.Steps to reproduce
Name: textformat thatparseSpeakerTags/parseNamePrefixFormatresolves to multiple known character names.Root cause
The per-speaker "grouped" layout (
ConversationMessageGrouped) is explicitly excluded for Bubbles style, so Bubbles-style multi-speaker messages fall through toConversationMessageBubble, which renders all segments inside a single bubble container.Trace:
packages/client/src/components/chat/ConversationMessage.tsx:373-381—groupedSegmentsis built from the rendered content viaparseSpeakerTags/parseNamePrefixFormat+groupConsecutiveSegments. A single assistant message can therefore contain multiple speaker segments.packages/client/src/components/chat/ConversationMessage.tsx:764— the grouped layout gate: The!isBubbleStyleclause means Bubbles-style messages never use the per-speaker grouped layout.packages/client/src/components/chat/ConversationMessage.tsx:800— Bubbles style instead renders<ConversationMessageBubble ctx={ctx} />.packages/client/src/components/chat/ConversationMessageBubble.tsx:152-202— the bubble body is a single<div class="mari-message-bubble texting-bubble texting-bubble-other …">. Inside it,:174-198maps every grouped segment into that one bubble, giving each speaker only a0.75remname label (:191) and its text (:194).packages/client/src/styles/globals.css:3556-3561—.texting-bubble-otherapplies one solidvar(--card)background, so all segments visibly share a single bubble surface.Why this is the only source of two different characters in one bubble: cross-message grouping in
packages/client/src/components/chat/ConversationView.tsx:527-533only groups adjacent messages whencurrent.characterId === other.characterId, so two different characters never get grouped across messages. The merged-bubble effect can only come from the single-message multi-speakergroupedSegmentspath above.By contrast,
ConversationMessageGroupedalready does this correctly: per-segment avatar resolution atConversationMessageGrouped.tsx:128-130, speakerless narration rendered as italic muted text at:136-145, and a full avatar + name + timestamp row per speaker at:148-199.Suggested fix
The fix is not a simple move of
ConversationMessageBubble.tsx:174-198out of the bubble div. The bubble shell (:68-217) is built around a single avatar column (:97-116) and a single bubble (:152-202); giving each speaker its own bubble requires rebuilding the body into a vertical list of speaker rows, each with its own avatar, name, and bubble.Preferred approach — let the grouped component own all multi-speaker rendering, including Bubbles. This avoids duplicating (and later drifting) the speaker-resolution / narration logic that already lives in
ConversationMessageGrouped.Remove the Bubbles exclusion from the gate so multi-speaker messages always route to the grouped component:
Add a Bubbles rendering branch inside
ConversationMessageGroupedso each speaker segment renders as its own bubble row. PassisBubbleStylethroughctx(it is already derived inConversationMessage.tsx) and, in the per-speaker block (ConversationMessageGrouped.tsx:148-199), whenisBubbleStyleis true:segAvatar/segName(already resolved at:128-131) in the avatar column,mari-message-bubble texting-bubble texting-bubble-otherdiv,:136-145) the same way it does today.Key correctness note: do not reuse
bubbleCornerClass(computed once per message atConversationMessage.tsx:554-568) across the multiple inner bubbles — it encodes a single message's group position and would apply the wrong rounded-corner shape to every inner bubble. Either compute a per-segment corner shape (first/middle/last within the segment list) or use a uniformrounded-2xlfor inner bubbles.Alternative (more localized, more duplication) — keep the gate as-is and rewrite
ConversationMessageBubble.tsx:174-198to emit, outside the single bubble div (:152-202), one avatar + name + bubble per segment, mirroringConversationMessageGrouped.tsx:128-145for avatar resolution and narration. This is more self-contained but duplicates speaker-handling logic across two components and is the more likely to drift over time, so the grouped-component approach is preferred.Affected files
packages/client/src/components/chat/ConversationMessage.tsx— gate at:764(remove!isBubbleStyle);ctxalready carriesisBubbleStyle.packages/client/src/components/chat/ConversationMessageGrouped.tsx— add Bubbles-style per-segment bubble rendering (:148-199, narration at:136-145).packages/client/src/components/chat/ConversationMessageBubble.tsx—:174-198multi-speaker branch becomes dead for the multi-speaker case (remove or keep only the single-speakerrenderedContentpath); referenced for parity.packages/client/src/components/chat/ConversationMessageShared.tsx—MessageRenderContextif a new flag/field is threaded (likely none needed;isBubbleStylealready present).packages/client/src/styles/globals.css(:3546-3561) — referenced for bubble surface styling; may need per-segment corner classes.Validation
bubbleCornerClassreuse across segments).pnpm checkpasses (TypeScript + ESLint).AI-investigated against released 2.0.0; verify before fixing.
@SpicyMarinara commented on GitHub (Jun 22, 2026):
Addressed in PR #2790 / commit acab1fba: grouped multi-speaker Conversation messages now route through the grouped renderer in Bubble style, with each speaker rendered as its own bubble rather than merging all speakers into one.