mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8643] [Bug]: Fully streamed Roleplay response flashes and becomes a shorter unchanged prefix after completion #8439
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#8439
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 @psych0genesis on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8643
Originally assigned to: @SpicyMarinara on GitHub.
Observed behavior
In Roleplay mode, a multi-paragraph assistant response was visibly displayed in full during streaming. Immediately when generation finished, the chat flashed/re-rendered and the displayed message abruptly became shorter, ending mid-sentence. The remaining text matched the original prefix exactly; no paraphrase or rewritten wording was observed in the retained segment. No explicit error appeared.
The user did not reload the page, so it is unknown whether the truncated version was actually persisted or the issue was only a client presentation/cache handoff.
A subsequent out-of-character request to redisplay the response caused a new response with essentially the same narrative continuing naturally beyond the prior cutoff. It contained at least one small wording/formatting difference. This was regeneration, not proof that the complete first response was stored or restored.
Expected behavior
The content already shown as a completed reply should not silently lose its ending when the stream is finalized or the saved message replaces the live buffer. If cleanup or a model length limit shortens a reply, surface what happened and preserve/recover original content where possible.
Diagnostic leads, not established root causes
content_replacepayload,message_saveddata, and reloaded/persisted message. Do not require submitting private story text.packages/client/src/hooks/use-generate.tscan replace the displayed stream viareplaceGeneratedContentWithTypewriter;packages/client/src/lib/generation-stream-policy.tsreconciles authoritative shorter replacements by shortening visible text.trimIncompleteModelOutputduring server-side cleanup; user setting not checked for this occurrence.Reproduction investigation
Environment / uncertainty
Desktop Roleplay UI, GLM 5.3 Flash family model. Exact application build, setting states, reproducibility frequency, and the stage where content was lost are unverified.
Related but not duplicate issues: #4714 (formatting changes at stream completion), #2739 (abort persistence), #2737 (content replaced by rewrite). No stop/abort action was reported.
This report deliberately contains no identifying names, locations, machine paths, story excerpts or screenshots.
@SpicyMarinara commented on GitHub (Nov 1, 2026):
Thanks for the careful report. Both of your leads turned out to be real, and #8652 fixes each one:
*She smiles softly.*lost its last paragraph. That no longer happens, and when the trim really does cut a reply, a toast now tells you.To confirm which one you hit: did you have a rewrite agent turned on (and was "hold for rewrite" off), or the trim setting? If it happens again after #8652 reaches staging, please reopen this issue.
🤖 Generated with Claude Code
@SpicyMarinara commented on GitHub (Nov 1, 2026):
Fixed in #8652, merged into
staging(both paths described above). Please reopen if it still happens once you're on staging.