mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7236] [MERGED] feat(memory): tell users about memory problems and fix them in one click #7642
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#7642
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/7236
Author: @SpicyMarinara
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/advanced-memory-fix-all📝 Commits (5)
ac08962feat(memory): tell users about memory problems and fix them in one clickf481e32Merge origin/staging into feat/advanced-memory-fix-all9e317cbfix(memory): keep a pending Fix request and repair scenes after a failed continuity retry9bd22caMerge remote-tracking branch 'origin/feat/advanced-memory-fix-all' into feat/advanced-memory-fix-allb58a6b6Merge origin/staging into feat/advanced-memory-fix-all📊 Changes
17 files changed (+1123 additions, -65 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/TROUBLESHOOTING.md(+10 -0)📝
docs/agents/memory.md(+18 -3)📝
docs/chats/chat-settings.md(+1 -1)📝
e2e/advanced-memory.e2e.ts(+172 -0)📝
packages/client/src/components/chat/AdvancedMemoryInspector.tsx(+45 -12)📝
packages/client/src/components/chat/AdvancedMemorySettings.tsx(+113 -5)📝
packages/client/src/components/chat/ChatArea.tsx(+8 -1)📝
packages/client/src/components/chat/ChatSettingsBubble.tsx(+31 -3)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+40 -2)📝
packages/client/src/hooks/use-advanced-memory.ts(+118 -3)📝
packages/client/src/localization/locales/en.json(+21 -1)📝
packages/client/src/stores/ui.store.ts(+5 -0)📝
packages/server/src/routes/advanced-memory.routes.ts(+3 -0)📝
packages/server/src/services/advanced-memory.ts(+133 -34)📝
packages/shared/src/types/advanced-memory.ts(+75 -0)➕
scripts/regressions/advanced-memory-fix.regression.ts(+329 -0)📄 Description
Linked issue
Closes #7234
Why this change
LOG_LEVELdefaults towarn). The maintainer sees those in her server console, while launcher, installer, Android and Termux users never do. There is no role or debug gating; the difference is only where the warnings appear.What changed
advancedMemoryProblems(status)inpackages/shared). It sorts problems into scenes Fix can repair (unclear or unchecked participants, outdated, withheld or missing summaries) and scenes only the user can settle (hand-edited summaries that no longer match, or participants the helper still couldn't decide), plus blockers (unconfirmed knowledge ranges, unusable Decision connection) and a stopped job. Deleted and excluded summaries and the unscoped-summary/agent advisories are not problems. The badge, the notice, the Fix box and the server's Fix report all use it.ChatSettingsBubble+useAdvancedMemoryAttention). The Chat Settings button now watches the open Roleplay chat's Advanced Memory even with Chat Settings closed. While problems exist it shows a steady dot in the accent color, held steady so it never pulses with Accent Pulse, with a screen-reader description. Each new problem scene triggers one notice: "Advanced Memory found problems in N scenes." with Fix (or Review memory when nothing is fixable). Announced scenes are remembered per chat inlocalStorage(try/catch, capped). Because the status observer is always mounted, the existing "Advanced Memory stopped" toast now also fires with Chat Settings closed. Access memories for this chat gets the same dot.POST /chats/:id/advanced-memory/initialize { fixAll: true }, no new endpoint). It reuses the preparation run, so the queue, locks, progress and Pause all apply, and it waits for running work instead of joining it.scene-audience-unresolvedmarker and lists the scene for review, so the next Fix doesn't ask again.correctionReviewErrorstopping the run, Fix lists the scene for review and continues with the others. When a correction's scene boundaries moved, overlapping scenes are skipped and their older summaries kept.job.fixResult = { jobId, fixedSceneIds, reviewSceneIds }. A scene counts as fixed only if it was flagged before Fix and is no longer flagged after it. The run logs[advanced-memory] Fix for chat … N fixed, M need reviewwith Pino. The helper prompts are unchanged, so debug prompt logging still applies, and the client sendsdebugMode.chat.advancedMemory.fix.*keys inen.jsononly. The unusedwarning.sceneAudienceUnmatchedkey was removed.docs/agents/memory.md(plus the participants, visibility and Prepare existing history paragraphs), a troubleshooting entry, and a sentence indocs/chats/chat-settings.md. CHANGELOG entry at the top of[Unreleased].Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run results (not a substitute for the boxes above):
pnpm check: exit 0 (formatting, impeccable, localization, lint, e2e types, build).pnpm localization:check: passes.scripts/regressions/advanced-memory-fix.regression.ts, with a fake helper over a real file store. One Fix run:ready;fixResultIDs and agreement withadvancedMemoryProblems, that a second Fix only retries the failed check, and that saving access by hand settles the unclear scene.advanced-memory-*regressions, plusmemory-recall*,roleplay-user-private-memoryandnative-export-memory: pass.e2e/advanced-memory.e2e.tsande2e/advanced-memory-wizard.e2e.tsondesktop-chromiumandmobile-webkit: 40 passed. Existing tests are unchanged. The new test covers:fixAll: trueand showing progress with Pause;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)Docs changed:
docs/agents/memory.md,docs/TROUBLESHOOTING.md,docs/chats/chat-settings.md,CHANGELOG.md. Translation follow-up: #7235 (related: #7225).UI evidence (if applicable)
Playwright captured light and dark screenshots of the notice, the Fix box before Fix and the Fix result on desktop and iPhone (
memory-fix-notice-*,memory-fix-box-*,memory-fix-result-*in the test output folder). They were not uploaded, because the agent can't post images; please add screenshots when verifying manually.Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.