[PR #1766] [MERGED] Long-Term Memory 1.5.2: branch menu for the Chat Messages source (#1759) #1956

Closed
opened 2026-11-07 16:38:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: feature(long-term-memory)/messages-branch-dropdown


📝 Commits (3)

  • 3dd844f feat(long-term-memory): branch menu for the Chat Messages source (#1759)
  • 791c3df Merge upstream/staging into feature(long-term-memory)/messages-branch-dropdown
  • 6316fd9 chore(long-term-memory): release 1.5.2 (#1759)

📊 Changes

18 files changed (+249 additions, -83 deletions)

View changed files

➕ artifacts/long-term-memory-1.5.2.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 (+4 -0)
📝 packages/long-term-memory/client.js (+24 -24)
📝 packages/long-term-memory/docs/UI.md (+3 -1)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+3 -3)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+3 -0)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/sources/SourcesWorkspace.tsx (+71 -2)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/sources/interop.ts (+23 -3)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/sources.ts (+2 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-chat-transcript-import.regression.ts (+68 -2)

📄 Description

Linked issue

Closes #1759

Summary

Sources › Chat Messages (chat with branches)
+ Branch menu: This branch (default) | each other branch | All branches
previewPackageInterop
  resolvePreviewCandidates → rows        (identical pieces merged; +branchChatIds = chats that produced the piece)
+ rows.filter(branchChatIds ∋ request.branchChatId)   (messages source only)
  "Source gone" (#1751) still reads the unfiltered source
  previewPage → totals
previewPage cursor binding
+ includes branchChatId, so a cursor from one branch is rejected under another

Why this change

  • The Chat Messages source lists every piece of a chat's whole group. Marinara branches are separate chats with the same messages copied, so with several branches the pieces from every ending were mixed together and a user could import an abandoned ending by mistake.
  • The menu only filters the list. Import still goes to the whole chat's memory, and a shared piece keeps counting as imported everywhere.

What changed

  • Affected package: long-term-memory (1.5.1 → 1.5.2, patch: no new setting, no stored-data change).
  • Shared schema (sources.ts): optional branchChatId on the preview request.
  • Server (interop.ts): merged rows remember the chats that produced them; the messages preview filters on branchChatId; the cursor binding includes it.
  • Client (SourcesWorkspace.tsx, en.json): Branch <select> next to Mode, shown only for Chat Messages in a group with more than one chat.
  • Regression: tests/long-term-memory-chat-transcript-import.regression.ts (+branch cases).
  • Docs: packages/long-term-memory/docs/UI.md, CHANGELOG entry.
  • Merged staging after #1751 (1.5.1): conflicts in previewPackageInterop, UI.md and the CHANGELOG resolved so the branch filter applies to the displayed rows while "Source gone" still reads the unfiltered source.
  • Generated outputs rebuilt with build-feature-packages.mjs long-term-memory (client.js, server.mjs, manifest, artifacts/long-term-memory-1.5.2.zip, catalogs).

Known limit: shared history is recognised by identical piece text, so a piece that spans the fork point shows under its own branch only.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none (engine.min 2.5.1 unchanged)
  • New or changed permissions/entrypoints: none; the preview request accepts one optional field
  • Restart, storage, update, or uninstall impact: none; no stored-data change

Evidence

  • Before: previewing a chat with branchChatId set fails schema validation (unrecognized_keys: branchChatId), and the list mixes every branch's pieces.
    After: the regression asserts the shared piece under both branches, each branch-only piece under only its own, totals matching the rows, a cursor from one filter rejected under another, and a branchChatId outside the group yielding no rows.
  • Local runs on the final HEAD (exit 0): chat-transcript-import, source-pagination, routes-imports, scope-targets, routes, feedback-clarity-ui, scope-fallback-labels, test-fast.sh, npm run check, test-catalog-lanes, validate-package-locales, validate-catalog, catalog-release-notes regression, strict package typecheck with Engine 345cd747c.
  • No client-side automated proof for the new menu; the issue asked for a server regression.

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

Merge Danger

Door: two-way. The change is additive to the preview request and the Chat Messages tab; "All branches" keeps today's list and nothing stored changes.

Blast Radius: Sources screen, Chat Messages tab. It shares previewPackageInterop with the "Source gone" list from 1.5.1, which still reads the unfiltered source.

Documentation impact

  • Updated packages/long-term-memory/docs/UI.md and the package CHANGELOG
  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

🤖 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/1766 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature(long-term-memory)/messages-branch-dropdown` --- ### 📝 Commits (3) - [`3dd844f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3dd844fc41332187ca8795f639196a20e37836f0) feat(long-term-memory): branch menu for the Chat Messages source (#1759) - [`791c3df`](https://github.com/Pasta-Devs/Marinara-Agents/commit/791c3df19e10bf1630bc2cf9206e7fdc9e98f86c) Merge upstream/staging into feature(long-term-memory)/messages-branch-dropdown - [`6316fd9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6316fd93999e6137b89d4fd84604ccf4589acd8d) chore(long-term-memory): release 1.5.2 (#1759) ### 📊 Changes **18 files changed** (+249 additions, -83 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.5.2.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` (+4 -0) 📝 `packages/long-term-memory/client.js` (+24 -24) 📝 `packages/long-term-memory/docs/UI.md` (+3 -1) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+3 -3) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+3 -0) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/sources/SourcesWorkspace.tsx` (+71 -2) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/sources/interop.ts` (+23 -3) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/sources.ts` (+2 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-chat-transcript-import.regression.ts` (+68 -2) </details> ### 📄 Description ## Linked issue Closes #1759 ## Summary ```text Sources › Chat Messages (chat with branches) + Branch menu: This branch (default) | each other branch | All branches previewPackageInterop resolvePreviewCandidates → rows (identical pieces merged; +branchChatIds = chats that produced the piece) + rows.filter(branchChatIds ∋ request.branchChatId) (messages source only) "Source gone" (#1751) still reads the unfiltered source previewPage → totals previewPage cursor binding + includes branchChatId, so a cursor from one branch is rejected under another ``` ## Why this change - The Chat Messages source lists every piece of a chat's whole group. Marinara branches are separate chats with the same messages copied, so with several branches the pieces from every ending were mixed together and a user could import an abandoned ending by mistake. - The menu only filters the list. Import still goes to the whole chat's memory, and a shared piece keeps counting as imported everywhere. ## What changed - Affected package: `long-term-memory` (1.5.1 → 1.5.2, patch: no new setting, no stored-data change). - Shared schema (`sources.ts`): optional `branchChatId` on the preview request. - Server (`interop.ts`): merged rows remember the chats that produced them; the messages preview filters on `branchChatId`; the cursor binding includes it. - Client (`SourcesWorkspace.tsx`, `en.json`): Branch `<select>` next to Mode, shown only for Chat Messages in a group with more than one chat. - Regression: `tests/long-term-memory-chat-transcript-import.regression.ts` (+branch cases). - Docs: `packages/long-term-memory/docs/UI.md`, CHANGELOG entry. - Merged staging after #1751 (1.5.1): conflicts in `previewPackageInterop`, `UI.md` and the CHANGELOG resolved so the branch filter applies to the displayed rows while "Source gone" still reads the unfiltered source. - Generated outputs rebuilt with `build-feature-packages.mjs long-term-memory` (client.js, server.mjs, manifest, `artifacts/long-term-memory-1.5.2.zip`, catalogs). Known limit: shared history is recognised by identical piece text, so a piece that spans the fork point shows under its own branch only. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none (engine.min 2.5.1 unchanged) - New or changed permissions/entrypoints: none; the preview request accepts one optional field - Restart, storage, update, or uninstall impact: none; no stored-data change ## Evidence - **Before:** previewing a chat with `branchChatId` set fails schema validation (`unrecognized_keys: branchChatId`), and the list mixes every branch's pieces. **After:** the regression asserts the shared piece under both branches, each branch-only piece under only its own, totals matching the rows, a cursor from one filter rejected under another, and a `branchChatId` outside the group yielding no rows. - Local runs on the final HEAD (exit 0): `chat-transcript-import`, `source-pagination`, `routes-imports`, `scope-targets`, `routes`, `feedback-clarity-ui`, `scope-fallback-labels`, `test-fast.sh`, `npm run check`, `test-catalog-lanes`, `validate-package-locales`, `validate-catalog`, `catalog-release-notes` regression, strict package typecheck with Engine 345cd747c. - No client-side automated proof for the new menu; the issue asked for a server regression. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `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 - ## Merge Danger **Door:** two-way. The change is additive to the preview request and the Chat Messages tab; "All branches" keeps today's list and nothing stored changes. **Blast Radius:** Sources screen, Chat Messages tab. It shares `previewPackageInterop` with the "Source gone" list from 1.5.1, which still reads the unfiltered source. ## Documentation impact - [x] Updated `packages/long-term-memory/docs/UI.md` and the package CHANGELOG - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation 🤖 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-11-07 16:38:18 +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#1956
No description provided.