Repository navigation
Conversation
A local workspace menu now offers Reveal in Finder on macOS and Reveal in File Manager on Linux, using the folder captured for the menu target. The same row is offered for retained projects. Remote rows and Windows builds keep their existing menus; the reveal action is optional and never blocks the rest of the menu. Adds a menu test for a local workspace. Checked with cargo check, cargo test --locked -p sheprd-gpui --lib workspace_tests::reveal, cargo clippy --all-targets, cargo fmt, check-sorted, check-file-size and check-i18n.
[Medium impact] The change affects a bounded workspace-menu action on macOS and Linux. The PR appears safe to merge, with a non-blocking fix needed for workspaces that have no saved folder. Findings
SummaryAdds a Reveal action to local workspace menus on macOS and Linux.
Reviews (1) · Last reviewed commit: "feat(sidebar): reveal workspace folders ..." · Reviewed by Greptile |
Comment on lines
+8
to
+10
| if self.selected_is_remote() { | ||
| return None; | ||
| } |
There was a problem hiding this comment.
reveal_item() offers Reveal even when the workspace has no folder. App-kept workspaces can have an empty cwd, including the default workspace. Clicking Reveal passes an empty path to open or xdg-open and closes the menu without revealing a workspace folder. Hide the action when the target's cwd is empty, and add a test for that case.
Suggested change
| if self.selected_is_remote() { | |
| return None; | |
| } | |
| if self.selected_is_remote() | |
| || self.menu.target.as_ref().is_none_or(|target| target.cwd.is_empty()) | |
| { | |
| return None; | |
| } |
The workspace menu draws the reveal action as a header icon, like the mute toggle, so the pull request card stays visible in short windows. The retained menu keeps its own rows, and the compact-menu test now counts header actions dynamically.
… open The reveal action sits beside the branch and backend line, sized so the header never grows, and it leaves the menu open like the mute toggle. The compact-menu test counts header actions dynamically and walks past both header actions.
The detail line looks up any non-mute header action, so Windows builds without the reveal variant still compile.
10 of 16 tasks
This branch has not been deployed
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.
What
A local workspace menu now offers Reveal in Finder on macOS and Reveal in File Manager on Linux. Retained project rows expose the same action; remote workspaces and Windows builds keep their existing menus.
The action is optional, so it never blocks the rest of the menu on platforms where it does not exist. This is the remaining Finder piece from #1711, extracted on current
mainafter its retention work landed via #1771.Testing
cargo check --locked -p sheprd-gpuicargo test --locked -p sheprd-gpui --lib workspace_tests::reveal(1 passed)cargo clippy --locked -p sheprd-gpui --all-targetscargo fmt --all -- --check,check-sorted,check-file-size,check-i18n