mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3121] [Issue]: Conversation mode doesn't stagger messages when there are multiple characters (all appear at once) #1673
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#1673
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 30, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3121
Originally assigned to: @SpicyMarinara on GitHub.
What's wrong
In Conversation mode, a single-character reply that splits into several "messages" reveals them one at a time with a short delay (the "they're typing several texts in a row" / DMing feel). But when the conversation has multiple characters, that staggering is gone — every character's messages pop in all at once.
How to reproduce (try it yourself)
You'll see: the parts appear staggered, ~1.5s apart.
You'll see: all messages from both characters appear simultaneously, no stagger.
Expected: multi-character replies stagger their messages too (the same DMing feel), instead of dumping them all at once.
Where it is (all client-side — the server sends one merged reply; pacing is purely in the UI)
There are two separate stagger mechanisms, and group replies fall into the broken one:
packages/client/src/components/chat/ConversationView.tsxbuildscontentPartsonly when the message is not group-formatted —hasGroupFormat = msg.content.includes("<speaker=") || hasNamePrefixFormat(...), andcontentPartsis built onlyif (… && !hasGroupFormat)(lines 578-588). AuseLayoutEffectover the list then reveals those parts one at a time with ani * 1500mstimer loop (the freshness-gated reveal aroundConversationView.tsx:741-873, applied via thevisiblePartCountprop).Name:prefixes per speaker, sohasGroupFormatistrue→contentPartsstaysundefined→ the single-character stagger above never runs for it. Group messages instead render through the grouped-segment path (ConversationMessageGrouped.tsx/ConversationMessageBubble.tsx, each.slice(0, visibleSegments)), whose own stagger lives inpackages/client/src/components/chat/ConversationMessage.tsx:384-411: It initializesvisibleSegmentsto the full count and only staggers whenrenderedContentchanges after the first render. A brand-new reply mounts already-complete (the live stream is a separate row that gets replaced by the final saved row), soinitialRenderRefis true, all segments show immediately, and the stagger only ever fires later on an in-place edit/regeneration.What's happening
Single-character replies have no name prefixes, so the list splits them into
contentPartsand drip-reveals them on arrival. Multi-character replies arrive as one merged, name-prefixed message, which disables that split and routes rendering to the grouped-segment component — whose stagger is written to trigger only on a content change after mount, not on first appearance. So a fresh group reply shows every speaker's segment at once.Suggested fix
Make the grouped-segment path stagger on first appearance, mirroring the single-character path. In
ConversationMessage.tsx:384-411, don't initializevisibleSegmentsto the full count for a freshly-arrived assistant message — start at 1 and run the samei * 1500msreveal on initial mount, gated on a freshness signal so messages loaded from history (or re-mounted on scroll) still render fully and don't re-stagger. The clean way is to reuse the freshness / seen-keys gating the single-character path already has inConversationView.tsx(~779-812) — hoist the group stagger into that same list-level effect, or pass afreshlyArrived/visibleSegmentCountprop down toConversationMessage(analogous to the existingvisiblePartCount), rather than relying on the in-component "content changed after mount" heuristic. (Applies to both classic and bubble styles, since both grouped renderers use the samevisibleSegmentsinitialization.)AI-investigated against the current tree (v2.0.9); the two stagger paths and the fresh-mount "show all" behavior read and confirmed. Reported on v2.0.8. Static analysis (not run live) — please verify before fixing.
@SpicyMarinara commented on GitHub (Jul 2, 2026):
Codex is taking this in branch codex/issue-sweep-3119-3135 for a staging-targeted fix sweep.
@SpicyMarinara commented on GitHub (Jul 2, 2026):
Fix is ready in PR #3138 with CI passing. This issue will close automatically when the PR merges into staging.