[PR #730] [MERGED] fix(long-term-memory): isolate tab loading scopes #1110

Closed
opened 2026-10-21 05:02:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/730
Author: @Promansis
Created: 9/6/2026
Status: ✅ Merged
Merged: 9/6/2026
Merged by: @Promansis

Base: staging ← Head: fix(long-term-memory)/tab-loading-scope-isolation


📝 Commits (3)

  • 9ef30f9 fix(long-term-memory): isolate loading scopes
  • f254197 release(long-term-memory): publish 1.2.22
  • 35710b6 fix(long-term-memory): handle scope loading errors

📊 Changes

16 files changed (+189 additions, -77 deletions)

View changed files

➕ artifacts/long-term-memory-1.2.22.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/long-term-memory/CHANGELOG.md (+5 -0)
📝 packages/long-term-memory/client.js (+22 -22)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx (+3 -2)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx (+61 -31)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/api.ts (+3 -0)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+1 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
➕ tests/long-term-memory-loading.regression.mjs (+54 -0)

📄 Description

Linked issue

Closes #729

Why this change

Long-Term Memory Vault, Review Queue, and Sources could issue redundant loading work and Sources could briefly show data from a previous chat scope during context changes.

What changed

  • Reuse the canonical all-chats scope-target query key between Memory Vault and Sources.
  • Cache scope-target metadata briefly to reduce tab-switch refetches.
  • Gate Sources previews/details until scope resolution completes.
  • Prevent generic preview scans from running for Lorebooks alongside the dedicated endpoint.
  • Suppress stale Sources results when the capability chat context changes.
  • Add loading and scope-isolation regression coverage.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; manifest remains at Engine >=2.4.1 <4.0.0
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Automated validation completed for commit 9ef30f91:

  • npm run check passed with existing warnings only.
  • test-ci.sh passed.
  • test-ltm.sh all passed, including lifecycle, runtime, scope-target, source-task, mobile UI, and loading regressions.
  • node tests/long-term-memory-loading.regression.mjs passed.

Manual install/update and screenshot evidence were not performed.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

No screenshots attached; the focused UI regression suite passed.

Summary by CodeRabbit

  • Bug Fixes

    • Prevented stale previews, lorebook details, and source information from appearing when the selected context does not match the current chat.
    • Preserved selected source targets during parent chat context changes.
    • Added a 30-second refresh window for scope-target data, improving consistency across memory views.
  • Tests

    • Added regression coverage for shared scope-target caching and context-aware loading behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/730 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/6/2026 **Status:** ✅ Merged **Merged:** 9/6/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/tab-loading-scope-isolation` --- ### 📝 Commits (3) - [`9ef30f9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9ef30f91cae83b410cb633d5990c07981c4485ad) fix(long-term-memory): isolate loading scopes - [`f254197`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f254197eb869558e3ca642cb0f420f8c055f6b31) release(long-term-memory): publish 1.2.22 - [`35710b6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/35710b66cf5a6f8057808704aa904fff48c60360) fix(long-term-memory): handle scope loading errors ### 📊 Changes **16 files changed** (+189 additions, -77 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.2.22.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/long-term-memory/CHANGELOG.md` (+5 -0) 📝 `packages/long-term-memory/client.js` (+22 -22) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx` (+3 -2) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx` (+61 -31) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/api.ts` (+3 -0) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+1 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) ➕ `tests/long-term-memory-loading.regression.mjs` (+54 -0) </details> ### 📄 Description ## Linked issue Closes #729 ## Why this change Long-Term Memory Vault, Review Queue, and Sources could issue redundant loading work and Sources could briefly show data from a previous chat scope during context changes. ## What changed - Reuse the canonical all-chats scope-target query key between Memory Vault and Sources. - Cache scope-target metadata briefly to reduce tab-switch refetches. - Gate Sources previews/details until scope resolution completes. - Prevent generic preview scans from running for Lorebooks alongside the dedicated endpoint. - Suppress stale Sources results when the capability chat context changes. - Add loading and scope-isolation regression coverage. ## Package and security impact - Affected package IDs: long-term-memory - Engine compatibility impact: none; manifest remains at Engine >=2.4.1 <4.0.0 - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Automated validation completed for commit 9ef30f91: - `npm run check` passed with existing warnings only. - `test-ci.sh` passed. - `test-ltm.sh all` passed, including lifecycle, runtime, scope-target, source-task, mobile UI, and loading regressions. - `node tests/long-term-memory-loading.regression.mjs` passed. Manual install/update and screenshot evidence were not performed. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) No screenshots attached; the focused UI regression suite passed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Prevented stale previews, lorebook details, and source information from appearing when the selected context does not match the current chat. * Preserved selected source targets during parent chat context changes. * Added a 30-second refresh window for scope-target data, improving consistency across memory views. * **Tests** * Added regression coverage for shared scope-target caching and context-aware loading behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:02:54 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1110
No description provided.