FE-1500: fix StrictMode playback disposal - #9397
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryLow Risk Overview A short comment documents that rAF and store subscriptions are torn down by their own effects, so the provider should not dispose the core playback handle on unmount replay. A new regression test wraps the provider in Reviewed by Cursor Bugbot for commit 5f3fdbb. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0171fa1. Configure here.
0171fa1 to
0c6001f
Compare
0c6001f to
5f3fdbb
Compare

🌟 What is the purpose of this PR?
Simulation playback stalled in development builds:
PlaybackProviderdisposed its playback state machine in auseEffectcleanup, and React Strict Mode's setup, cleanup, setup replay left the handle permanently disposed, soplay()and rAF ticks became no-ops while frames kept arriving. This removes the disposal effect.🔗 Related links
🔍 What does this change?
PlaybackProvider. Playback owns only in-memory state; its rAF loop and store subscriptions are cleaned up by their own effects. A comment at the site records why no disposal happens there.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🛡 What tests cover this?
react/playback/provider.test.tsxcase "advances arriving frames when StrictMode replays mount effects".PlaybackProvidersuite.❓ How to test this?
yarn workspace @apps/petrinaut-website dev(the site mounts underStrictMode).