Summary
In plannotator review, annotations created from selected code inside the diff do not capture the full selected range. When a multi-line or larger code fragment is selected, clicking the + annotation button or clicking the selected code creates an annotation/comment for only the single line that was clicked.
Reproduction steps
- Open the code review UI with
plannotator review on a diff that contains changed code.
- Select a code fragment in the diff that spans more than the single line you plan to click.
- Click the
+ annotation button for the selection, or click on the selected code to create an annotation.
- Observe the text/range that is added to the annotation/comment.
Expected behavior
The created annotation should include the entire selected code fragment. If the user selected multiple lines or a larger range within the diff, that full selected range should be used as the annotation target/comment context, not just the line that received the click.
Notes
This looks like the diff annotation action may be falling back to the clicked line instead of reading the current browser/text selection. Possible places to check: review diff selection handling, the + annotation affordance in the diff viewer, and any line-level click handler that maps an annotation to a single diff row.
Environment
- Surface:
plannotator review / code review UI
- OS from reporter session: macOS / Darwin arm64
- Local package version observed in checkout:
0.21.0
- Browser: Chrome
Summary
In
plannotator review, annotations created from selected code inside the diff do not capture the full selected range. When a multi-line or larger code fragment is selected, clicking the+annotation button or clicking the selected code creates an annotation/comment for only the single line that was clicked.Reproduction steps
plannotator reviewon a diff that contains changed code.+annotation button for the selection, or click on the selected code to create an annotation.Expected behavior
The created annotation should include the entire selected code fragment. If the user selected multiple lines or a larger range within the diff, that full selected range should be used as the annotation target/comment context, not just the line that received the click.
Notes
This looks like the diff annotation action may be falling back to the clicked line instead of reading the current browser/text selection. Possible places to check: review diff selection handling, the
+annotation affordance in the diff viewer, and any line-level click handler that maps an annotation to a single diff row.Environment
plannotator review/ code review UI0.21.0