Pause offscreen homepage adapter motion - #1093
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 (1)
📝 WalkthroughWalkthrough
ChangesGraph animation controls
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | 45726e7 | Commit Preview URL Branch Preview URL |
Aug 02 2026, 03:03 PM |
What changed
Pause the homepage framework-adapter proof's timer and animation-frame loop unless the graph intersects the viewport and the visitor allows motion.
Evidence and impact
FrameworkAdapterGraph, added in #1075, mounted several sections below the fold but immediately started:The animation-frame loop therefore drove roughly 30 React renders per second from initial homepage load even when the proof had never entered the viewport. The active-adapter interval also continued offscreen and for reduced-motion visitors.
The graph now remains static until visible, stops both loops when it leaves the viewport, and keeps the existing animation unchanged while visible. Reduced-motion visitors get the same static proof without either state loop.
Validation
pnpm testgit diff --checkRisk
Low. This changes only when the decorative proof runs; its visible motion, geometry, and content are unchanged.
Summary by CodeRabbit
Accessibility
Performance