mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2840] [MERGED] fix(summary): restore auto-hide for roleplay rolling summaries #5763
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#5763
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/2840
Author: @Romuromylus
Created: 6/23/2026
Status: ✅ Merged
Merged: 6/23/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/2820-reapply-auto-summary-hide📝 Commits (1)
a2a2172fix(summary): restore auto-hide for roleplay rolling summaries📊 Changes
1 file changed (+29 additions, -2 deletions)
View changed files
📝
packages/server/src/routes/generate.routes.ts(+29 -2)📄 Description
Linked issue
Re-applies the auto-hide behavior from #2820 / #2821, which regressed on
stagingafter merge. No separate regression issue was opened — this PR documents the regression below.Why this change
The roleplay rolling-summary auto-hide shipped in #2821, but commit
f955a646("Local models should get the tools block") inadvertently reverted it. That commit's branch was based on an olderstaging(before #2821 merged); when it landed, its copy ofgenerate.routes.tsoverwrote the auto-hide orchestration while correctly adding the tools block. As a result, automatic rolling summaries stopped hiding the messages they covered, so the summary no longer reduces prompt tokens.Manual summaries and unhide-on-delete were not touched by the conflict and still work — only the automatic path regressed. The supporting helpers (
computeSummaryHideIds,resolveRoleplaySummaryTail), the storage method (bulkSetHiddenFromAI), and the manual-hide route all survived, so this is a faithful re-application with no new logic.What changed
packages/server/src/routes/generate.routes.ts(automatic-summary path only):computeSummaryHideIds/resolveRoleplaySummaryTailimports.autoHideIdsup front, gated on the per-chathideSummarisedMessagessetting and excluding the protected recent tail (summaryTailMessages).hiddenMessageIdson the summary entry so deleting the entry restores exactly the set it hid.bulkSetHiddenFromAIand echohiddenMessageIdsback in thechat_summarySSE payload.The tools-block change from
f955a646is left intact (verified present after this patch).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm checkrun locally → exit 0 (TypeScript + ESLint + client build all clean).Docs and release impact
UI evidence (if applicable)
Server-only change; no UI surface added. Behavior is observable via the message hidden-from-AI state after an automatic summary.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.