Fix animation race condition for dynamic fillValue updates#144
Merged
jkhusanov merged 8 commits intoanimation-fixfrom Feb 23, 2026
Merged
Fix animation race condition for dynamic fillValue updates#144jkhusanov merged 8 commits intoanimation-fixfrom
jkhusanov merged 8 commits intoanimation-fixfrom
Conversation
Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com>
Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com>
Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com>
Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com>
Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com>
Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com>
Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update animation fix for dynamic fillValue based on feedback
Fix animation race condition for dynamic fillValue updates
Feb 18, 2026
jkhusanov
approved these changes
Feb 23, 2026
4 tasks
jkhusanov
added a commit
that referenced
this pull request
Feb 25, 2026
* Support dynamic fill value * Fix segments animation when going back * Fix animation race condition for dynamic fillValue updates (#144) * Initial plan * Fix animation race condition by cancelling in-flight animations Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com> * Add test for animation cancellation during updates Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com> * Properly handle animation reference cleanup after cancellation Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com> * Improve animation cleanup logic to prevent race conditions Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com> * Refine animation cleanup to prevent race conditions Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com> * Address final code review feedback Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com> * Clear animation reference in cleanup and improve test helper reusability Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jkhusanov <25942541+jkhusanov@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dynamic
fillValueupdates during an in-flight animation are dropped. The effect re-runs but exits early viaanimationRunning.current, and refs don't trigger rerenders when the animation completes.Changes
Core fix:
animationRunningref withcurrentAnimationref storing the animation object.stop()when new fillValue arrivesAnimation lifecycle:
currentAnimation.current === animation && finishedDependencies:
arcAnimatedValuefrom dependency array (stable across renders)lastFilledSegment.filledto trigger on value changes onlyTests:
stopmethod to animation objects💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.