Stabilize login modal context during dev HMR#991
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesHMR-stable LoginModalContext
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Stabilizes the login modal React context object during browser development so Vite/Fast Refresh does not leave preserved consumers reading from a freshly-created context while the provider still belongs to the previous module instance.
Impact
This should stop the intermittent dev-only
useLoginModal must be used within a LoginModalProvidererror that disappears after a manual refresh. The provider misuse guard still remains for real missing-provider bugs.Validation
pnpm testpnpm run format && pnpm run testSummary by CodeRabbit