Skip to content

fix(dev): disable dev channels when BroadcastChannel throws - #1600

Merged
danielroe merged 1 commit into
mainfrom
fix/stackblitz-log-channel
Oct 6, 2026
Merged

danielroe merged 1 commit into
mainfrom
fix/stackblitz-log-channel

Conversation

@danielroe

@danielroe danielroe commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

nuxt/nuxt#36469

📚 Description

this disables use of global BroadcastChannel if it's unavailable (eg stackblitz)

@pkg-pr-new

pkg-pr-new Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
  • nuxt-cli-playground

    npm i https://pkg.pr.new/create-nuxt@1600
    
    npm i https://pkg.pr.new/nuxi@1600
    
    npm i https://pkg.pr.new/@nuxt/cli@1600
    

commit: f6f4714

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

CLI benchmark

@nuxt/cli v4.0.0 (baseline) vs v4.0.0 (this PR)

Metric baseline v4.0.0 head v4.0.0 Delta
nuxt --version wall time (median) 66 ms 66 ms +0.1%
nuxt --help wall time (median) 143 ms 144 ms +0.5%
nuxt dev --help wall time (median) 110 ms 108 ms -2.4%
nuxt --version modules loaded 35 35 0.0%
nuxt --version built-ins loaded 27 27 0.0%
nuxt --help modules loaded 135 135 0.0%
nuxt --help built-ins loaded 87 87 0.0%
nuxt dev --help modules loaded 64 64 0.0%
nuxt dev --help built-ins loaded 87 87 0.0%
Installed node_modules 2.46 MB 2.46 MB +0.0%
Published tarball (packed) 240.2 kB 240.3 kB +0.1%
Full report

@nuxt/cli v4.0.0 (baseline) vs v4.0.0 (head)

Setting Value
Baseline ref:c3abf230966a9063ccde0a3024e0508bcaf75bb4 (v4.0.0)
Head local packages/nuxt-cli at c1a3646 (v4.0.0)
Node v24.21.0
OS Linux 6.17.0 (kernel 6.17.0-1022-azure)
CPU AMD EPYC 7763 64-Core Processor x 4
Memory 15.6 GB
Load average at start 1.01, 0.32, 0.11
Run started 2026-10-06T12:30:02.087Z

Cold CLI startup

Median of 15 interleaved runs per command, one warmup discarded.

Command baseline v4.0.0 median head v4.0.0 median Delta baseline v4.0.0 min / p95 head v4.0.0 min / p95
nuxt --version 66 ms 66 ms +0.1% 65 ms / 71 ms 65 ms / 70 ms
nuxt --version (first output byte) 62 ms 62 ms -0.0% 60 ms / 67 ms 60 ms / 65 ms
nuxt --help 143 ms 144 ms +0.5% 140 ms / 149 ms 136 ms / 149 ms
nuxt --help (first output byte) 137 ms 138 ms +0.4% 134 ms / 144 ms 131 ms / 143 ms
nuxt dev --help 110 ms 108 ms -2.4% 101 ms / 114 ms 101 ms / 111 ms
nuxt dev --help (first output byte) 105 ms 102 ms -2.6% 96 ms / 108 ms 96 ms / 106 ms
nuxt <unknown-command> (no-op) 153 ms 153 ms -0.5% 147 ms / 157 ms 151 ms / 163 ms
nuxt <unknown-command> (no-op) (first output byte) 147 ms 147 ms -0.3% 141 ms / 151 ms 145 ms / 157 ms

Module load cost

Counted with a module.registerHooks load hook, compile cache disabled. Counts every JS module actually evaluated on that code path (native addons excluded). Built-ins loaded after bootstrap are counted separately, including the internal modules they load.

Command baseline v4.0.0 modules head v4.0.0 modules Delta baseline v4.0.0 source bytes head v4.0.0 source bytes Delta baseline v4.0.0 built-ins head v4.0.0 built-ins Delta
nuxt --version 35 35 0.0% 297.8 kB 297.8 kB 0.0% 27 27 0.0%
nuxt --help 135 135 0.0% 847.1 kB 847.1 kB 0.0% 87 87 0.0%
nuxt dev --help 64 64 0.0% 455.3 kB 455.3 kB 0.0% 87 87 0.0%

Install footprint and published tarball

Each version installed on its own into an empty project with nothing but @nuxt/cli as a dependency, so the tree is exactly the CLI and its transitive dependencies. npm cache is warm and the registry is only consulted for metadata, so install wall time is indicative, not a network benchmark.

Metric baseline v4.0.0 head v4.0.0 Delta
Direct dependencies of @nuxt/cli 23 23 0.0%
Packages in the installed tree (unique name@version) 39 39 0.0%
Unique package names 39 39 0.0%
Package directories on disk (cross-check) 32 32 0.0%
Installed node_modules on disk 2.46 MB 2.46 MB +0.0%
Installed files 435 436 +0.2%
Install wall time (warm npm cache, median of 3) 1.34 s 1.33 s -0.6%
Published tarball (packed) 240.2 kB 240.3 kB +0.1%
Published tarball (unpacked) 780.0 kB 780.3 kB +0.0%
Files in tarball 100 101 +1.0%

Interleaved runs on a shared runner: trust the deltas, not the absolute timings. The dev, restart and build suites run locally via pnpm bench:cli.

@codspeed

codspeed Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing fix/stackblitz-log-channel (f6f4714) with main (eec52f0)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (c3abf23) during the generation of this report, so eec52f0 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2ab69370-a1da-4f53-986d-1258c2f00d70
📥 Commits

Reviewing files that changed from the base of the PR and between 7b7e52e and f6f4714.

📒 Files selected for processing (2)
  • packages/nuxt-cli/src/dev/broadcast.ts
  • packages/nuxt-cli/test/unit/broadcast.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The development error, log, and span channels now use a shared helper to open broadcast channels and handle setup failures. The nuxt add, create nuxt, and nuxt module add documentation now lists upm as a package-manager option. Captured Nuxt development output shows updated style hashes and version-transition banners.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to f6f47

No confirmed merge-blocking issue remains. The change can proceed with normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the change: dev channels are disabled when BroadcastChannel setup throws.
Description check ✅ Passed The description identifies the BroadcastChannel availability issue that this change addresses.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@danielroe
danielroe force-pushed the fix/stackblitz-log-channel branch from 7b7e52e to a87143f Compare October 6, 2026 12:08
@danielroe
danielroe force-pushed the fix/stackblitz-log-channel branch from 3b4ddce to f6f4714 Compare October 6, 2026 12:21
@danielroe danielroe changed the title fix(dev): disable dev channels when BroadcastChannel is unavailable fix(dev): disable dev channels when BroadcastChannel throws Oct 6, 2026
@danielroe
danielroe added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit 8a7195c Oct 6, 2026
25 checks passed
@danielroe
danielroe deleted the fix/stackblitz-log-channel branch October 6, 2026 12:46
@github-actions github-actions Bot mentioned this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant