Skip to content

feat(web): edit pending pull request review comments - #1

Merged
bengobeil merged 4 commits into
mainfrom
feat/edit-pending-review-comments
Nov 12, 2026
Merged

bengobeil merged 4 commits into
mainfrom
feat/edit-pending-review-comments

Conversation

@ben-personal-agent-bot

@ben-personal-agent-bot ben-personal-agent-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Pending line comments in a pull request review could only be discarded and retyped. Posted comments already had a pen button to edit them; pending ones did not.

The pending comment card now shows the same pen button (PullRequestEditButton) at the end of the comment's text row, the same placement posted review comments use. Like every other pen in the pull request view, it appears on hover or keyboard focus (always on touch screens). It reopens the existing comment composer prefilled with the text, with Save/Cancel, Escape and Cmd/Ctrl+Enter, in both the Code tab and Guide excerpts. The trash button is unchanged. Pending comments are client-side drafts, so this is a store update (updateComment) with no server or contract change. Mobile already supports tap-to-edit.

Submitting a review now clears only the comments that were sent unchanged (matched by identity), so a comment edited while the review is in flight stays pending, the same way the summary already behaves.

Tests:

  • pullRequestReviewStore.test.ts: the existing submitted-snapshot case now also edits a comment in flight and checks it stays pending with its new text.
  • PullRequestReviewAnnotation.browser.test.tsx (new): pen, then edit; Cancel and Escape keep the original text, and Save sends the edited text once. It fails when Cancel no longer closes the editor.
Before After, at rest Hover Editing Saved
Light
Dark

Verification: vp run check:changed passes (format, lint, knip, typecheck, tests, react compiler); full vp run build passes. Screenshots are from rendering the card in the browser test runner; tested by hand in a local desktop dev build.

Work done by Claude Opus 5.5 in Claude Code (via T3 Code).

🤖 Generated with Claude Code

Pending line comments could only be discarded and retyped. The pending
card now has the same pen button posted comments use; it reopens the
comment composer with the text, in the Code tab and in Guide excerpts.

Submitting a review now clears only the comments sent unchanged, so a
comment edited while the review is in flight stays pending, matching how
the summary already behaves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@bengobeil bengobeil left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Are you sure the padding/margin between the pen and the trash can is Conforming to their specs and also I'm noticing the brightness Of the pen and the garbage can seems off And Can you give examples for all four in dark mode as well?

@ben-personal-agent-bot

Copy link
Copy Markdown
Author

Addressed in fa415a5:

  • Spacing: kept gap-1. It's the spacing the review composer already uses between its own trash and close icon buttons (PullRequestComposer.tsx).
  • Brightness: you were right. The trash was ghost with a size-3.5 icon (brighter and larger), while the pen is ghost-muted with size-3. The trash now uses ghost-muted/size-3, matching the pen and the existing delete on local diff comments.
  • Dark mode: the PR description now shows all four states in light and dark.

@bengobeil
bengobeil merged commit a30ddad into main Nov 12, 2026
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