mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7442] [MERGED] fix(chat-profiles): hide or show summarised messages when a profile changes the setting #7735
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#7735
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/7442
Author: @SpicyMarinara
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/profile-apply-hide-summarised📝 Commits (1)
be3fe3cfix(chat-profiles): hide or show summarised messages when a profile changes the setting📊 Changes
5 files changed (+233 additions, -59 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/routes/chats.routes.ts(+5 -58)📝
packages/server/src/routes/generate/generate-route-utils.ts(+62 -0)📝
packages/server/src/services/storage/chat-presets.storage.ts(+7 -1)➕
scripts/regressions/profile-apply-hide-summarised.regression.ts(+158 -0)📄 Description
Linked issue
Closes #7426
Why this change
PATCH /api/chats/:id/metadatahides or shows the summarised messages, and updatessummaryEntries[].hiddenMessageIds, only for its own writes.applyToChatwrites the whole metadata object and skipped that step.What changed
summaryHidingPatch(generate-route-utils.ts, next tocomputeSummaryHideIds) now holds the hide/show step the PATCH route had inline. When the setting goes from off to on it hides each enabled entry's messages, except the recent tail, and records them inhiddenMessageIds. When it goes from on to off it shows only the messages the summaries hid. If the setting does not change it touches nothing and returns{}.patchMetadataupdater, which already holds the chat's metadata queue, as before.applyToChatcalls it inside its ownwithChatMetadataPatchQueuesection and saves the result in the same metadata write. The lock order is the same as the PATCH route's: metadata queue first, then each message's extra queue (insidebulkSetHiddenFromAI). So no new nesting and no deadlock.hideSummarisedMessageson its own.hideSummarisedMessagesis not inCHAT_PROFILE_FOLLOWER_SYNC_KEYS, and #7422 deliberately lets each follower keep its own value. So the helper sees no change and returns early for followers. The regression checks this.scripts/regressions/profile-apply-hide-summarised.regression.ts. It fails on staging at "applying the profile hides messages 1-3" and passes with this change.[Unreleased].Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run by the agent (results as reported locally, not a substitute for the boxes above):
pnpm check: exit 0node ./scripts/run-regressions.mjs --filter scripts/regressions/profile-apply-hide-summarised.regression.ts: passes with the fix. On staging (fix not applied) it fails at "applying the profile hides messages 1-3" (actual[6], expected[1, 2, 3, 6]).chat-profile-followers,summary-write-range,experience-state-ordinal,advanced-memory-generation,chat-variables-preset-precedence,open-issues,prompt.hiddenMessageIdsis set. Messages 4-5 are kept as the profile's tail of 2, and message 6, hidden by the user, stays hidden.hiddenMessageIdsis removed, and the user's own hidden message 6 stays hidden.Manual verification notes
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Only
CHANGELOG.mdchanged. Nodocs/files changed, so no translated docs follow-up is needed.Local CodeRabbit review
coderabbit review --agent --committed --base-commit $(git merge-base HEAD origin/staging): completed with 0 findings. Nothing was rejected.UI evidence (if applicable)
No UI changes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.