Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe scene initialization hook now waits for one microtask before SDK startup. It skips initialization when Strict Mode cleanup invalidates the effect. Tests cover single initialization, scene retention, and pending rerender behavior. ChangesScene initialization
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change defers scene initialization to avoid starting discarded Strict Mode effects and adds regression coverage; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. 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 |
Summary
addScene()startsWhy
In a Next.js App Router application, navigating client-side to a route containing a scene could trigger this SDK error:
The first Strict Mode effect started
addScene()synchronously. React then cleaned up that discarded effect and the wrapper destroyed the scene, while asynchronous SDK initialization callbacks were still running. Those callbacks later accessed the destroyed scene's nullcurtain.Yielding one microtask before touching the SDK lets the Strict Mode cleanup set
ignore, preventing the discarded effect from starting a scene at all.Checks
npm test— 124 passednpm run lintnpm run type-checknpm run buildSummary by CodeRabbit