[PR #1521] [MERGED] fix(long-term-memory): cap the Memory Vault at 100 rows per type and defer the search (1.4.64) #1530

Closed
opened 2026-10-22 04:03:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/vault-row-cap


📝 Commits (6)

  • 2c96159 fix(long-term-memory): cap the Memory Vault at 100 rows per type and defer the search (#1514)
  • c96f527 chore(long-term-memory): release 1.4.60 (#1514)
  • 88a2509 Merge upstream/staging into fix(long-term-memory)/vault-row-cap; release long-term-memory 1.4.61
  • a0107f9 Merge upstream/staging into fix(long-term-memory)/vault-row-cap; release long-term-memory 1.4.64
  • 0edece2 test(long-term-memory): wait for the status read before checking a healthy vault shows no health pill
  • 0894179 test(long-term-memory): check that Select visible covers every memory beyond the Vault cap

📊 Changes

18 files changed (+460 additions, -226 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.64.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/client.js (+24 -24)
📝 packages/long-term-memory/docs/UI.md (+5 -1)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+1 -0)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/MemoryVault.tsx (+141 -154)
➕ packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/VaultRow.tsx (+152 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-browser.regression.ts (+85 -1)
📝 tests/long-term-memory-feedback-clarity-ui.regression.mjs (+7 -6)
📝 tests/long-term-memory-source-paths.mjs (+1 -0)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #1514

Why this change

  • The Memory Vault draws a row for every memory in the place, even inside closed groups, and every search letter redraws all of them. At 8,000 memories a letter took about 3 s to appear on a fast desktop and 13 s on a phone-speed CPU, and opening the Vault stalled for 1.7 s. Even a 197-memory vault crossed 100 ms on the first letter.
  • A CPU profile showed the cost is laying out and rendering the rows, not the screen's own code, so drawing fewer rows is what helps.

What changed

  • long-term-memory client, Vault only:
    • The search text is deferred, the filtered list and the shown rows are memoized, and the row is a memoized VaultRow component, so a letter appears before the list is rebuilt.
    • Each type group draws its first 100 memories, followed by a "Show N more" button that adds the next 100 and moves focus to the first one it added. A new search, filter, sort or place starts again at 100.
    • Group counts, the shown total, search, the filters and Select visible still cover every memory.
  • New locale key ui.longTermMemory.memoryvault.showMoreMemories. docs/UI.md describes the cap.
  • Browser regression: a 250-memory group draws 100 rows; Show more adds 100 and moves focus; search finds a memory beyond the cap; clearing the search returns to 100; Select visible then selects all 250. The feedback-clarity test reads the row's classes from VaultRow.tsx.
  • The browser regression's healthy-vault check now waits for the status read before asserting there is no health pill. The pill shows "Loading status" until that read returns, and with #1518 merged the check lost that race on every run.
  • Release: long-term-memory 1.4.64, with the CHANGELOG entry, version, manifest, rebuilt client.js, artifact and catalog entries, on top of staging bbd684d10 (1.4.63).

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; client code only, same Engine range.
  • New or changed permissions/entrypoints: none. Executable client code changes (client.js); no new request.
  • 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

  • Browser regression: the 100-row check fails on the base client (250 !== 100) and the new block passes with the fix.
  • Timing harness at 8,000 memories, base and patched interleaved: the worst letter went from about 3 s to 50 ms on desktop (11.4 s to 138 ms at 4× CPU throttling), the list update from about 3 s to 0.33 s (1.2 s throttled), and opening from about 1.7 s to between 0.65 and 1.08 s (two runs).

Documentation impact

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

UI evidence (if applicable)

  • No screenshot attached. The browser regression covers the cap and the Show more button (100 rows drawn, Show more adds 100 and moves focus).

🤖 Generated with Claude Code


🔄 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/1521 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/vault-row-cap` --- ### 📝 Commits (6) - [`2c96159`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2c961592b0b4327327bb2837dc44dd898b2a27b0) fix(long-term-memory): cap the Memory Vault at 100 rows per type and defer the search (#1514) - [`c96f527`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c96f527d78892657616190b1399077d6fdf8617e) chore(long-term-memory): release 1.4.60 (#1514) - [`88a2509`](https://github.com/Pasta-Devs/Marinara-Agents/commit/88a25091b9ca2aaa4da2d55f22a659776e1b4c19) Merge upstream/staging into fix(long-term-memory)/vault-row-cap; release long-term-memory 1.4.61 - [`a0107f9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a0107f9ed0a95a2e7531fa02e3d3685839711635) Merge upstream/staging into fix(long-term-memory)/vault-row-cap; release long-term-memory 1.4.64 - [`0edece2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0edece2900f36d7922e659327c44faece096974d) test(long-term-memory): wait for the status read before checking a healthy vault shows no health pill - [`0894179`](https://github.com/Pasta-Devs/Marinara-Agents/commit/08941798d1fc2a57c6895af706cbb0d037e50c2f) test(long-term-memory): check that Select visible covers every memory beyond the Vault cap ### 📊 Changes **18 files changed** (+460 additions, -226 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.64.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/client.js` (+24 -24) 📝 `packages/long-term-memory/docs/UI.md` (+5 -1) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+1 -0) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/MemoryVault.tsx` (+141 -154) ➕ `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/vault/VaultRow.tsx` (+152 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-browser.regression.ts` (+85 -1) 📝 `tests/long-term-memory-feedback-clarity-ui.regression.mjs` (+7 -6) 📝 `tests/long-term-memory-source-paths.mjs` (+1 -0) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #1514 ## Why this change - The Memory Vault draws a row for every memory in the place, even inside closed groups, and every search letter redraws all of them. At 8,000 memories a letter took about 3 s to appear on a fast desktop and 13 s on a phone-speed CPU, and opening the Vault stalled for 1.7 s. Even a 197-memory vault crossed 100 ms on the first letter. - A CPU profile showed the cost is laying out and rendering the rows, not the screen's own code, so drawing fewer rows is what helps. ## What changed - `long-term-memory` client, Vault only: - The search text is deferred, the filtered list and the shown rows are memoized, and the row is a memoized `VaultRow` component, so a letter appears before the list is rebuilt. - Each type group draws its first 100 memories, followed by a "Show N more" button that adds the next 100 and moves focus to the first one it added. A new search, filter, sort or place starts again at 100. - Group counts, the shown total, search, the filters and Select visible still cover every memory. - New locale key `ui.longTermMemory.memoryvault.showMoreMemories`. `docs/UI.md` describes the cap. - Browser regression: a 250-memory group draws 100 rows; Show more adds 100 and moves focus; search finds a memory beyond the cap; clearing the search returns to 100; Select visible then selects all 250. The feedback-clarity test reads the row's classes from `VaultRow.tsx`. - The browser regression's healthy-vault check now waits for the status read before asserting there is no health pill. The pill shows "Loading status" until that read returns, and with #1518 merged the check lost that race on every run. - **Release:** `long-term-memory` 1.4.64, with the CHANGELOG entry, version, manifest, rebuilt `client.js`, artifact and catalog entries, on top of staging bbd684d10 (1.4.63). ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none; client code only, same Engine range. - New or changed permissions/entrypoints: none. Executable client code changes (`client.js`); no new request. - 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 - Browser regression: the 100-row check fails on the base client (`250 !== 100`) and the new block passes with the fix. - Timing harness at 8,000 memories, base and patched interleaved: the worst letter went from about 3 s to 50 ms on desktop (11.4 s to 138 ms at 4× CPU throttling), the list update from about 3 s to 0.33 s (1.2 s throttled), and opening from about 1.7 s to between 0.65 and 1.08 s (two runs). ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - No screenshot attached. The browser regression covers the cap and the Show more button (100 rows drawn, Show more adds 100 and moves focus). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:03:09 +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#1530
No description provided.