Skip to content

feat(web): quote reply to pull request comments - #6407

Open
dominic-r wants to merge 4 commits into
pingdotgg:mainfrom
dominic-r:dominic/pr-quote-reply
Open

feat(web): quote reply to pull request comments#6407
dominic-r wants to merge 4 commits into
pingdotgg:mainfrom
dominic-r:dominic/pr-quote-reply

Conversation

@dominic-r

@dominic-r dominic-r commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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 run on the touched test file plus targeted typecheck and lint.

Demo

Pasted Graphic 1

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 quoteReplyDraft in pullRequestDetail.logic.ts (line prefixes, blank line for the reply, CRLF normalization), with unit tests in pullRequestDetail.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

  • Adds a hover-revealed 'Quote reply' button to each pull request comment (visible when commenting is allowed, not currently posting, and the comment has content).
  • Clicking quote reply inserts a > -prefixed block of the comment into the composer, focuses it, and places the cursor at the end, implemented via the new quoteReplyDraft function in pullRequestDetail.logic.ts.
  • Refactors CommentComposer into a controlled component, lifting draft/posting state into PullRequestSummaryTab, with drafts now persisted per pull request URL.
  • Behavioral Change: comment draft state is now keyed by PR URL, so switching between PRs preserves each PR's in-progress draft rather than sharing a single global draft.

Macroscope summarized 11a97e5.

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>
@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: 81662fc7-44c8-47b1-b9fe-94f86b93127e

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 size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Aug 13, 2026
Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx
@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 (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>

@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 cd7b5ed. Configure here.

Comment thread apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx
dominic-r and others added 2 commits August 12, 2026 21:16
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>
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.

1 participant