[PR #1444] [MERGED] fix(long-term-memory): picker focus, whole-chat chips and branch recall fallback (1.4.47) #1466

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1444
Author: @Promansis
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @Promansis

Base: staging ← Head: fix(long-term-memory)/1442-picker-recall-followups


📝 Commits (2)

  • 33e1de6 fix(long-term-memory): picker focus, whole-chat chips and branch recall fallback
  • 5edd1ea chore(long-term-memory): release 1.4.47 (#1442)

📊 Changes

25 files changed (+523 additions, -268 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.47.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+6 -0)
📝 packages/long-term-memory/client.js (+28 -28)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+36 -36)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourceScopeCombobox.tsx (+56 -36)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+2 -0)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/scope-targets.ts (+0 -6)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/BulkAvailabilityWorkbench.tsx (+54 -24)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/MemoryAvailabilityWorkbench.tsx (+10 -6)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/MemoryVault.tsx (+24 -8)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/vault-shared.ts (+23 -2)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/generation-injection.ts (+19 -9)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/notes.ts (+9 -5)

...and 5 more files

📄 Description

Linked issue

Closes #1442

Why this change

#1420 (1.4.45), #1433 (1.4.44) and #1438 (1.4.46) each shipped with small problems that their reviews listed and left unfixed. Two older problems in the same pickers are fixed here too, because the same files change. Users could see these:

  • In the place dropdown, focus went to the page body after the unsaved-changes prompt.
  • "No memories" closed when you switched tabs during a search.
  • A chat imported with "All branches" showed one chip per branch, and unticking the chat left the memory available in every one of those branches.
  • Bulk Remove couldn't remove a place that no longer exists.
  • If the shared-history lookup failed, the reply got no memories at all.

What changed

Place picker (SourceScopeCombobox.tsx)

  • choose now moves focus to the place button first, then closes, then calls onChange. The Vault's unsaved-changes prompt therefore records the place button as the return target, not an option that is about to unmount.
  • selectKind resets "No memories" only when the search is empty.
  • The <details>/<summary> toggle inside the listbox is gone. While collapsed, the last row is a role="option" "Show N places with no memories" (new plural pair showNoMemories / showNoMemoriesOne). Arrow keys reach it, and Enter or a click opens the group without calling onChange. While open, the group is a role="group" with a plain label, like "With memories".

Availability editors (vault/)

  • New wholeChatBranchIds and withWholeChatBranches in vault-shared.ts. While a whole chat G is selected, the branch ids Sources saved beside it (chatIds) count as part of G:
    • availabilityEntries gives them no chips. The Vault's place count uses the same rule, so it matches the editor.
    • Unticking or removing G in the single editor also drops them.
    • Bulk Remove of G also removes G's branch ids from every selected memory. A memory that would be left with no place is still marked invalid, so nothing becomes available everywhere. The user confirmed this behavior for memories that have a branch of G but not G itself.
  • Bulk Remove now also lists group, chat, character and persona ids that the selected memories have but no target matches, with the single editor's fallback labels. They are dropped when you switch to Add.
  • The editors still save a newly chosen whole chat as groupIds only. Stored data, recall and the Vault filter don't change.

Branch recall (server)

  • branchInheritedNoteIds catches its own failures. It rethrows when the request was aborted. Otherwise it logs a warning and returns undefined, which recalls the branch's own memories.
  • A ponytail: comment names the per-reply cost (listChats() plus listNotes() in a branched chat with summaries) and the upgrade path.
  • POST /search with a scope that names only the chat now passes inheritedNoteIds, under the same condition where the route already resolved "like a turn". It returns what a reply in that chat would recall.

Tests and dead code

  • Deleted the unused deriveScopeBranches and its cases.
  • The browser "All" check now looks only at queries made after the choice.
  • index-keys: the #1363 retrieveLongTermMemory fixture now checks that 린은 뭐 했지? recalls the 린이 웃었다 memory through bm25. The #1438 comment now says "folds with one allowed particle".

Release: long-term-memory 1.4.47, with the CHANGELOG entry, version, manifest, rebuilt client.js and server.mjs, artifact and catalog entries. The entry also clarifies 1.4.44: in Game and Conversation chats, only rolling summaries count toward shared-history recall.

Diff: source +203/−96 lines, tests +208/−60 lines, before the release commit.

Not in this PR, as the issue says:

  • #1438 treats every one-syllable word of a multi-word character title as a name. This is the approved design.
  • #1420's changelog omits the removed shortcuts. That note has shipped.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact:
    • Storage: none. Removing a whole chat now also writes the scope without its branch ids, through the existing note save and /notes/batch paths.
    • Recall: branches without a failing lookup recall exactly as before. /search returns more for a branch whose conversation shares summaries, matching a reply.
    • Merge danger: two-way door. The blast radius is the place dropdown, the availability editors and recall in branched chats.

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

These checks were run by the coding agent, not by a person. Engine checkout 2039583ca, Node v24.15.0.

  • Regressions added:
    • Browser: focus is on the place button after "Keep editing" and after "Discard". A tab change during a search keeps "No memories" open. ArrowDown reaches the "show" row, and Enter opens the group. Bulk Remove lists and removes an assignment to a deleted chat, and a bulk Remove of a whole chat sends { chatIds: [deleted-chat, memory-chat, memory-conversation-branch], groupIds: [conversation-a] }. An imported whole chat shows one chip, and unticking or removing it saves a scope with neither the group id nor its branch ids.
    • Branch recall: when listChats rejects, recall returns the branch's own memories and logs a warning. The search route returns the inherited memory for a branch.
  • Each fix was proved by reverting it. Reverting the focus order, the search reset, the missing rows, each whole-chat rule, the bulk request expansion, the server files or the catch made the matching check fail. The "show" row is new DOM, so the old source has nothing to compare.
  • On release HEAD 5edd1eabc, these all passed:
    • A package rebuild, which left the tree clean, so the committed outputs match the source.
    • test-fast.sh (npm run check, git diff --check) and typecheck-packages long-term-memory.
    • test-catalog-lanes, validate-package-locales, validate-catalog and catalog-release-notes.
    • test-ltm.sh browser, scope-targets, feedback-clarity-ui, index-keys, runtime and routes, plus branch-recall.
  • Not done: a live retest in Engine, and test-ltm.sh installation for the 1.4.47 artifact. Hosted CI runs the full Long-Term Memory regression list.

Documentation impact

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

UI evidence (if applicable)

None attached. The browser regression drives the controls headlessly.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Updated Long-Term Memory to version 1.4.47.
    • The place picker now lets you expand places without memories, with improved keyboard navigation and focus behavior.
    • Bulk availability removal now accounts for branches covered by selected chats and includes obsolete chats, characters, and personas.
  • Improvements
    • Chat-only searches can retrieve shared memories recalled by a reply.
    • Shared-history lookup failures fall back to a branch’s own memories; Game and Conversation chats limit shared-history recall to rolling summaries.

🔄 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/1444 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/1442-picker-recall-followups` --- ### 📝 Commits (2) - [`33e1de6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/33e1de6a8f8cdae361f8cb5fc013c413af3a2cdc) fix(long-term-memory): picker focus, whole-chat chips and branch recall fallback - [`5edd1ea`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5edd1eabc0b89fffd8f4833146791d56c7d7870e) chore(long-term-memory): release 1.4.47 (#1442) ### 📊 Changes **25 files changed** (+523 additions, -268 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.47.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+6 -0) 📝 `packages/long-term-memory/client.js` (+28 -28) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+36 -36) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourceScopeCombobox.tsx` (+56 -36) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+2 -0) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/scope-targets.ts` (+0 -6) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/BulkAvailabilityWorkbench.tsx` (+54 -24) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/MemoryAvailabilityWorkbench.tsx` (+10 -6) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/MemoryVault.tsx` (+24 -8) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/vault-shared.ts` (+23 -2) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/generation-injection.ts` (+19 -9) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes/notes.ts` (+9 -5) _...and 5 more files_ </details> ### 📄 Description ## Linked issue Closes #1442 ## Why this change #1420 (1.4.45), #1433 (1.4.44) and #1438 (1.4.46) each shipped with small problems that their reviews listed and left unfixed. Two older problems in the same pickers are fixed here too, because the same files change. Users could see these: - In the place dropdown, focus went to the page body after the unsaved-changes prompt. - "No memories" closed when you switched tabs during a search. - A chat imported with "All branches" showed one chip per branch, and unticking the chat left the memory available in every one of those branches. - Bulk Remove couldn't remove a place that no longer exists. - If the shared-history lookup failed, the reply got no memories at all. ## What changed **Place picker (`SourceScopeCombobox.tsx`)** - `choose` now moves focus to the place button first, then closes, then calls `onChange`. The Vault's unsaved-changes prompt therefore records the place button as the return target, not an option that is about to unmount. - `selectKind` resets "No memories" only when the search is empty. - The `<details>`/`<summary>` toggle inside the listbox is gone. While collapsed, the last row is a `role="option"` "Show N places with no memories" (new plural pair `showNoMemories` / `showNoMemoriesOne`). Arrow keys reach it, and Enter or a click opens the group without calling `onChange`. While open, the group is a `role="group"` with a plain label, like "With memories". **Availability editors (`vault/`)** - New `wholeChatBranchIds` and `withWholeChatBranches` in `vault-shared.ts`. While a whole chat G is selected, the branch ids Sources saved beside it (`chatIds`) count as part of G: - `availabilityEntries` gives them no chips. The Vault's place count uses the same rule, so it matches the editor. - Unticking or removing G in the single editor also drops them. - Bulk Remove of G also removes G's branch ids from every selected memory. A memory that would be left with no place is still marked invalid, so nothing becomes available everywhere. The user confirmed this behavior for memories that have a branch of G but not G itself. - Bulk Remove now also lists group, chat, character and persona ids that the selected memories have but no target matches, with the single editor's fallback labels. They are dropped when you switch to Add. - The editors still save a newly chosen whole chat as `groupIds` only. Stored data, recall and the Vault filter don't change. **Branch recall (server)** - `branchInheritedNoteIds` catches its own failures. It rethrows when the request was aborted. Otherwise it logs a warning and returns `undefined`, which recalls the branch's own memories. - A `ponytail:` comment names the per-reply cost (`listChats()` plus `listNotes()` in a branched chat with summaries) and the upgrade path. - `POST /search` with a scope that names only the chat now passes `inheritedNoteIds`, under the same condition where the route already resolved "like a turn". It returns what a reply in that chat would recall. **Tests and dead code** - Deleted the unused `deriveScopeBranches` and its cases. - The browser "All" check now looks only at queries made after the choice. - index-keys: the #1363 `retrieveLongTermMemory` fixture now checks that `린은 뭐 했지?` recalls the `린이 웃었다` memory through `bm25`. The #1438 comment now says "folds with one allowed particle". **Release:** `long-term-memory` 1.4.47, with the CHANGELOG entry, version, manifest, rebuilt `client.js` and `server.mjs`, artifact and catalog entries. The entry also clarifies 1.4.44: in Game and Conversation chats, only rolling summaries count toward shared-history recall. Diff: source +203/−96 lines, tests +208/−60 lines, before the release commit. Not in this PR, as the issue says: - #1438 treats every one-syllable word of a multi-word character title as a name. This is the approved design. - #1420's changelog omits the removed shortcuts. That note has shipped. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: - **Storage:** none. Removing a whole chat now also writes the scope without its branch ids, through the existing note save and `/notes/batch` paths. - **Recall:** branches without a failing lookup recall exactly as before. `/search` returns more for a branch whose conversation shares summaries, matching a reply. - **Merge danger:** two-way door. The blast radius is the place dropdown, the availability editors and recall in branched chats. ## 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 These checks were run by the coding agent, not by a person. Engine checkout `2039583ca`, Node `v24.15.0`. - **Regressions added:** - Browser: focus is on the place button after "Keep editing" and after "Discard". A tab change during a search keeps "No memories" open. ArrowDown reaches the "show" row, and Enter opens the group. Bulk Remove lists and removes an assignment to a deleted chat, and a bulk Remove of a whole chat sends `{ chatIds: [deleted-chat, memory-chat, memory-conversation-branch], groupIds: [conversation-a] }`. An imported whole chat shows one chip, and unticking or removing it saves a scope with neither the group id nor its branch ids. - Branch recall: when `listChats` rejects, recall returns the branch's own memories and logs a warning. The search route returns the inherited memory for a branch. - **Each fix was proved by reverting it.** Reverting the focus order, the search reset, the missing rows, each whole-chat rule, the bulk request expansion, the server files or the catch made the matching check fail. The "show" row is new DOM, so the old source has nothing to compare. - On release HEAD `5edd1eabc`, these all passed: - A package rebuild, which left the tree clean, so the committed outputs match the source. - `test-fast.sh` (`npm run check`, `git diff --check`) and `typecheck-packages long-term-memory`. - `test-catalog-lanes`, `validate-package-locales`, `validate-catalog` and `catalog-release-notes`. - `test-ltm.sh browser`, `scope-targets`, `feedback-clarity-ui`, `index-keys`, `runtime` and `routes`, plus `branch-recall`. - Not done: a live retest in Engine, and `test-ltm.sh installation` for the 1.4.47 artifact. Hosted CI runs the full Long-Term Memory regression list. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) None attached. The browser regression drives the controls headlessly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Updated Long-Term Memory to version 1.4.47. * The place picker now lets you expand places without memories, with improved keyboard navigation and focus behavior. * Bulk availability removal now accounts for branches covered by selected chats and includes obsolete chats, characters, and personas. * **Improvements** * Chat-only searches can retrieve shared memories recalled by a reply. * Shared-history lookup failures fall back to a branch’s own memories; Game and Conversation chats limit shared-history recall to rolling summaries. <!-- 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:11:47 +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#1466
No description provided.