Fix “Open file in project" option in the right-click menu not working#60807
Open
peakxy wants to merge 1 commit into
Open
Fix “Open file in project" option in the right-click menu not working#60807peakxy wants to merge 1 commit into
peakxy wants to merge 1 commit into
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: 徐一峰.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a GPUI element ID collision that caused file-header context menu actions (notably Open File in Project) to stop working on the 2nd+ file when viewing multi-file Git history diffs.
Changes:
- Makes the buffer header’s right-click menu element ID unique per buffer by keying it with
buffer_id.to_proto(), preventing shared menu state between multiple headers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
24976bf to
ad8da13
Compare
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
Author
|
@dinocosta hi, please take a look again at your convenience |
ad8da13 to
2ad4508
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Objective
Fix file header context menu actions in multi-file Git history diffs. Previously,
Open File in Projectworked for the first file but did nothing for subsequent files.Fixes #60790
Solution
Include the buffer ID in each file header context menu's GPUI element ID. This prevents multiple file headers in split diff views from sharing the same menu state.
Testing
cargo check -p editor --lib.cargo fmt --package editor -- --check.Open File in Projecton the second and subsequent file headers.CleanShot.2026-07-11.at.18.18.24.mp4
Self-Review Checklist:
Release Notes: