Add Ctrl+click to collapse all comment threads in editor from Comments view #267076
+82
−5
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.
Implements the ability to Ctrl+click on comments in the Comments view to open the file at the comment location and collapse all comment threads in that editor, providing a quick way to navigate to code while minimizing visual clutter from expanded comments.
Changes
This PR adds new functionality to the Comments view tree interaction:
Implementation Details
The implementation enhances the existing
onDidOpen
event handler inCommentsView
to:browserEvent.ctrlKey
openFile
method via a new optional parameterCommentController
and callingcollapseAll()
Usage Example
When working with multiple comment threads in a file:
This is particularly useful when reviewing code with many comment threads, allowing developers to quickly navigate to specific locations while keeping the editor view clean and focused.
Testing
Fixes #XXXXX
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
electronjs.org
node-gyp
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Fixes #266727
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.