[GH-ISSUE #1420] [Issue]: Long-Term Memory UI: four different place pickers; use one for a single place and one for several #721

Closed
opened 2026-10-20 17:30:05 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Promansis on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1420

Originally assigned to: @Promansis on GitHub.

Summary

Choosing a place (all, a chat, a branch, a character or a persona) uses four different components across the Vault and Sources screens. Each one looks and behaves differently:

  • an inline grouped list;
  • a search dropdown;
  • a destination panel;
  • a tab rail.

1.3.27 and 1.3.29 were spent making them look alike again. This issue merges them into two controls: one for choosing one place, and one for choosing several.

The Vault editor's subject picker (TargetPicker) chooses who a memory is about, not where it applies. It stays as it is.

Affected package

long-term-memory 1.4.38 (upstream/staging 97c0486f8; no LTM changes since eb4af30d0), under packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/:

Component Lines Chooses Used at
vault/VaultScopePicker.tsx 343 one place Vault place filter and its second "and" filter (MemoryVault.tsx:2126, :2175)
sources/SourceScopeCombobox.tsx 285 one place Sources "Find sources in" (SourcesWorkspace.tsx:1532)
sources/DestinationScopePanel.tsx 422 several places, plus chat-mode checkboxes Sources "Make memories available in" (SourcesWorkspace.tsx:2054, :2528)
AvailabilityTabRail in vault/TargetPicker.tsx:78 part of 410 several places Memory availability, single and bulk (MemoryAvailabilityWorkbench.tsx:287, BulkAvailabilityWorkbench.tsx:250)

Not in scope: TargetPicker (vault/TargetPicker.tsx:310). It chooses a memory's subjects (characters, personas, local characters) in the editor (MemoryVault.tsx:3060).

Expected behavior

  • Choosing one place works the same on every screen.
  • Choosing several places works the same on every screen.
  • Keyboard, screen-reader and phone behaviour is defined once for each control.

Actual behavior

  • Two single-place pickers.
    • The Vault's is an inline list grouped into places with and without memories.
    • The Sources one is a search dropdown with pinned places.
  • Two multi-place pickers.
    • Sources uses a destination panel.
    • The Vault availability editors use the All / Chats / Branches / Characters / Personas tab rail, which is the direction #1099 and #1105 chose.
  • Separate implementations.
    • Line similarity between them is 0.09 to 0.35, so they implement the same idea separately rather than being copies.
    • Each fix to one picker (keyboard keys, labels, collapsing) has to be repeated in the others.

Steps to reproduce

  1. Open Long-Term Memory → Vault and open the place filter.
  2. Open Sources and open "Find sources in". It's a different control for the same choice.
  3. In Sources, start an import and open "Make memories available in".
  4. In the Vault, open a memory's availability editor. It's a different control from step 3 for the same choice.

Environment

  • Marinara Engine version: 2.5.0 line (staging)
  • Package version: long-term-memory 1.4.38 (upstream/staging 97c0486f8)
  • Install type: source (code audit)
  • OS + version: not platform-specific
  • Browser or app shell: any

Logs, screenshots, or video

Before-and-after screenshots for each picker are in the comment below (step 0, approved).

Minimal fix

  1. Pictures approved. The before-and-after images in the comment below show the four-tab design described here. They're dark theme only, since light mode switches colours on its own, at phone and desktop widths. The mockup was built on LTM 1.4.44.
  2. One place: SourceScopeCombobox.
    • Move it to the feature root, where it becomes shared.
    • Add an optional "with memories / without memories" grouping for the Vault filter.
    • Replace both VaultScopePicker uses (the Vault filter and its second "and" filter), then delete vault/VaultScopePicker.tsx.
    • Tabs are All / Chats / Characters / Personas, with no Branches tab.
    • A chat with branches is one Chats entry: the chat name, with "All branches" as its comment. Its scope stays { groupId, groupIds, chatIds: group.chatIds }, which is today's "All branches" scope.
    • "Current" stays this branch (chatOnlyLtmScope).
  3. Several places: AvailabilityTabRail.
    • Move it out of vault/TargetPicker.tsx to the feature root.
    • Tabs are All / Chats / Characters / Personas, and it opens on All. The All tab lists every place, each labelled with its kind. There is no Branch section.
    • Tabs sit in two columns below 22rem and four across above that.
    • Use it for the place list inside DestinationScopePanel. The panel keeps its chat-mode checkboxes, which aren't a place picker.
  4. Memories already assigned to a branch keep working (#1433).
    • The single availability editor shows an existing branch assignment as a removable chip that names the chat and the branch, for example "Harbor Watch - Main story".
    • Saving any other change leaves that assignment as it is: it isn't widened to the whole chat and it isn't dropped.
    • Bulk "Remove availability" lists the branch assignments the selected memories already have under Chats, so they can still be removed.
    • The Vault filter for a whole chat includes memories assigned to any of its branches.
    • An assignment whose chat no longer exists still shows, with the fallback label.
  5. Copy. Reword help text that still mentions branches, for example "Choose chats, branches, characters, or personas" and "existing chat and branch scope". Update every shipped locale.
  6. Dropdown background. The search dropdown gets a solid background. Today it shows the page behind it, which already happens in "Find sources in".
  7. Keep tests working.
    • Keep existing labels, test ids and ARIA roles where the new control allows, so the browser test and the source-text tests keep working.
    • Update the test path map from #1373 for moved files.
  8. Regression in tests/long-term-memory-browser.regression.ts, which already drives these screens.
    • For each of the four places:
      • choose a place by keyboard and by search;
      • check that the choice actually takes effect: the Vault list filters to it, imported memories are saved there, and the memory's availability is saved there.
    • Whole chats: choosing one saves { groupId, chatIds }.
    • Existing branch assignments:
      • a memory assigned to one branch keeps that assignment when other availability changes are saved;
      • the assignment can be removed in the single editor and in bulk remove.

Validation per PR:

  • npm run check
  • node scripts/typecheck-packages.mjs long-term-memory
  • rebuild LTM
  • node scripts/validate-catalog.mjs
  • node tests/long-term-memory-feedback-clarity-ui.regression.mjs
  • the LTM browser test

Additional context

  • Risks.
    • The place decides where a memory is recalled. A wrong default or a mis-mapped option saves a memory to the wrong place, and nothing reports it. The step 7 assertions exist for that.
    • Users lose muscle memory on four screens. New or changed labels need every shipped locale updated.
  • Size. This ships as one PR and a patch bump, because both controls change their tabs together. Two PRs would release a version in which the single-place picker has four tabs and the multi-place rail still has Branch.
  • Out of scope:
    • the subject picker;
    • the chat-mode checkboxes;
    • the roving-tab key helper, which is already shared in tab-keys.ts.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1420 Originally assigned to: @Promansis on GitHub. ## Summary Choosing a place (all, a chat, a branch, a character or a persona) uses four different components across the Vault and Sources screens. Each one looks and behaves differently: - an inline grouped list; - a search dropdown; - a destination panel; - a tab rail. 1.3.27 and 1.3.29 were spent making them look alike again. This issue merges them into two controls: one for choosing one place, and one for choosing several. The Vault editor's subject picker (`TargetPicker`) chooses who a memory is about, not where it applies. It stays as it is. ## Affected package `long-term-memory` 1.4.38 (`upstream/staging` 97c0486f8; no LTM changes since eb4af30d0), under `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/`: | Component | Lines | Chooses | Used at | |---|---|---|---| | `vault/VaultScopePicker.tsx` | 343 | one place | Vault place filter and its second "and" filter (`MemoryVault.tsx:2126`, `:2175`) | | `sources/SourceScopeCombobox.tsx` | 285 | one place | Sources "Find sources in" (`SourcesWorkspace.tsx:1532`) | | `sources/DestinationScopePanel.tsx` | 422 | several places, plus chat-mode checkboxes | Sources "Make memories available in" (`SourcesWorkspace.tsx:2054`, `:2528`) | | `AvailabilityTabRail` in `vault/TargetPicker.tsx:78` | part of 410 | several places | Memory availability, single and bulk (`MemoryAvailabilityWorkbench.tsx:287`, `BulkAvailabilityWorkbench.tsx:250`) | Not in scope: `TargetPicker` (`vault/TargetPicker.tsx:310`). It chooses a memory's subjects (characters, personas, local characters) in the editor (`MemoryVault.tsx:3060`). ## Expected behavior - Choosing one place works the same on every screen. - Choosing several places works the same on every screen. - Keyboard, screen-reader and phone behaviour is defined once for each control. ## Actual behavior - **Two single-place pickers.** - The Vault's is an inline list grouped into places with and without memories. - The Sources one is a search dropdown with pinned places. - **Two multi-place pickers.** - Sources uses a destination panel. - The Vault availability editors use the All / Chats / Branches / Characters / Personas tab rail, which is the direction #1099 and #1105 chose. - **Separate implementations.** - Line similarity between them is 0.09 to 0.35, so they implement the same idea separately rather than being copies. - Each fix to one picker (keyboard keys, labels, collapsing) has to be repeated in the others. ## Steps to reproduce 1. Open Long-Term Memory → Vault and open the place filter. 2. Open Sources and open "Find sources in". It's a different control for the same choice. 3. In Sources, start an import and open "Make memories available in". 4. In the Vault, open a memory's availability editor. It's a different control from step 3 for the same choice. ## Environment - Marinara Engine version: 2.5.0 line (`staging`) - Package version: long-term-memory 1.4.38 (`upstream/staging` 97c0486f8) - Install type: source (code audit) - OS + version: not platform-specific - Browser or app shell: any ## Logs, screenshots, or video Before-and-after screenshots for each picker are in the comment below (step 0, approved). ## Minimal fix 0. **Pictures approved.** The before-and-after images in the comment below show the four-tab design described here. They're dark theme only, since light mode switches colours on its own, at phone and desktop widths. The mockup was built on LTM 1.4.44. 1. **One place: `SourceScopeCombobox`.** - Move it to the feature root, where it becomes shared. - Add an optional "with memories / without memories" grouping for the Vault filter. - Replace both `VaultScopePicker` uses (the Vault filter and its second "and" filter), then delete `vault/VaultScopePicker.tsx`. - Tabs are **All / Chats / Characters / Personas**, with no Branches tab. - A chat with branches is one Chats entry: the chat name, with "All branches" as its comment. Its scope stays `{ groupId, groupIds, chatIds: group.chatIds }`, which is today's "All branches" scope. - "Current" stays this branch (`chatOnlyLtmScope`). 2. **Several places: `AvailabilityTabRail`.** - Move it out of `vault/TargetPicker.tsx` to the feature root. - Tabs are **All / Chats / Characters / Personas**, and it opens on All. The All tab lists every place, each labelled with its kind. There is no Branch section. - Tabs sit in two columns below 22rem and four across above that. - Use it for the place list inside `DestinationScopePanel`. The panel keeps its chat-mode checkboxes, which aren't a place picker. 3. **Memories already assigned to a branch keep working** (#1433). - The single availability editor shows an existing branch assignment as a removable chip that names the chat and the branch, for example "Harbor Watch - Main story". - Saving any other change leaves that assignment as it is: it isn't widened to the whole chat and it isn't dropped. - Bulk "Remove availability" lists the branch assignments the selected memories already have under Chats, so they can still be removed. - The Vault filter for a whole chat includes memories assigned to any of its branches. - An assignment whose chat no longer exists still shows, with the fallback label. 4. **Copy.** Reword help text that still mentions branches, for example "Choose chats, branches, characters, or personas" and "existing chat and branch scope". Update every shipped locale. 5. **Dropdown background.** The search dropdown gets a solid background. Today it shows the page behind it, which already happens in "Find sources in". 6. **Keep tests working.** - Keep existing labels, test ids and ARIA roles where the new control allows, so the browser test and the source-text tests keep working. - Update the test path map from #1373 for moved files. 7. **Regression** in `tests/long-term-memory-browser.regression.ts`, which already drives these screens. - For each of the four places: - choose a place by keyboard and by search; - check that the choice actually takes effect: the Vault list filters to it, imported memories are saved there, and the memory's availability is saved there. - Whole chats: choosing one saves `{ groupId, chatIds }`. - Existing branch assignments: - a memory assigned to one branch keeps that assignment when other availability changes are saved; - the assignment can be removed in the single editor and in bulk remove. Validation per PR: - `npm run check` - `node scripts/typecheck-packages.mjs long-term-memory` - rebuild LTM - `node scripts/validate-catalog.mjs` - `node tests/long-term-memory-feedback-clarity-ui.regression.mjs` - the LTM browser test ## Additional context - **Risks.** - The place decides where a memory is recalled. A wrong default or a mis-mapped option saves a memory to the wrong place, and nothing reports it. The step 7 assertions exist for that. - Users lose muscle memory on four screens. New or changed labels need every shipped locale updated. - **Size.** This ships as one PR and a patch bump, because both controls change their tabs together. Two PRs would release a version in which the single-place picker has four tabs and the multi-place rail still has Branch. - **Out of scope:** - the subject picker; - the chat-mode checkboxes; - the roving-tab key helper, which is already shared in `tab-keys.ts`. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:30:05 +07:00
Author
Owner

@Promansis commented on GitHub (Oct 17, 2026):

Image Image Image Image Image Image Image Image Image Image
<!-- gh-comment-id:6228215373 --> @Promansis commented on GitHub (Oct 17, 2026): <img width="852" height="972" alt="Image" src="https://github.com/user-attachments/assets/71e92cd9-2d34-43f8-ac6d-f447a5d4692f" /> <img width="2632" height="1028" alt="Image" src="https://github.com/user-attachments/assets/ffa7dae9-ef3d-4e7d-9060-d86e4bf1bd8f" /> <img width="852" height="972" alt="Image" src="https://github.com/user-attachments/assets/3c117379-7e95-4905-8b6c-10f9c5357e6b" /> <img width="2632" height="1028" alt="Image" src="https://github.com/user-attachments/assets/2ec8378b-36b5-47f4-ba50-34dc926f7175" /> <img width="852" height="972" alt="Image" src="https://github.com/user-attachments/assets/058f1a60-f184-4ac6-a301-6a2793e89883" /> <img width="2632" height="1028" alt="Image" src="https://github.com/user-attachments/assets/0fd28434-5889-4da5-b13c-5e85010bb247" /> <img width="852" height="972" alt="Image" src="https://github.com/user-attachments/assets/74740b21-e16e-46db-86c6-a5704852ed3d" /> <img width="2632" height="1028" alt="Image" src="https://github.com/user-attachments/assets/43f38fac-d6c9-433d-b1f4-447635b9134c" /> <img width="852" height="972" alt="Image" src="https://github.com/user-attachments/assets/34450946-3454-43e7-abf0-eba30dada83d" /> <img width="2632" height="1028" alt="Image" src="https://github.com/user-attachments/assets/afd29689-9bb1-42ee-a0c3-4cecfb8de408" />
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#721
No description provided.