Skip to content

pane: Add "Reveal in Finder" to tab context menu#51615

Merged
SomeoneToIgnore merged 5 commits intozed-industries:mainfrom
mvanhorn:osc/tab-reveal-in-finder
Mar 18, 2026
Merged

pane: Add "Reveal in Finder" to tab context menu#51615
SomeoneToIgnore merged 5 commits intozed-industries:mainfrom
mvanhorn:osc/tab-reveal-in-finder

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented Mar 15, 2026

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

Reveal in Finder in tab context menu

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
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 15, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Mar 15, 2026
Copy link
Copy Markdown
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SomeoneToIgnore SomeoneToIgnore self-assigned this Mar 17, 2026
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Added screenshot.

@SomeoneToIgnore
Copy link
Copy Markdown
Contributor

It's showing 404 for me and did not inline properly.
A good example of a screenshot in the PR could be #51621

@mvanhorn
Copy link
Copy Markdown
Contributor Author

IMG_8537 this work?

Copy link
Copy Markdown
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

"cmd-k r": "editor::RevealInFileManager",

Image

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
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Addressed in 1fe06e7:

  • Extracted reveal_in_file_manager_label(is_remote) into ui::utils and updated all 4 call sites (pane, editor context menu, project panel, outline panel).
  • Added separators around the "Reveal in Finder" entry in the tab context menu.

On the keybinding display: the workspace crate can't import editor::RevealInFileManager (editor depends on workspace, not the other way around). The tab context menu uses a custom handler via .entry() rather than .action() because it needs the specific tab's path. I left the action parameter as None for now. If you'd prefer a different approach (e.g., defining a workspace-level action that editor re-exports), let me know.

Copy link
Copy Markdown
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

#[derive(Clone, PartialEq, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
#[serde(deny_unknown_fields)]
pub struct OpenBrowser {
pub url: String,
}

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.
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Moved RevealInFileManager to zed_actions::editor in e14bd55 so the tab context menu can reference the action directly. Keybinding now displays:

reveal-in-finder-keybinding

Re-exported from editor so existing imports (project_panel, outline_panel, mouse_context_menu) still work without changes.

@mvanhorn
Copy link
Copy Markdown
Contributor Author

IMG_3220 image here!

Copy link
Copy Markdown
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Fixed the double separator in cef43d1 - removed the trailing .separator() after the Reveal entry since pin_tab_entries already starts with one.

Copy link
Copy Markdown
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

}),
)
})
.when(is_local, |menu| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To note, it's a bit odd to see is_remote within is_local here.

@SomeoneToIgnore
Copy link
Copy Markdown
Contributor

Seems like another CI formatting issue fix is needed, whilst doing that worth checking on that new style note.

@mvanhorn
Copy link
Copy Markdown
Contributor Author

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>
@SomeoneToIgnore SomeoneToIgnore enabled auto-merge (squash) March 18, 2026 19:26
@SomeoneToIgnore SomeoneToIgnore merged commit 7b14c7b into zed-industries:main Mar 18, 2026
29 checks passed
@yeskunall
Copy link
Copy Markdown
Member

yeskunall commented Mar 18, 2026

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! 💖

@mvanhorn
Copy link
Copy Markdown
Contributor Author

Thanks! Zed's been my daily driver for a while now, felt good to contribute back. Appreciate the warm welcome.

AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
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

![Reveal in Finder in tab context
menu](https://github.com/mvanhorn/zed/releases/download/untagged-02ded227b30e3bcce8db/IMG_8537.png)

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
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

![Reveal in Finder in tab context
menu](https://github.com/mvanhorn/zed/releases/download/untagged-02ded227b30e3bcce8db/IMG_8537.png)

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
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

![Reveal in Finder in tab context
menu](https://github.com/mvanhorn/zed/releases/download/untagged-02ded227b30e3bcce8db/IMG_8537.png)

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants