pane: Add "Reveal in Finder" to tab context menu#51615
pane: Add "Reveal in Finder" to tab context menu#51615SomeoneToIgnore merged 5 commits intozed-industries:mainfrom
Conversation
Add a platform-specific "Reveal in Finder" (macOS) / "Reveal in File Explorer" (Windows) / "Reveal in File Manager" (Linux) entry to the tab context menu. This action already exists in the editor right-click menu, project panel, and outline panel but was missing from the tab context menu. Placed after "Copy Relative Path" and before "Pin Tab", gated behind is_local to match the project panel behavior. Release Notes: - Added "Reveal in Finder" to the tab context menu
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
This needs a screenshot (https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#sending-changes)
|
Added screenshot. |
|
It's showing 404 for me and did not inline properly. |
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Thank you for the screenshot, this works.
What's odd is that there's no binding for that action is displayed — that looks wrong given that editor clearly has the default on macOS:
zed/assets/keymaps/default-macos.json
Line 599 in b707f97
Apart from that, let's try to do that VSCode and Intellij do, they have separators around "open in" actions, to make them look fully standalone in the menu.
- Extract `reveal_in_file_manager_label()` into ui::utils to deduplicate the cfg-based platform string across 4 crates (pane, editor, project panel, outline panel) - Add separators around the "Reveal in Finder" entry in the tab context menu to visually group it, matching VSCode and IntelliJ behavior
|
Addressed in 1fe06e7:
On the keybinding display: the |
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Thank you for the update.
For sharing an action we can use zed_actions module, and editor here is a namespace that can be configured, similar to
zed/crates/zed_actions/src/lib.rs
Lines 15 to 21 in 89c118e
that should be enough to break the indirection, hopefully?
Would be also great to have an updated screenshot when this last issue is fixed.
Moves the RevealInFileManager action from the editor actions! macro to zed_actions::editor so workspace::pane can reference it directly. This enables the keybinding shortcut to display in the tab context menu entry.
|
Moved Re-exported from |
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Great, thank you so much — one last thing would be to fix that morbid double separator thing (whilst keeping the new entry surrounded by both) and we're good to go.
The Reveal in Finder entry had a trailing .separator() call, but pin_tab_entries already starts with .separator(), creating a visible double separator line in the tab context menu. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Fixed the double separator in cef43d1 - removed the trailing |
| }), | ||
| ) | ||
| }) | ||
| .when(is_local, |menu| { |
There was a problem hiding this comment.
To note, it's a bit odd to see is_remote within is_local here.
|
Seems like another CI formatting issue fix is needed, whilst doing that worth checking on that new style note. |
|
THanks for jamming with me on this. I really needed / want this feature in my workflows and can't believe it's actually going to ship. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Hey @mvanhorn! Nice to see you here! This is a sick QoL addition -- thank you for this! Missed your other PRs but congrats on your first (couple of) contribution(s) to Zed! 💖 |
|
Thanks! Zed's been my daily driver for a while now, felt good to contribute back. Appreciate the warm welcome. |
The tab context menu has "Copy Path", "Open in Terminal", and "Reveal In Project Panel" but no way to reveal the file in the system file manager. This action already exists in three other context menus (editor right-click, project panel, outline panel) but was missing from tab right-click. ## Changes Adds a platform-specific entry to the tab context menu: - **macOS:** "Reveal in Finder" - **Windows:** "Reveal in File Explorer" - **Linux:** "Reveal in File Manager" Placed after "Copy Relative Path" and before "Pin Tab". Gated behind `is_local` (including WSL with host interop) to match the project panel's behavior. Uses the existing `project.reveal_path()` infrastructure, which handles platform-specific file manager invocation and WSL path conversion. ## Prior art Every major editor has this in the tab context menu: - VS Code: "Reveal in Finder" (macOS) / "Reveal in File Explorer" (Windows) - JetBrains IDEs: Right-click tab -> "Open in" -> "Finder" - Sublime Text: Right-click tab -> "Reveal in Finder" Zed already has this in the editor body right-click menu (`Cmd-K R`), project panel (`Alt-Cmd-R`), and outline panel. The tab context menu was the only place it was missing. This contribution was developed with AI assistance (Claude Code). Release Notes: - Added "Reveal in Finder" to the tab context menu ## Screenshot  --------- Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The tab context menu has "Copy Path", "Open in Terminal", and "Reveal In Project Panel" but no way to reveal the file in the system file manager. This action already exists in three other context menus (editor right-click, project panel, outline panel) but was missing from tab right-click. ## Changes Adds a platform-specific entry to the tab context menu: - **macOS:** "Reveal in Finder" - **Windows:** "Reveal in File Explorer" - **Linux:** "Reveal in File Manager" Placed after "Copy Relative Path" and before "Pin Tab". Gated behind `is_local` (including WSL with host interop) to match the project panel's behavior. Uses the existing `project.reveal_path()` infrastructure, which handles platform-specific file manager invocation and WSL path conversion. ## Prior art Every major editor has this in the tab context menu: - VS Code: "Reveal in Finder" (macOS) / "Reveal in File Explorer" (Windows) - JetBrains IDEs: Right-click tab -> "Open in" -> "Finder" - Sublime Text: Right-click tab -> "Reveal in Finder" Zed already has this in the editor body right-click menu (`Cmd-K R`), project panel (`Alt-Cmd-R`), and outline panel. The tab context menu was the only place it was missing. This contribution was developed with AI assistance (Claude Code). Release Notes: - Added "Reveal in Finder" to the tab context menu ## Screenshot  --------- Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The tab context menu has "Copy Path", "Open in Terminal", and "Reveal In Project Panel" but no way to reveal the file in the system file manager. This action already exists in three other context menus (editor right-click, project panel, outline panel) but was missing from tab right-click. ## Changes Adds a platform-specific entry to the tab context menu: - **macOS:** "Reveal in Finder" - **Windows:** "Reveal in File Explorer" - **Linux:** "Reveal in File Manager" Placed after "Copy Relative Path" and before "Pin Tab". Gated behind `is_local` (including WSL with host interop) to match the project panel's behavior. Uses the existing `project.reveal_path()` infrastructure, which handles platform-specific file manager invocation and WSL path conversion. ## Prior art Every major editor has this in the tab context menu: - VS Code: "Reveal in Finder" (macOS) / "Reveal in File Explorer" (Windows) - JetBrains IDEs: Right-click tab -> "Open in" -> "Finder" - Sublime Text: Right-click tab -> "Reveal in Finder" Zed already has this in the editor body right-click menu (`Cmd-K R`), project panel (`Alt-Cmd-R`), and outline panel. The tab context menu was the only place it was missing. This contribution was developed with AI assistance (Claude Code). Release Notes: - Added "Reveal in Finder" to the tab context menu ## Screenshot  --------- Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>


The tab context menu has "Copy Path", "Open in Terminal", and "Reveal In Project Panel" but no way to reveal the file in the system file manager. This action already exists in three other context menus (editor right-click, project panel, outline panel) but was missing from tab right-click.
Changes
Adds a platform-specific entry to the tab context menu:
Placed after "Copy Relative Path" and before "Pin Tab". Gated behind
is_local(including WSL with host interop) to match the project panel's behavior. Uses the existingproject.reveal_path()infrastructure, which handles platform-specific file manager invocation and WSL path conversion.Prior art
Every major editor has this in the tab context menu:
Zed already has this in the editor body right-click menu (
Cmd-K R), project panel (Alt-Cmd-R), and outline panel. The tab context menu was the only place it was missing.This contribution was developed with AI assistance (Claude Code).
Release Notes:
Screenshot