mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8687] [MERGED] fix(chat): impersonated turns keep their reasoning and regenerate in Individual groups #8749
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#8749
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/8687
Author: @SpicyMarinara
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/impersonation-reasoning-regen-8682📝 Commits (1)
a13fa31fix(chat): impersonated turns keep their reasoning and regenerate in Individual groups (#8682)📊 Changes
4 files changed (+308 additions, -3 deletions)
View changed files
➕
e2e/impersonation-reasoning.e2e.ts(+106 -0)📝
packages/client/src/components/chat/ChatMessage.tsx(+3 -2)📝
packages/server/src/routes/generate.routes.ts(+4 -1)➕
scripts/regressions/impersonation-group-regeneration.regression.ts(+195 -0)📄 Description
Linked issue
Closes #8682
Why this change
A user who relies on guided impersonation in roleplay reported two recurring problems:
extra.thinkingon the persona's message. ButChatMessage.tsxshowed reasoning only on non-user rows: both the inline disclosure and the "View model thoughts" button were gated on!isUser.characterId. A persona's message has none, so the request ended with that error. Single-character and Merged chats never took that branch.What changed
packages/client/src/components/chat/ChatMessage.tsx: a user message with saved reasoning shows it the way a reply does:packages/server/src/routes/generate.routes.ts: in an Individual group, only a character's message now regenerates as that character. Every persona message takes the path single-character and Merged chats already use:generationReplay).scripts/regressions/impersonation-group-regeneration.regression.tscovers single-character, Merged and Individual chats.e2e/impersonation-reasoning.e2e.tscovers the reasoning button and the inline disclosure after an impersonation.No strings, docs, CHANGELOG or version files changed.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What the agent ran locally:
node ./scripts/pnpm-runner.mjs check: exit 0. It covers localization, format, lint, the e2e and token-estimation types, and the build.node ./scripts/run-regressions.mjs --filter impersonation-group-regeneration). Before the fix, only the Individual group fails, with the reported error. With only an!input.impersonatecondition, the persona-rewrite steps (typed message, replay removed) still fail. It passes with this change. It checks that:e2e/impersonation-reasoning.e2e.ts): it fails on desktop-chromium and mobile-chromium before the client change and passes after it. mobile-webkit was run only with the fix./api/generatepath through a streaming stub in an Individual group, on desktop and phone, in light and dark, with Show Thinking off and on. Their one finding, branched chats and typed messages, is fixed here.For a human to verify:
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
The e2e proof checks that the "View model thoughts" button and the inline disclosure appear on the persona's message after an impersonation. No screenshots attached.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.