mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 20:58:37 +07:00
[GH-ISSUE #799] [Issue]: LTM scope picker ignores branch renames (metadata.branchName) — renamed branches unsearchable and mislabeled #412
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#412
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Sep 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/799
Originally assigned to: @Promansis on GitHub.
Summary
The Long-Term Memory Sources scope picker ("Find sources in") labels and searches chats using the database
chat.namefield only. It ignoreschat.metadata.branchName, which is where branch renames are stored and which the rest of the chat UI uses as the display name. Additionally, branch-family entries only expose chat IDs as search text, so a renamed branch can never be found by searching for its name.Affected package
long-term-memoryExpected behavior
LTM should display and search the same chat display name the main chat UI uses:
chat.metadata.branchNamewhen set, falling back tochat.name. Concretely:Actual behavior
GET /scope-targetsbuilds chat labels fromchat.nameonly and never readschat.metadata.branchName, so a branch renamed to e.g. "Final Branch" still appears under its original name.All branches: <first member's chat.name>; individual renamed branches are hidden and unsearchable.searchTextfromgroup.chatIds.join(" ")(raw IDs), so searching for a branch display name returns nothing."<chat.name>, msgs <range>") and thechat_name:evidence usechat.name, so imported source notes carry the pre-rename name.User-visible result (reported): with a pre-2.0 chat whose current branch was renamed to "Final Branch", searching the picker for "Final Branch" returns nothing, and the summaries are only reachable under the original chat name's "All branches" entry.
Relevant code paths:
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts(/scope-targets:label: chat.name?.trim() || "Untitled chat", group label from first member)packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts(candidatetitle = \${chat.name || "Chat"}, msgs ${entry.range}`,chat_name:` evidence)packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx(chatTargetlabel/searchText, branch-groupsearchText: group.chatIds.join(" "))Note the display-name helper already exists in Engine (
sources/engine/packages/client/src/lib/chat-display.ts,getChatDisplayName) — LTM needs the same branchName-fallback logic for its labels/search.Steps to reproduce
Environment
Logs, screenshots, or video
Not applicable — deterministic labeling/search logic, reproducible from UI alone.
Additional context
Proposed fix (root cause, shared helper):
metadata.branchName (trimmed) || chat.namein/scope-targetsand in interop candidate titles/evidence.searchTextto include the family label and member display names; include the current chat's display name in the pinned "Current" target's label/searchText./scope-targetsexposes the renamed label and the picker search text matches it; assert chat-summary candidate title uses the renamed display name.Workaround for affected users: source summaries from "All" or the "All branches: " entry; the original name can be found by browsing the picker without a search query.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: