Repository navigation
feat(desktop): comment on a range of lines in Review - #4425
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Review comments can cover a range of lines.
startLine(persisted with the drafts). Send to agent writespath:11-18and quotes up to 6 lines, then "…". Post to #N sendsstart_line/start_side.rangeLinesinstate/diff.tsrefuses a range that crosses a hunk header.ReviewCommentgains optionalstart_line/start_side.review_payloadsends a one-line range as a single line, refuses a range that ends before it starts, and defaultsstart_sideto the comment's side. The review payload and its comment type moved topull_review.rs(re-exported frompull_requests), which bringspull_requests.rsdown from 2,590 to 2,523 lines. The size cap is lowered to match.Changelog
Review: Shift-click a second line number to comment on a range of lines; the agent and pull request reviews get the whole range.
Testing
bun run check(newstate/diff.test.ts: range lines per side, refused across hunks, range message and elision).pull_review.rs(payload with and without a range, single-line collapse, reversed range refused, old JSON without the fields). No local Rust build on this machine: CI compiles and runs them.cargo fmt --all -- --check, comment and size lints.mock-thread-1, clicked new line 1 and Shift-clicked line 2. Both are tinted, and the saved draft's message reads- `src/app.ts:1-2`: …with both lines quoted.Closes #4397