feat(review): add multiline comment selections - #931
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds persistent mouse and keyboard code selections with explicit Comment, Copy, and Clear actions, and carries multiline or dual-sided note ranges through review state and session-facing contracts.
Confidence Score: 5/5The PR appears safe to merge; no concrete changed-code defect remained after tracing selection geometry, command ownership, anchor preservation, and protocol validation. Selection invalidates when source or rendered geometry changes, copy and comment actions use the same committed projection as highlighting, and multiline anchors retain their ranges and ownership through local and remote review flows. Important Files Changed
Sequence DiagramsequenceDiagram
actor Reviewer
participant Diff as Diff selection UI
participant Geometry as Range projection
participant Review as Review state/intents
participant Protocol as Session protocol
participant Notes as Saved notes
Reviewer->>Diff: Drag rows or press v and navigate
Diff->>Geometry: Project rendered endpoints
Geometry-->>Diff: Semantic old/new ranges + preferred endpoint
Reviewer->>Diff: Comment
Diff->>Review: Start range-targeted draft
Review->>Review: Resolve owner and intersecting hunks
Reviewer->>Review: Save, edit, or reply
Review->>Notes: Preserve semantic anchor
Protocol->>Review: Parse and validate remote range actions
Review-->>Protocol: Applied revision or stable failure
Reviews (1): Last reviewed commit: "feat(review): add multiline comment sele..." | Re-trigger Greptile |
5c1a589 to
4ec14d4
Compare
4ec14d4 to
b8a3553
Compare
Summary
[+]affordance overlay the note guide instead of shifting itBehavior
Reviewers can drag across code or press
vand navigate to create a persistent selection.copens a range-targeted comment,ycopies the selected text, andEscclears the selection contextually without taking Escape away from extension modes.Selections survive vertical scrolling but clear when layout or source geometry changes. Stack-mode replacement selections can include both old and new ranges; split-mode selections remain constrained to one side. Presentation-only rows such as inline notes and hunk headers may be crossed when the underlying source coverage remains contiguous.
Range identity remains semantic rather than text-derived. Saved multiline notes retain their preferred endpoint and owner hunk through reloads, edits, replies, terminal projection, and protocol round trips.
Verification
bun run typecheckbun run test— 2,112 passed, 3 skippedbun run test:integration— 140 passed, 1 platform skipbun run deps:checkbun test scripts/source-boundaries.test.tsTested on Linux. PTY/TTY behavior was not manually tested on macOS or Windows.
Visual evidence
The hover regression reproduced here is covered by a rendering regression test;
[+]now overlays the trailing note guide rather than pushing it left:https://glance.sh/0iqc6zB9OhWpe5wA8P7F.png
This PR description was generated by Pi using gpt-5.6-sol