Skip to content

[wrangler][vite-plugin] Print QR code for tunnel URLs - #13989

Merged
MattieTK merged 2 commits into
mainfrom
feat/tunnel-qr-code
May 22, 2026
Merged

[wrangler][vite-plugin] Print QR code for tunnel URLs#13989
MattieTK merged 2 commits into
mainfrom
feat/tunnel-qr-code

Conversation

@MattieTK

@MattieTK MattieTK commented May 20, 2026

Copy link
Copy Markdown
Member

Print a scannable QR code alongside the tunnel URL when sharing via Cloudflare Tunnel, making it easy to open the tunnel on a mobile device.

When a tunnel starts (via wrangler dev --tunnel or the Vite plugin with tunnel: true), a compact QR code is printed to the terminal using Unicode block characters. Generation is best-effort -- if it fails, the tunnel URL is still displayed as before.

Changes:

  • packages/wrangler/src/tunnel/dev.ts -- new printQrCode method on TunnelManager
  • packages/vite-plugin-cloudflare/src/plugins/tunnel.ts -- QR code in patchPrintUrls
  • New dependency: qr (0-dep, MIT/Apache-2.0, bundled into both packages)
image
  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: QR generation is wrapped in try/catch and is additive display-only behaviour; the qr library has its own extensive test suite
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this is a cosmetic enhancement to existing tunnel output with no new configuration options

@changeset-bot

changeset-bot Bot commented May 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 229552b

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

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Minor
@cloudflare/vitest-pool-workers Patch

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

@edmundhung
edmundhung self-requested a review May 20, 2026 19:13
@pkg-pr-new

pkg-pr-new Bot commented May 20, 2026

Copy link
Copy Markdown
create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@13989

wrangler

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

commit: 229552b

@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@MattieTK
MattieTK marked this pull request as ready for review May 22, 2026 10:11
@MattieTK
MattieTK requested a review from workers-devprod as a code owner May 22, 2026 10:11
@workers-devprod

workers-devprod commented May 22, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

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

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.

✅ Devin Review: No Issues Found

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

View in Devin Review to see 2 additional findings.

Open in Devin Review

@edmundhung edmundhung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Confirmed and verified both working as expected 👍🏼

@workers-devprod workers-devprod left a comment

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.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk May 22, 2026
@MattieTK
MattieTK merged commit f598eac into main May 22, 2026
67 of 68 checks passed
@MattieTK
MattieTK deleted the feat/tunnel-qr-code branch May 22, 2026 10:40
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk May 22, 2026
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