Skip to content

[explorer] add local explorer hotkey to the vite plugin#13137

Merged
NuroDev merged 5 commits intomainfrom
emily/vite-hotkey
Apr 13, 2026
Merged

[explorer] add local explorer hotkey to the vite plugin#13137
NuroDev merged 5 commits intomainfrom
emily/vite-hotkey

Conversation

@emily-shen
Copy link
Copy Markdown
Contributor

@emily-shen emily-shen commented Mar 31, 2026

this uses e like in wrangler, which doesn't conflict with any default vite hotkeys.

vite doesn't have a way of hiding bindings, so this should not be merged until we are ready to properly announce this.

Also, we seem to use open in c3 and wrangler to open browsers, so i've used it here too in the vite plugin, and added it to the pnpm catalog and updated the version from 8 -> 11. open v11 is ESM only, but it seems fine? I vaguely remember we have tried to move off as many CJS packages as possible, not sure if this was skipped on purpose.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: WIP Experimental feature

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@emily-shen emily-shen requested a review from a team as a code owner March 31, 2026 08:48
@emily-shen emily-shen requested a review from ascorbic March 31, 2026 08:48
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 31, 2026

🦋 Changeset detected

Latest commit: 9231b24

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 31, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

✅ All changesets look good

@emily-shen emily-shen added the blocked Blocked on other work label Mar 31, 2026
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 31, 2026

I've now thoroughly reviewed all the changes. Let me summarize my findings:

The implementation is clean and follows existing patterns well. The code:

  1. Correctly mirrors wrangler's e hotkey implementation from packages/wrangler/src/dev/hotkeys.ts
  2. Uses CorePaths.EXPLORER constant properly
  3. Has proper TTY guard matching the bindings shortcut pattern
  4. Handles resolvedUrls being undefined gracefully
  5. Properly handles the open() error case (matching wrangler's pattern, but with a more helpful error message that includes the URL)
  6. The open dependency is correctly placed in devDependencies since tsdown bundles it
  7. The catalog entry for open is properly added to pnpm-workspace.yaml and existing open deps in create-cloudflare and wrangler are migrated to use it
  8. Tests are well-structured
  9. The changeset is properly formatted

The only thing I notice is not really an issue but worth noting: in wrangler, the explorer hotkey has its label intentionally hidden (commented out) to keep it secret before announcement, while the vite plugin has a visible description: "open local explorer". But the PR description explicitly notes "this should not be merged until we are ready to properly announce this," so this is intentional.

LGTM

github run

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@emily-shen emily-shen marked this pull request as draft March 31, 2026 08:59
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 31, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13137

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13137

miniflare

npm i https://pkg.pr.new/miniflare@13137

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13137

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13137

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13137

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13137

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13137

wrangler

npm i https://pkg.pr.new/wrangler@13137

commit: 9231b24

@emily-shen emily-shen marked this pull request as ready for review March 31, 2026 10:08
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment thread packages/vite-plugin-cloudflare/src/plugins/shortcuts.ts
Comment thread packages/vite-plugin-cloudflare/src/plugins/shortcuts.ts
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 31, 2026
@petebacondarwin petebacondarwin marked this pull request as draft March 31, 2026 13:54
Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@emily-shen emily-shen removed the blocked Blocked on other work label Apr 13, 2026
@emily-shen emily-shen marked this pull request as ready for review April 13, 2026 07:25
@workers-devprod
Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@NuroDev NuroDev merged commit 1313275 into main Apr 13, 2026
67 of 71 checks passed
@NuroDev NuroDev deleted the emily/vite-hotkey branch April 13, 2026 07:54
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Apr 13, 2026
petebacondarwin pushed a commit that referenced this pull request Apr 13, 2026
Co-authored-by: Ben Dixon <ben@nuro.dev>
Co-authored-by: Ben <4991309+NuroDev@users.noreply.github.com>
NuroDev added a commit that referenced this pull request Apr 13, 2026
Co-authored-by: Ben Dixon <ben@nuro.dev>
Co-authored-by: Ben <4991309+NuroDev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants