-
Notifications
You must be signed in to change notification settings - Fork 622
Sync Pull Requests view with currently open PR overview/description #7123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync Pull Requests view with currently open PR overview/description #7123
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot, I've updated it to only do the reveal
if the view is already visible, as we don't want to open the view if the user isn't already on it. Can you update the change to select the active PR when the view becomes visible?
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
I've updated the implementation to also select the active PR when the tree view becomes visible. Added a |
Overview
This PR implements automatic synchronization between the "Pull Requests" tree view and the currently open PR overview/description panel. When a user opens a PR overview or switches between different PRs, the tree view now automatically highlights and reveals the corresponding PR.
Problem
Previously, there was no connection between the PR overview panel and the tree view. Users had to manually navigate the tree to find the PR they were viewing, which created a disconnected experience when working with multiple PRs.
Solution
Added a minimal event-driven sync mechanism that:
Implementation Details
Core Changes
src/github/pullRequestOverview.ts
:onDidChangeActivePullRequest
event emitterupdate()
method when PR changesonDidChangeViewState()
when panel becomes visibledispose()
methodsrc/view/prsTreeDataProvider.ts
:syncWithActivePullRequest()
method with error handlingexpandPullRequest()
andreveal()
APIsBehavior
Testing
Design Principles
expandPullRequest()
andreveal()
methodsUser Experience
Users now get a seamless, connected experience where the tree view automatically follows their PR navigation, eliminating the need to manually search for PRs in the tree when switching between overview panels.
Closes #[issue-number]
💡 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.