mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7048] [MERGED] fix(memory): allow editing scene summary timeframes #7443
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#7443
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/7048
Author: @SpicyMarinara
Created: 10/4/2026
Status: ✅ Merged
Merged: 10/4/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/scene-summary-timeframes📝 Commits (4)
005ad02chore: track scene timeframe editing for #7047b4a493cfix(memory): allow editing scene summary timeframescd3019efix(memory): preserve timeframe corrections across summary refreshesf2a84f8fix(memory): allow timeframe edits on empty imported summaries📊 Changes
9 files changed (+602 additions, -36 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
e2e/advanced-memory.e2e.ts(+198 -4)📝
packages/client/src/components/chat/AdvancedMemoryInspector.tsx(+29 -5)📝
packages/client/src/hooks/use-advanced-memory.ts(+1 -1)📝
packages/server/src/routes/advanced-memory.routes.ts(+4 -1)📝
packages/server/src/services/advanced-memory.ts(+117 -21)📝
packages/shared/src/types/advanced-memory.ts(+1 -1)📝
scripts/regressions/advanced-memory-core.regression.ts(+1 -1)📝
scripts/regressions/advanced-memory-summary.regression.ts(+249 -2)📄 Description
Linked issue
Closes #7047
Why this change
Roleplay Advanced Memory displays a scene's Story timeframe, but the summary editor and save API did not let users correct it. An incorrect date could therefore remain in the archive and recalled memory even after the summary text was edited.
What changed
Validation
pnpm checkpasses locallyCONTRIBUTING.mdFinal implementation:
f2a84f84a4a2e09594ec485368095e9c07773070.pnpm check: passed (includes localization, formatting, lint/types and production build).node scripts/run-regressions.mjs --filter advanced-memory: 11/11 passed, andpnpm regression:prompt: passed oncd3019eef355bca25974e2a3909f5047d3838619. The subsequent change only adjusts the client Save guard and its browser proof; server/shared code is unchanged.PLAYWRIGHT_ONLY_PROJECT=desktop pnpm exec playwright test --project=desktop-chromium --grep 'Advanced Memory scene timeframes|@smoke' --workers=1: 8/8 passed. Covers real persistence, retry, reload, clearing, and timeframe-only saves on an imported empty open summary; deleting an existing nonempty summary remains blocked.b4a493c5e5ea54c60c51ccf6d92408476440fe3c: focused timeframe scenario passed 3/3 on desktop Chromium, mobile Chromium and mobile WebKit; existing large-inspector scenario and seven shell smoke cases passed 8/8.node scripts/smoke-container.mjs marinara-7048-final full arm64: passed oncd3019eef355bca25974e2a3909f5047d3838619, including native dependencies, frontend assets, nonroot execution, persisted settings and clean shutdown. The final client guard passed the final local build/browser run, and the hosted container build/runtime check passed on the final revision.Review fixes
Both hosted findings were reproduced/traced and fixed: constant-summary rendering now honors saved scene timeframes even when the scene was already copied into constants, and timeframe-only edits preserve generated recap dependencies so source-summary changes can still refresh the text. Regression coverage also checks cleared dates, audience restrictions, cached-prompt invalidation, retaining dependencies when optional recall is dropped, and discarding deleted timing when explicitly regenerating a deleted scene.
The final hosted review suggested tracking only already-corrected scenes as constant-timing dependencies. This was not adopted: a prepared constant-only prompt must also be invalidated by the first timeframe correction. The existing regression in
advanced-memory-summary.regression.tsprepares withretrieveMaxScenes: 0before that first edit and asserts thatvalidatePreparedrejects the old receipt afterward. Filtering out uncorrected scenes would remove the revision needed to detect that change. The conservative invalidation is intentional; an independent review confirmed this disposition. Review discussion.Manual verification notes
Browser automation exercises real API persistence: edit only the timeframe, retry a failed save without losing the draft, save and reload, switch scenes, and clear an old timeframe. It checks that summary text, message IDs and character access stay unchanged. Screenshots are inspected in both themes.
Manually verify the Story timeframe field and Save correction on a physical phone; local mobile coverage uses browser emulation. All checklist boxes are intentionally left for the human contributor.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Added a user-facing CHANGELOG.md entry. No installation, translated documentation, storage-version or release-version changes.
UI evidence (if applicable)
Before/after screenshots, desktop and both mobile engines in light/dark themes. All eight uploaded PNGs were verified against their local captures.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.