fix(stage-ui): cancel animation frames and remove drag listeners on unmount - #2286
fix(stage-ui): cancel animation frames and remove drag listeners on unmount#2286bitxwolf wants to merge 7 commits into
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)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe components now clean up document listeners, cursor state, and pending animation frames when they unmount. ChangesLifecycle cleanup
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change adds unmount cleanup for animation frames and drag listeners in three stage UI components. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9b7b0e165
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
c9b7b0e to
72a0c98
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
⏳ Approval required for deploying to Cloudflare Workers (Preview) for stage-web.
Hey, maintainers, kindly take some time to review and approve this deployment when you are available. Thank you! 🙏 |
What
Fixes three memory leaks in
packages/stage-uiwhere event listeners andanimation frame loops were started in
onMountedbut never cleaned up whenthe component unmounts.
Why
Per AGENTS.md: "Vue composables that register event listeners or timers
without a corresponding cleanup in onUnmounted/onBeforeUnmount" are a bug.
Changes
cursor-momentum.vue— stores therequestAnimationFrameID and callscancelAnimationFrameinonUnmounted. The RAF loop previously ran foreverafter unmount, burning CPU on a detached component.
property-number.vue— callsstopDrag()inonUnmountedso thatmousemove/mouseupdocument listeners are removed if the componentunmounts during an active drag.
property-point.vue— same fix asproperty-number.vue.How to verify
Summary by CodeRabbit