Skip to content

feat(composer): # tags a thread on any of your computers, and its link names the computer - #2535

Merged
TheAnimatrix merged 4 commits into
masterfrom
hash-thread-tags
Dec 1, 2026
Merged

TheAnimatrix merged 4 commits into
masterfrom
hash-thread-tags

Conversation

@TheAnimatrix

@TheAnimatrix TheAnimatrix commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

There is no quick way to point an agent or a bot at another thread from the composer. You have to find the thread, use Copy reference and paste. On a thread from another computer, a bare id can make the agent search for it or guess.

Change

  • Typing # in an agent thread's or a bot chat's composer opens the same list @ uses, titled "Threads to tag". It lists the owner's threads on every linked computer by title.
  • The threads this window already lists show at once, including those on other computers and on computers that are offline. A title-only search adds older and archived threads from this computer and from each other computer. Each computer gets at most 2 seconds, and no full title lists are loaded. The line under the rows names any computer that wasn't searched, for example "Not searched: Laptop (offline)".
  • Each row shows the title with the typed letters marked, then " · ", ending with "Archived", "offline" or "not sharing" when that applies. Rows on an offline computer can still be picked and look a little faded.
  • A thread the chat can't point at is greyed out with the reason. In a shared thread: "Private · only a private thread can tag it". In a bot chat: "Private · bots can't read it". In a private thread, threads on other computers are greyed out. The same rules now apply to pasted links, and bot chats with a bot on another computer now refuse private threads too.
  • Picking a row inserts the same chip a pasted Copy reference link makes. The chip's link names the thread's computer (mousse://thread/<computer>:<id>). One undo takes the pick back. The composer chip now shows when a thread's computer is offline or not sharing, instead of looking deleted.
  • #123, colours (#fff), headings (# Title), C#, page#top, anything in code and a / command's text never open the list. Rows that can't be tagged come last, so Enter never lands on one.
  • threads.search takes titlesOnly across computers (routed version 3), on its own lane so it never cuts short the palette's search or the sidebar filter. A computer running an older version answers with all its hits, and only the title matches are kept.
  • Agents and bots are told that a # tag's link carries the thread's id, with its computer, and to pass it to thread_read as it is (THREAD_TAG_GUIDANCE, used in the Mousse tool instructions and in thread_read's threadId).

Verification

Tier 4 (renderer, IPC, routed protocol).

  • node scripts/verify.mjs <23 named files> --typecheck all on 1ed48f4, rebased on master after fix(threads): tag local and linked bots with @ #2515: typecheck clean for web and node. Tests: 954 passed and 17 failed, all in tests/threadSqliteStorage.test.ts (EPERM removing temp folders on this Windows machine), which fails the same way on master.

  • tests/renderer/threadTags.test.ts mounts the real agent-thread chat. It checks the rows, details, private and greyed rows and the "Not searched" line, that Enter and a click insert the chip, and that the sent text is mousse://thread/<this computer>:<id> or mousse://thread/<Mac>:<id>. It also checks the private-thread rule, and that #2512, #fff and # Heading open nothing.

  • tests/renderer/botChatView.test.ts: in a bot chat, # lists threads, the private one reads "Private · bots can't read it", and a pick is sent as its link.

  • tests/net/bridge/routed/mergedListsLinked.test.ts: two real services. A titlesOnly search finds the other computer's archived thread by title, never a message-only hit, while the palette's search runs at the same time.

  • tests/chatModes.test.ts: a table of which # text opens the list. A / command's text never does, because its arguments may be secrets (/secform fields) and the query is searched on every computer.

  • Dev-app check on the Mac mini (isolated dev home, hidden Electron driven by Playwright): the list opens like @ with marked titles, project and Archived labels; a greyed private row does nothing on click; Enter inserts the chip, and one Cmd+Z takes it back; Fixes #2512, #fff, # Heading and `#pair` stay closed; in a bot chat the private row reads "Private · bots can't read it".

  • That check found that a greyed row that was the newest match got the first highlight, so Enter did nothing. Greyed rows now go last, and threadTags.test.ts covers it.

Notes

The design and mocks came from a design review. Related: #2516 (links carry their computer), merged. Rebased on #2515 (bots in @). /secform (branch secform) merges cleanly with this branch.

No issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant