feat(web): quote reply to pull request comments - #6407
Conversation
Each comment in the pull request Summary tab gets a reply button that prefills the composer with the comment quoted GitHub-style — every line behind "> ", cursor on the empty line below — instead of making the reader copy and reformat it by hand. Quoting appends under an existing draft rather than replacing it, and the button only appears when the viewer can comment and the comment has a body worth quoting. The composer's draft and posting state move up into the tab so the reply buttons can write into the draft and respect the posting lock; the draft stays keyed by pull request so switching tabs still starts clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature (quote reply for comments) with new UI elements, state management, and DOM interactions. New features warrant human review even when well-scoped and tested. You can customize Macroscope's approvability policy. Learn more. |
The quote button rode the expanded card's header, so a resolved conversation or dismissed approval — which renders collapsed — never offered it even once opened, despite carrying the edit pencil and reaction bar. Bugbot's catch. The button now rides beside the pencil inside the comment body, the same hover-revealed pattern, which gives every remark the same single placement. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cd7b5ed. Configure here.
Disabling them while posting let the Button's disabled:opacity-64 outrank the hover-reveal's opacity-0, ghosting every quote icon into view for the duration of the request. The button now leaves the tree for those seconds instead — same protection from the success clear, nothing fighting the reveal. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Replying to a specific comment on a pull request means copying it into the composer and hand-prefixing every line with
>. Each comment in the Summary tab's conversation now carries a quote-reply button that does what GitHub's does: the composer prefills with the comment quoted line by line and focuses with the cursor on the empty line below the quote, ready for the reply. Quoting appends under anything already drafted instead of replacing it, the button only shows when the viewer can comment and the comment has words to quote, and it stays disabled while a comment is posting so the on-success clear cannot eat a quote added mid-flight.To let the buttons write into the composer, its draft and posting state moved up onto the tab; the draft stays keyed by pull request so switching tabs still starts with a clean box. The quote formatting is a pure helper with unit tests — validated with
vp test runon the touched test file plus targeted typecheck and lint.Demo
Written by Claude Fable 5 via Claude Code.
🤖 Generated with Claude Code
Note
Low Risk
UI-only comment drafting and formatting in the PR summary tab; no auth, API contract, or server changes beyond existing comment posting.
Overview
Adds quote reply on the pull request Summary tab: a hover Quote reply control on each comment (when the viewer can comment and the comment has text) inserts a GitHub-style
>block into the bottom composer, focuses the textarea, and places the cursor after the quote. Quotes append under any existing draft instead of replacing it; the control is hidden while a post is in flight.Comment composer is now controlled from
PullRequestSummaryTab: draft text and posting live on the tab and are keyed by pull request URL so switching PRs does not leak drafts. Posting still uses the existing comment command and clears the draft only for the PR that was submitted.Formatting is centralized in
quoteReplyDraftinpullRequestDetail.logic.ts(line prefixes, blank line for the reply, CRLF normalization), with unit tests inpullRequestDetail.logic.test.ts.Reviewed by Cursor Bugbot for commit 11a97e5. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add quote reply to pull request comments
>-prefixed block of the comment into the composer, focuses it, and places the cursor at the end, implemented via the newquoteReplyDraftfunction in pullRequestDetail.logic.ts.CommentComposerinto a controlled component, lifting draft/posting state intoPullRequestSummaryTab, with drafts now persisted per pull request URL.Macroscope summarized 11a97e5.