Repository navigation
perf: lazy-load global login and libraries overlays - #1229
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | e77cce7 | Commit Preview URL Branch Preview URL |
Sep 07 2026, 10:18 PM |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughChangesThe contexts now lazy-load the libraries overlay and login modal. Each component loads when its open function is called and renders through Lazy UI component loading
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The login modal and libraries overlay now load on first use, reducing initial client bundle size while preserving their open, close, and subsequent-open behavior. No merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
The global shell eagerly imported the login dialog and libraries overlay even when visitors never opened them. Load each through React.lazy on its first explicit open, with a local Suspense boundary. Keep it mounted after that first open so Radix can handle closing animations and subsequent opens.
Production build comparison using the same installed dependencies:
This moves 8,085 gzip bytes out of the entry's static import graph. Both overlays emit separate async chunks. These figures exclude route chunks and are not a whole-page transfer measurement; the first opening now waits for its async chunk.
Summary by CodeRabbit