Markdown editor: Make the comment box repositionable, with a pointer line to its anchored range
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
### Problem
The comment boxes that carry agent feedback for a session are drawn over the
editor reading view, pinned to the right side of the viewport. They cannot be
moved. While a comment box is open it covers the source lines underneath it, and
when comments on nearby lines are shown at the same time the right half of the
reading area is almost completely blocked. When one comment box is tall enough
to push the boxes below it further down, there is also no way to tell which line
those pushed-down comments are anchored to.
### Proposed solution
- Let a comment box be dragged to any position inside the editor viewport, while
the box still follows the reading view as it scrolls.
- Moving a comment box must not change the range it is anchored to.
- Draw a dashed pointer line between a comment box and the range it is anchored
to, the way Word comment balloons connect to their text with a leader line, and
Google Docs comment cards link visually to the text they refer to.
- While the pointer hovers over a comment box, highlight the range that box is
anchored to, so the association is easier to read.
### Alternatives considered
- Add a collapse button to the comment box so its content can be folded away.
This reduces the overlap, but still gives no visible pointer back to the
anchored text.
### Additional context
- Comparable implementations: Word comment balloons with leader lines, Google
Docs comment cards in the right margin.
- Why this matters: the feedback loop of an agent session is reading and writing
many short comments across one file. If every box covers the code it comments
on, that review pass is much slower than it needs to be.
### Environment
- VS Code: 1.138.0 (x64), stable
- OS: Windows 10 Pro, 10.0.19045, 64-bit
- Area: the `add comment` feature in the Markdown editor inside the Agents window
Reported by @BlazeNebula. Drafted with GitHub Copilot (agent-assisted).
Contributor guide
Assessment
This issue has not been assessed yet.