fix(app,components): Fix unreliable MoveLabwareOnDeck
animation
#19179
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.
Overview
Fixes EXEC-1642 / RQA-4511? Maybe?
Test Plan and Hands on Testing
Manually play with the move-labware animations. One place where these animations happen is in manual move-labware commands, and the other place seems to be somewhere in error recovery—not sure exactly where.
Here's the protocol I used, though there's probably value in testing with more variety, if you have a different one handy.
Screen.Recording.2025-08-08.at.6.10.15.PM.mov
Changelog
Instead of passing in a straight object to
useSpring()
, pass in a callback and a dependency array. The idea is that maybe we were spamming react-spring with too many prop changes.And a completely unrelated thing. The animation has a few steps for animating the "splash" around the labware. For labware being moved to/from off-deck, this created a weird (in my opinion) pause where it looked like nothing was happening, because it was happening off-deck where you couldn't see it. So, now, conditionally skip those animation steps when we know they're not going to be visible.
I can delete the splash change if we don't think it's worth the complexity or if it looks weird.
Review requests
react-spring's rerendering and prop-updating semantics seem completely undocumented, so this is all guesswork on my part. Should we have to do this? Is this the real problem? The answers are unknowable and the questions will lead me to madness. I am at peace with these dreadful mysteries, and I hope that you feel the same way.
Risk assessment
🤷