Skip to content

feat(web): reply to selected assistant text - #6457

Closed
piyushpradhan wants to merge 3 commits into
pingdotgg:mainfrom
piyushpradhan:t3code/response-replies
Closed

feat(web): reply to selected assistant text#6457
piyushpradhan wants to merge 3 commits into
pingdotgg:mainfrom
piyushpradhan:t3code/response-replies

Conversation

@piyushpradhan

@piyushpradhan piyushpradhan commented Aug 13, 2026

Copy link
Copy Markdown

What Changed

  • Adds a contextual Reply action when text is selected inside an assistant response.
  • Inserts the selected passage into the composer as an editable Markdown quote.
  • Documents the web/desktop interaction and the mobile display behavior.

Why

Replying to one passage currently requires manually copying, pasting, and formatting it. This keeps the selected context visible in chat history and sends it through the existing provider flow without changing wire contracts or provider adapters.

Closes #6456

UI Changes

Before — selecting assistant text has no follow-up action:

Selected assistant text before this change

After — the selection exposes a compact Reply action:

Reply action beside selected assistant text

Choosing Reply inserts an editable quote into the composer:

Selected assistant text inserted into the composer

Checklist

  • I tested the change locally
  • I included tests for new behavior
  • I updated documentation where applicable
  • I did not include unrelated changes

Generated by GPT-5.6-Sol via the Codex harness in T3 Code.


Note

Low Risk
Client-only composer/timeline UX with unit tests; no API or provider contract changes.

Overview
Adds Reply when you select text in an assistant message on web/desktop. A floating button uses the same clipboard payload as copy, then appends a labeled markdown blockquote to the composer via new helpers in assistantResponseQuote.ts (spacing rules avoid extra blank lines).

ChatView wires the callback; if the composer can’t accept text (e.g. active request), users see a “Reply unavailable” toast. CSS animates the action chip with reduced-motion support. docs/user/chat.md documents the flow and notes mobile can show quotes but not create them yet.

Reviewed by Cursor Bugbot for commit f3ae1c9. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add floating Reply button for selected assistant message text in chat

  • Selecting text within an assistant message now shows a floating Reply button; clicking it inserts a formatted markdown quote block into the composer.
  • The quote is formatted by assistantResponseQuote.ts: each line is prefixed with >, preceded by a bold > **Replying to an assistant response:** header, and separated from existing composer content by the appropriate number of newlines.
  • If the composer is unavailable or busy (e.g. a request is in flight), an info toast is shown instead of inserting.
  • The floating button is styled in index.css with an entry animation that respects prefers-reduced-motion.
  • User documentation is added in docs/user/chat.md, noting that reply creation is web/desktop only while mobile can display quotes.

Macroscope summarized f3ae1c9.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 108599e0-c75b-425d-9f43-8f11c7b903b0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 13, 2026
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature (selecting assistant text to create quoted replies) with new UI components, event handlers, and workflows. New capabilities of this scope warrant human review regardless of implementation quality.

You can customize Macroscope's approvability policy. Learn more.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e497925. Configure here.

Comment thread apps/web/src/components/chat/MessagesTimeline.tsx Outdated
@t3dotgg

t3dotgg commented Sep 4, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-6 Astra (preview) responding on behalf of Theo

This was closed as part of an automated cleanup pass. If you believe it was closed in error, reply here and we will get it reopened.

Closing as superseded by #9146, which is on main. Selecting assistant text now offers Cite and adds the selection to the composer with a source link. That flow also supports saved drafts and source navigation, so a second Reply overlay for the same selection is not needed.

@t3dotgg t3dotgg closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: reply to selected assistant response text

2 participants