mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6907] [MERGED] fix(agents): attribute group speakers in agent history and keep mobile Echo pinned #7376
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#7376
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6907
Author: @SpicyMarinara
Created: 9/30/2026
Status: ✅ Merged
Merged: 9/30/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/echo-chamber-attribution-mobile-scroll📝 Commits (4)
3252442fix(agents): attribute group speakers in agent history and keep mobile Echo pinneda4bb6d4fix(agents): strip agent history markup to a fixed point653077dtest(e2e): reproduce Echo reactions revealed while the mobile composer hides it12c8809Merge branch 'staging' into fix/echo-chamber-attribution-mobile-scroll📊 Changes
9 files changed (+831 additions, -643 deletions)
View changed files
📝
CHANGELOG.md(+3 -0)📝
e2e/core-flows.e2e.ts(+700 -610)📝
packages/client/src/styles/globals.css(+10 -2)📝
packages/server/src/routes/generate.routes.ts(+18 -0)📝
packages/server/src/routes/generate/generate-route-utils.ts(+29 -21)📝
packages/server/src/services/agents/agent-executor.ts(+16 -6)📝
packages/shared/src/types/agent.ts(+2 -0)📝
scripts/regressions/agent-runtime.regression.ts(+47 -3)📝
scripts/regressions/open-issues.regression.ts(+6 -1)📄 Description
Fixes #6906
Why
Echo Chamber reactions in group chats often say one character said a line that another character actually said. Agent history reached the model without speaker names:
buildAgentMessagessent each message's text on its own and merged consecutive same-role turns. In individual group mode, Alice's and Bob's turns became one unlabeled assistant block.<speaker="Name">tags, and the agent history stripper removed them.On mobile, Echo sometimes showed an empty box until you scrolled up inside it. Focusing the composer or editing a message hid agent windows with
display: none. Echo keeps revealing reactions while hidden, but a hidden box has no scroll height, so auto-scroll did nothing. When the panel came back, the browser restored the old scroll offset instead of showing the newest reaction. A WebKit + Chromium probe reproduced this: the offset stayed at 226 after the scroll height grew to 306.What changed
speakerNameto agentrecentMessages, using the same resolver as the main prompt's group speaker prefixes. The resolver was extracted asresolveGroupIndividualHistorySpeaker, so both paths label speakers the same way. Agent history then prefixesName:and never doubles an existing prefix.characterId. Merged replies are saved under the first character (characterIds[0]), so labeling by ID would create misattribution. Agent history instead keeps<speaker>tags and still strips other markup.visibility: hidden, so its scroll box keeps working. Other agent windows keepdisplay: none, because some of them sit in the page flow and would otherwise leave gaps.agent-runtimenow checks labeled group history, that an existing prefix isn't doubled, and that<speaker>tags survive while other markup is stripped. This check fails without the fix.open-issueswas updated.agent-runtimealso covers nested markup such as<scr<b>ipt>, which history now strips to a fixed point (CodeQL).This change is Engine-owned: it touches agent context and history formatting plus Engine UI CSS. The Echo Chamber package in Marinara-Agents is unchanged.
Manual verification
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.