mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7331] [MERGED] fix(chat-settings): say when Advanced Memory sizes Roleplay history #7682
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#7682
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/7331
Author: @SpicyMarinara
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/7321-rp-context-message-limit📝 Commits (7)
941cb93fix(chat-settings): say when Advanced Memory sizes Roleplay history473dc18test(regressions): note the ceiling of the drawer wiring check00281a3Merge origin/staging into fix/7321-rp-context-message-limitd5a0ac4test(regressions): check the note's display condition in Advanced Parametersaf1f086Merge origin/staging into fix/7321-rp-context-message-limita421df7Merge origin/staging into fix/7321-rp-context-message-limitdc103beMove the CHANGELOG entry away from other open PRs📊 Changes
6 files changed (+147 additions, -0 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/prompts/generation-parameters.md(+2 -0)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+1 -0)📝
packages/client/src/features/chat-settings/sections/AdvancedParametersSection.tsx(+8 -0)📝
packages/client/src/localization/locales/en.json(+1 -0)➕
scripts/regressions/context-message-limit-modes.regression.ts(+134 -0)📄 Description
Linked issue
Closes #7321
Why this change
generate.routes.ts(line 1909) andgenerate/dry-run-route.ts(line 758) apply it only when!advancedMemoryEnabled. Advanced Memory then sizes the history with its own token cap, Maximum allowed context before compression (default 65,000 tokens), so a long chat can send far more than 45 messages. Advanced Memory came out of Alpha in 2.5.0, which fits "it worked before the update".scripts/regressions/advanced-memory-generation.regression.tssetscontextMessageLimit: 1on its Advanced Memory chat and still expects earlier messages, such asHISTORY_9at line 631. So Advanced Memory skipping the limit is intended, and this PR does not change it.What changed
advancedMemoryEnabledvalue. The new key is inen.jsononly.docs/prompts/generation-parameters.md→ Context message limit now explains that this limit is not used while Advanced Memory is on, and how to send less history in that case.scripts/regressions/context-message-limit-modes.regression.tsuses/api/generate/dryRunto check that Conversation, Game and plain Roleplay send only the last 3 of 12 messages and that Advanced Memory sends all 12 while they fit its cap. It also checks that the drawer passesadvancedMemoryEnabledto the section, that the section shows the note only while both the limit and Advanced Memory are on, and that the English key exists. The wiring check fails on currentstaging.[Unreleased].Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run checks:
pnpm checkpassed.pnpm regression:promptpassed (prompt, prompt-attachments and context-fit).pnpm localization:checkpassed.node ./scripts/run-regressions.mjs --filter scripts/regressions/context-message-limit-modespasses, and with the client change removed it fails on the wiring check.scripts/regressions/advanced-memory-generation.regression.tspasses. Local CodeRabbit (--committedagainst the staging merge base) returned 1 trivial finding: it asked to replace the source-text wiring check with a rendered component test. I did not do that, because renderingAdvancedParametersSectionneeds a QueryClient, i18n and several connection hooks that no regression harness provides yet. The check follows the source-check pattern thatfloating-window.regression.tsalready uses for this drawer. Aponytail:comment records its limit and how to replace it later. GitHub CodeRabbit then asked for a check of the section's display condition; that source check was added ind5a0ac489, and a second local CodeRabbit run on the final code returned no findings.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Translation follow-up: #7330 (
[docs-i18n] docs/prompts/generation-parameters.md).UI evidence (if applicable)
No screenshots. The change is one line of muted helper text under an existing control.
Maintainer decision
If Limit Context Messages should also cap the live window under Advanced Memory, as the issue expected, that takes a small change in
prepareImpl(packages/server/src/services/advanced-memory.ts). A message limit would trigger the same scene rollover and bounded earlier-scene excerpts that the token cap triggers today. That change breaksadvanced-memory-generation.regression.tsline 631, because its fixture setscontextMessageLimit: 1. The fixture would need your approval to change, so this PR leaves that behaviour as it is.Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.