Skip to content

project_panel: Fix Reveal in File Manager for WSL projects#50610

Merged
Veykril merged 2 commits intozed-industries:mainfrom
SarthakMishra:fix/reveal-in-file-manager-wsl
Mar 4, 2026
Merged

project_panel: Fix Reveal in File Manager for WSL projects#50610
Veykril merged 2 commits intozed-industries:mainfrom
SarthakMishra:fix/reveal-in-file-manager-wsl

Conversation

@SarthakMishra
Copy link
Copy Markdown
Contributor

Closes #46767

Summary

The "Reveal in File Manager" action was shown in the context menu for WSL projects (guarded by is_via_wsl_with_host_interop), but the action handler in Render was only registered when project.is_local() — which returns false for WSL. Dispatching the action without a handler caused a crash.

Adds the same is_via_wsl_with_host_interop(cx) check to the handler registration.

Testing

  • Ran cargo test -p project_panel — 78 passed, 0 failed
  • Manual testing: connected to WSL Ubuntu, right-clicked a file in the project panel, used "Reveal in File Manager" — Windows Explorer opened correctly without crashing

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

The context menu already included WSL projects in the `is_local` check
for showing the "Reveal in File Manager" action, but the corresponding
action handler in `Render` was only registered when `project.is_local()`
was true. Since WSL projects are technically remote, the handler was
never registered, causing a crash when the action was dispatched.

Add `project.is_via_wsl_with_host_interop(cx)` to the handler
registration guard so it matches the context menu condition.

Release Notes:

- Fixed a crash when using "Reveal in File Manager" on files in WSL
  projects.
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 3, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Sarthak.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
@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 3, 2026
@SarthakMishra
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 4, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @SarthakMishra on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 4, 2026

The cla-bot has been summoned, and re-checked this pull request!

@SarthakMishra
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Mar 4, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 4, 2026

The cla-bot has been summoned, and re-checked this pull request!

@Veykril Veykril changed the title project_panel: Fix Reveal in File Manager crash for WSL projects Mar 4, 2026
Copy link
Copy Markdown
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

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

Thanks!

@Veykril Veykril enabled auto-merge (squash) March 4, 2026 07:20
auto-merge was automatically disabled March 4, 2026 07:28

Head branch was pushed to by a user without write access

@SarthakMishra
Copy link
Copy Markdown
Contributor Author

@Veykril Pushed a formatting fix — should be good now. Thanks for the review!

@Veykril Veykril enabled auto-merge (squash) March 4, 2026 07:34
@Veykril Veykril merged commit 152d3ea into zed-industries:main Mar 4, 2026
28 checks passed
@SarthakMishra SarthakMishra deleted the fix/reveal-in-file-manager-wsl branch March 4, 2026 07:40
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
…tries#50610)

Closes zed-industries#46767

## Summary

The "Reveal in File Manager" action was shown in the context menu for
WSL projects (guarded by `is_via_wsl_with_host_interop`), but the action
handler in `Render` was only registered when `project.is_local()` —
which returns `false` for WSL. Dispatching the action without a handler
caused a crash.

Adds the same `is_via_wsl_with_host_interop(cx)` check to the handler
registration.

## Testing

- Ran `cargo test -p project_panel` — 78 passed, 0 failed
- Manual testing: connected to WSL Ubuntu, right-clicked a file in the
project panel, used "Reveal in File Manager" — Windows Explorer opened
correctly without crashing

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed a crash when using "Reveal in File Manager" on files in WSL
projects (zed-industries#46767).
wzulfikar pushed a commit to wzulfikar/zed that referenced this pull request Mar 4, 2026
…tries#50610)

Closes zed-industries#46767

## Summary

The "Reveal in File Manager" action was shown in the context menu for
WSL projects (guarded by `is_via_wsl_with_host_interop`), but the action
handler in `Render` was only registered when `project.is_local()` —
which returns `false` for WSL. Dispatching the action without a handler
caused a crash.

Adds the same `is_via_wsl_with_host_interop(cx)` check to the handler
registration.

## Testing

- Ran `cargo test -p project_panel` — 78 passed, 0 failed
- Manual testing: connected to WSL Ubuntu, right-clicked a file in the
project panel, used "Reveal in File Manager" — Windows Explorer opened
correctly without crashing

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed a crash when using "Reveal in File Manager" on files in WSL
projects (zed-industries#46767).
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

2 participants