Skip to content

feat(web): reference other threads from the composer @ menu - #86

Merged
adampeterhiggins merged 1 commit into
mainfrom
ah/reference-other-threads
Sep 30, 2026
Merged

adampeterhiggins merged 1 commit into
mainfrom
ah/reference-other-threads

Conversation

@adampeterhiggins

Copy link
Copy Markdown
Owner

The composer's @ menu could only pull in a summary of a sibling chat tab. To carry context from any other chat, you had to copy and paste it by hand.

What changed

  • @ menu (apps/web/src/components/chat/ChatComposer.tsx, composerThreadReferences.ts): after sibling tabs, the menu lists unarchived threads in the same environment, from any project, matched by title and newest first. It shows 3 before you type and up to 6 once you type. The project name is the row description. The thread list is read once per query rather than subscribed, so streaming turns elsewhere don't re-render the composer.
  • Drafts: a new draft thread can now hold these chips and send them with its first message, like Linear issue chips already could.
  • Server (apps/server/src/threadTabs/http.ts): the handoff endpoint no longer requires sources to share a tab group with the composing thread, and the composing thread may still be a draft. Only referencing the thread itself is refused. The summary's title comes from the source thread.
  • Wording: the chip reads "Chat summary", and the provider sees chat: <title> instead of chat tab: <title>. The context kind is still thread-tab, so contracts are unchanged.
  • Mobile: unchanged, since mobile has no @ chip. The docs already say so.
  • Docs: docs/fork-differences.md and docs/user/thread-sidebar.md.

UX

Typing @subagent in a new thread lists matching threads from other chats above files:

The @ menu listing four matching threads from the t3code project above file matches

Picking one inserts its summary as a chip at the cursor:

The composer with a "Show More Subagent Details" chat summary chip inline in the prompt

Testing

  • composerThreadReferences.test.ts: filtering (environment, archived, excluded, query), ordering, and limits.
  • server.test.ts: a draft can summarize another thread, and self-reference returns 400.
  • Updated the provider formatting test. Web, server, and shared typecheck clean.
  • Checked by hand in the web client against a copy of real data.

Done by Claude Opus 5.5 in Claude Code (via T3 Code).

🤖 Generated with Claude Code

The @ menu listed only sibling chat tabs. It now also lists other
unarchived threads in the environment, and the summary chip works in
new draft threads. The handoff endpoint accepts any thread except the
one composing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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