Repository navigation
docs: fix two module guide snippets that do not work as written - #1116
Conversation
The dock handle example used ctx outside onDevtoolsReady, and the RPC example broadcast once from devtools:ready, which runs before any client is connected, so the message never arrived. Broadcast on a change instead.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe module guide updates two examples. The dock example registers an entry and updates its badge inside Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Merge Risk: 🔵 Low · up to The guide’s broadcast example works, but its comment may mislead readers about whether connected clients can receive notifications. The change is otherwise mergeable; correcting that documentation is a bounded follow-up. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Follow-up to CodeRabbit's review on #1108, which merged before it was addressed.
ctx.docks.register()outsideonDevtoolsReady, wherectxdoes not exist.onDevtoolsReady. That hook runs when the dev server starts, before any client has connected, so the broadcast went nowhere. It now broadcasts onbuilder:watch, which also shows the intended use: pushing changes to whoever is connected.Not changed: the review's third point asked to raise the stated Vite floor from 8.1.5 to
^8.3.2, on the grounds that@vitejs/devtools0.7.6 requires it. It peers onvite: *.vite-plugin-vue-devtoolsv9 does peer on^8.3.0, but on Vite 8.1.5 (Nuxt 4.5.1) the app boots, every dock registers including Vue DevTools, and the plugin prints no warning (checked in Chromium against thenuxt4playground pinned to 8.1.5). So^8.1.5stays accurate.Created with the help of an agent.