Skip to content

feat(web): send a citation to another thread from its comment panel - #442

Merged
adampeterhiggins merged 1 commit into
mainfrom
ah/cross-thread-citations
Oct 21, 2026
Merged

adampeterhiggins merged 1 commit into
mainfrom
ah/cross-thread-citations

Conversation

@adampeterhiggins

Copy link
Copy Markdown
Owner

Citing assistant text could only put the quote in the current thread's composer. To use it elsewhere you had to copy text by hand, which lost the link back to the source.

What changed

The comment panel that opens after Cite now has a destination picker on the left of its footer. It always starts on This thread, so the existing flow is unchanged. The picker searches threads in the environment, running threads first, with This thread and New thread pinned at the top. Once you pick another destination, the panel's split button acts on it:

  • Another thread: Send starts a turn there, using that thread's own model, runtime mode and interaction mode. If that thread is mid-turn and follow-ups are set to queue, the button reads Add to queue. Save adds the quote to that thread's composer. Save as draft stores a server message draft there.
  • New thread: Start thread creates a thread in this project and checkout, with this composer's model, and sends the quote as its first message. Save opens a new thread with the quote in its composer.

You stay on the current thread. A toast confirms where the quote went and has Open. The quote leaves this composer only once it has arrived, and a failure leaves it where it was. The quote travels as the same serialized citation link the composer already sends, so no contract or server changes were needed. Hovering a quote shown outside its source thread now says "From ".

Surfaces

  • Web and desktop: covered. The panel only appears in a server thread's composer.
  • Mobile: doesn't create citations, so it's unaffected.
  • Agents: can already send to any thread with t3_thread_send.
  • Docs: updated docs/user/composer.md and docs/fork-differences.md.

Not in this PR

  • Threads in other connected environments aren't offered.
  • The source thread is named in the chip's hover preview, not as a tag on the chip itself.
  • Existing gap, not introduced here: expandAssistantCitationsForProvider isn't called anywhere outside the web composer's prompt-length check, so agents receive the raw citation markup.

Testing

  • citationDestination.test.ts: thread ranking and filtering, and appending to a prompt.
  • AssistantCitationChip.browser.test.tsx: picks a running thread in the panel, checks the button reads Add to queue, and that sending submits that destination.
  • Existing citation browser tests pass, and web typecheck is clean.
  • Before/after screenshots are still to come: nothing has been tried in a running app yet.

🤖 Generated with Claude Code

The citation comment panel gets a destination picker: this thread, a new
thread, or any other thread in the environment. Its split button then acts
on that thread: Send starts or queues a turn there with the thread's own
model and modes, Save adds the quote to its composer, and Save as draft
stores a message draft there. A new thread starts in this project with the
quote as its first message, or opens with it in the composer. Quotes shown
outside their source thread name it in their preview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adampeterhiggins
adampeterhiggins merged commit ad4e011 into main Oct 21, 2026
@adampeterhiggins
adampeterhiggins deleted the ah/cross-thread-citations branch October 21, 2026 14:17
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