Add "Reveal in Finder" to code pane overflow menu#10334
Conversation
Adds a `Reveal in Finder` item to the per-code-pane overflow menu (the `⋮` button next to the tab bar), placed right after `Copy file path`. Selecting it opens the active code tab's file in the platform's file manager (Finder on macOS, Explorer on Windows, otherwise the generic file manager) via `AppContext::open_file_path_in_explorer`. The menu item is only emitted when the active tab has a resolvable local path, mirroring the existing `Copy file path` guard so the behavior is consistent on remote / unsaved buffers, and the underlying `CodeViewAction::RevealInFinder` variant is gated by the `local_fs` feature for the same reason. Refs warpdotdev#10257. Co-authored-by: Cursor <cursoragent@cursor.com>
Registers `code_view:reveal_in_finder` as an `EditableBinding` scoped to the `CodeEditorView` context with a default macOS keystroke of `Cmd+Option+R`, so users can invoke the action without opening the overflow menu and can rebind it from Settings → Keybindings. Linux and Windows ship without a default to avoid clashing with common shortcuts on those platforms; users can still bind it themselves. The overflow menu label is now built with `MenuItemFields::new_with_label` and the keystroke is looked up via `keybinding_name_to_keystroke`, so any user-customized binding is reflected in the menu chip and the chip stays empty when no binding is defined. This mirrors the pattern already used by `Close saved` / `Close all` in this file. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @wzc520pyfm on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
@cla-bot check |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: Comment Powered by Oz |
There was a problem hiding this comment.
Overview
Adds a local-filesystem-gated code pane overflow action and editable keybinding to reveal the active code tab in the platform file manager.
Concerns
- The editable keybinding description is macOS-specific even though the binding appears on every local filesystem platform.
Verdict
Found: 0 critical, 0 important, 1 suggestions
Approve with nits
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
|
The cla-bot has been summoned, and re-checked this pull request! |
kevinyang372
left a comment
There was a problem hiding this comment.
This looks good! Can you get rid of the editable keybinding? I could approve and merge after that
| .with_context_predicate(id!("CodeEditorView")) | ||
| .with_key_binding("cmdorctrl-r u"), | ||
| #[cfg(feature = "local_fs")] | ||
| EditableBinding::new( |
There was a problem hiding this comment.
I don't think we need an editable keybinding for this action
Removes the `code_view:reveal_in_finder` `EditableBinding` (and its `Cmd+Option+R` macOS default), the `REVEAL_IN_FINDER_BINDING_NAME` constant, the `keybinding_name_to_keystroke` lookup, and the `MenuItemFields::new_with_label` shortcut chip wiring. The overflow menu entry stays but is now built with a plain `MenuItemFields::new` without a keystroke chip. Per PR review, an editable binding adds noise to Settings → Keybindings for a low-frequency action that is already discoverable from the per-pane overflow menu. Users who want a shortcut can still add one themselves via Settings. Co-authored-by: Cursor <cursoragent@cursor.com>
3ab05a0 to
c3ff288
Compare
kevinyang372
left a comment
There was a problem hiding this comment.
Thanks for contributing!
Close warpdotdev#10257 . ## Description Adds a `Reveal in Finder` item to the per-code-pane overflow (`⋮`) menu, with a `Cmd+Option+R` shortcut on macOS. Selecting it opens the active code tab's file in the platform's file manager (Finder on macOS, Explorer on Windows, or the system file manager on Linux) via `AppContext::open_file_path_in_explorer`. The label is platform-aware (`Reveal in Finder` / `Reveal in Explorer` / `Reveal in file manager`), and the keystroke chip is driven by `keybinding_name_to_keystroke`, so user overrides set in Settings → Keybindings are reflected in the menu chip. The work is split across two focused commits: 1. **Add Reveal in Finder action to code pane overflow menu** — new `CodeViewAction::RevealInFinder` variant + menu item + handler. The item is only emitted when the active tab has a resolvable local path (mirroring the existing `Copy file path` guard), and the variant is gated by the `local_fs` feature for the same reason. 2. **Add Cmd+Option+R keybinding for Reveal in Finder** — registers `code_view:reveal_in_finder` as an `EditableBinding` scoped to `CodeEditorView` with a default macOS keystroke; the menu item label switches to `MenuItemFields::new_with_label` so the chip displays the bound shortcut. Linux/Windows ship without a default to avoid clashing with common shortcuts there; users can still bind it themselves. ## Linked Issue Implements warpdotdev#10257. - [x] The linked issue is labeled `ready-to-spec` or `ready-to-implement`. - [x] Where appropriate, screenshots or a short video of the implementation are included below. ## Testing - [x] I have manually tested my changes locally with `./script/run` Manual verification on macOS: - Open a file in the code pane → click the pane's `⋮` menu → `Reveal in Finder ⌥⌘R` appears beneath `Copy file path`. Selecting it opens Finder at the file's location. - Pressing `Cmd+Option+R` while the editor is focused does the same. - The chip updates if the binding is overridden in Settings → Keybindings. - The entry is hidden when the active tab has no resolvable local path (e.g. unsaved buffers). **Why no integration test**: the user-visible side effect is the platform's `open_file_path_in_explorer` call, which is implemented as a no-op in the test platform delegate (`crates/warpui_core/src/platform/test/delegate.rs`), so there is no observable post-condition for an integration assertion. In addition, the integration crate cannot directly reference `CodeView` / `CodeViewAction` (the `code` module is private to the `warp` crate) or `MenuItem::fields()` (`#[cfg(test)]`-gated) without expanding the public API surface just for the test. I'm happy to revisit this in a follow-up if reviewers would like a UI-driven smoke test or want to expose those internals behind a `feature = "integration_tests"` gate. ### Screenshots / Videos _Screenshot showing the new menu entry will be added shortly — captured locally from `./script/run`._ <img width="1280" height="800" alt="Snipaste_menu_action_item" src="https://github.com/user-attachments/assets/436d0b07-3e15-47b9-abce-9ec40d8af877" /> <img width="1286" height="800" alt="Snipaste_menu_action_open_finder" src="https://github.com/user-attachments/assets/793bb4a9-8daa-4163-b1d9-5cf5bcf42d4f" /> ## Agent Mode - [ ] Warp Agent Mode - This PR was created via Warp's AI Agent Mode <!-- CHANGELOG-IMPROVEMENT: Added a "Reveal in Finder" item (with default Cmd+Option+R shortcut on macOS) to the code pane overflow menu so you can jump from the active editor to the underlying file in your file manager. --> Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
Close warpdotdev#10257 . Adds a `Reveal in Finder` item to the per-code-pane overflow (`⋮`) menu, with a `Cmd+Option+R` shortcut on macOS. Selecting it opens the active code tab's file in the platform's file manager (Finder on macOS, Explorer on Windows, or the system file manager on Linux) via `AppContext::open_file_path_in_explorer`. The label is platform-aware (`Reveal in Finder` / `Reveal in Explorer` / `Reveal in file manager`), and the keystroke chip is driven by `keybinding_name_to_keystroke`, so user overrides set in Settings → Keybindings are reflected in the menu chip. The work is split across two focused commits: 1. **Add Reveal in Finder action to code pane overflow menu** — new `CodeViewAction::RevealInFinder` variant + menu item + handler. The item is only emitted when the active tab has a resolvable local path (mirroring the existing `Copy file path` guard), and the variant is gated by the `local_fs` feature for the same reason. 2. **Add Cmd+Option+R keybinding for Reveal in Finder** — registers `code_view:reveal_in_finder` as an `EditableBinding` scoped to `CodeEditorView` with a default macOS keystroke; the menu item label switches to `MenuItemFields::new_with_label` so the chip displays the bound shortcut. Linux/Windows ship without a default to avoid clashing with common shortcuts there; users can still bind it themselves. Implements warpdotdev#10257. - [x] The linked issue is labeled `ready-to-spec` or `ready-to-implement`. - [x] Where appropriate, screenshots or a short video of the implementation are included below. - [x] I have manually tested my changes locally with `./script/run` Manual verification on macOS: - Open a file in the code pane → click the pane's `⋮` menu → `Reveal in Finder ⌥⌘R` appears beneath `Copy file path`. Selecting it opens Finder at the file's location. - Pressing `Cmd+Option+R` while the editor is focused does the same. - The chip updates if the binding is overridden in Settings → Keybindings. - The entry is hidden when the active tab has no resolvable local path (e.g. unsaved buffers). **Why no integration test**: the user-visible side effect is the platform's `open_file_path_in_explorer` call, which is implemented as a no-op in the test platform delegate (`crates/warpui_core/src/platform/test/delegate.rs`), so there is no observable post-condition for an integration assertion. In addition, the integration crate cannot directly reference `CodeView` / `CodeViewAction` (the `code` module is private to the `warp` crate) or `MenuItem::fields()` (`#[cfg(test)]`-gated) without expanding the public API surface just for the test. I'm happy to revisit this in a follow-up if reviewers would like a UI-driven smoke test or want to expose those internals behind a `feature = "integration_tests"` gate. _Screenshot showing the new menu entry will be added shortly — captured locally from `./script/run`._ <img width="1280" height="800" alt="Snipaste_menu_action_item" src="https://github.com/user-attachments/assets/436d0b07-3e15-47b9-abce-9ec40d8af877" /> <img width="1286" height="800" alt="Snipaste_menu_action_open_finder" src="https://github.com/user-attachments/assets/793bb4a9-8daa-4163-b1d9-5cf5bcf42d4f" /> - [ ] Warp Agent Mode - This PR was created via Warp's AI Agent Mode <!-- CHANGELOG-IMPROVEMENT: Added a "Reveal in Finder" item (with default Cmd+Option+R shortcut on macOS) to the code pane overflow menu so you can jump from the active editor to the underlying file in your file manager. --> Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com> (cherry picked from commit 10e2bae)
Close warpdotdev#10257 . ## Description Adds a `Reveal in Finder` item to the per-code-pane overflow (`⋮`) menu, with a `Cmd+Option+R` shortcut on macOS. Selecting it opens the active code tab's file in the platform's file manager (Finder on macOS, Explorer on Windows, or the system file manager on Linux) via `AppContext::open_file_path_in_explorer`. The label is platform-aware (`Reveal in Finder` / `Reveal in Explorer` / `Reveal in file manager`), and the keystroke chip is driven by `keybinding_name_to_keystroke`, so user overrides set in Settings → Keybindings are reflected in the menu chip. The work is split across two focused commits: 1. **Add Reveal in Finder action to code pane overflow menu** — new `CodeViewAction::RevealInFinder` variant + menu item + handler. The item is only emitted when the active tab has a resolvable local path (mirroring the existing `Copy file path` guard), and the variant is gated by the `local_fs` feature for the same reason. 2. **Add Cmd+Option+R keybinding for Reveal in Finder** — registers `code_view:reveal_in_finder` as an `EditableBinding` scoped to `CodeEditorView` with a default macOS keystroke; the menu item label switches to `MenuItemFields::new_with_label` so the chip displays the bound shortcut. Linux/Windows ship without a default to avoid clashing with common shortcuts there; users can still bind it themselves. ## Linked Issue Implements warpdotdev#10257. - [x] The linked issue is labeled `ready-to-spec` or `ready-to-implement`. - [x] Where appropriate, screenshots or a short video of the implementation are included below. ## Testing - [x] I have manually tested my changes locally with `./script/run` Manual verification on macOS: - Open a file in the code pane → click the pane's `⋮` menu → `Reveal in Finder ⌥⌘R` appears beneath `Copy file path`. Selecting it opens Finder at the file's location. - Pressing `Cmd+Option+R` while the editor is focused does the same. - The chip updates if the binding is overridden in Settings → Keybindings. - The entry is hidden when the active tab has no resolvable local path (e.g. unsaved buffers). **Why no integration test**: the user-visible side effect is the platform's `open_file_path_in_explorer` call, which is implemented as a no-op in the test platform delegate (`crates/warpui_core/src/platform/test/delegate.rs`), so there is no observable post-condition for an integration assertion. In addition, the integration crate cannot directly reference `CodeView` / `CodeViewAction` (the `code` module is private to the `warp` crate) or `MenuItem::fields()` (`#[cfg(test)]`-gated) without expanding the public API surface just for the test. I'm happy to revisit this in a follow-up if reviewers would like a UI-driven smoke test or want to expose those internals behind a `feature = "integration_tests"` gate. ### Screenshots / Videos _Screenshot showing the new menu entry will be added shortly — captured locally from `./script/run`._ <img width="1280" height="800" alt="Snipaste_menu_action_item" src="https://github.com/user-attachments/assets/436d0b07-3e15-47b9-abce-9ec40d8af877" /> <img width="1286" height="800" alt="Snipaste_menu_action_open_finder" src="https://github.com/user-attachments/assets/793bb4a9-8daa-4163-b1d9-5cf5bcf42d4f" /> ## Agent Mode - [ ] Warp Agent Mode - This PR was created via Warp's AI Agent Mode <!-- CHANGELOG-IMPROVEMENT: Added a "Reveal in Finder" item (with default Cmd+Option+R shortcut on macOS) to the code pane overflow menu so you can jump from the active editor to the underlying file in your file manager. --> Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>

Close #10257 .
Description
Adds a
Reveal in Finderitem to the per-code-pane overflow (⋮) menu, with aCmd+Option+Rshortcut on macOS. Selecting it opens the active code tab's file in the platform's file manager (Finder on macOS, Explorer on Windows, or the system file manager on Linux) viaAppContext::open_file_path_in_explorer.The label is platform-aware (
Reveal in Finder/Reveal in Explorer/Reveal in file manager), and the keystroke chip is driven bykeybinding_name_to_keystroke, so user overrides set in Settings → Keybindings are reflected in the menu chip.The work is split across two focused commits:
CodeViewAction::RevealInFindervariant + menu item + handler. The item is only emitted when the active tab has a resolvable local path (mirroring the existingCopy file pathguard), and the variant is gated by thelocal_fsfeature for the same reason.code_view:reveal_in_finderas anEditableBindingscoped toCodeEditorViewwith a default macOS keystroke; the menu item label switches toMenuItemFields::new_with_labelso the chip displays the bound shortcut. Linux/Windows ship without a default to avoid clashing with common shortcuts there; users can still bind it themselves.Linked Issue
Implements #10257.
ready-to-specorready-to-implement.Testing
./script/runManual verification on macOS:
⋮menu →Reveal in Finder ⌥⌘Rappears beneathCopy file path. Selecting it opens Finder at the file's location.Cmd+Option+Rwhile the editor is focused does the same.Why no integration test: the user-visible side effect is the platform's
open_file_path_in_explorercall, which is implemented as a no-op in the test platform delegate (crates/warpui_core/src/platform/test/delegate.rs), so there is no observable post-condition for an integration assertion. In addition, the integration crate cannot directly referenceCodeView/CodeViewAction(thecodemodule is private to thewarpcrate) orMenuItem::fields()(#[cfg(test)]-gated) without expanding the public API surface just for the test. I'm happy to revisit this in a follow-up if reviewers would like a UI-driven smoke test or want to expose those internals behind afeature = "integration_tests"gate.Screenshots / Videos
Screenshot showing the new menu entry will be added shortly — captured locally from
./script/run.Agent Mode
Made with Cursor