fix(animations): restore candidate harness border in harness optimization loop - #14
Merged
Merged
Conversation
…tion loop mix() emitted rgb() but parsed only #rrggbb, so the one nested mix (the candidate harness border) produced rgb(NaN,NaN,NaN) and the browser dropped the border shorthand. toRgb() now parses both forms. Claude-Session: https://claude.ai/code/session_01GkomHYibdrRHz1rDLbJgSr
✅ Deploy Preview for nrwl-harnesstools ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Summary
The candidate harness box in
HarnessOptimizationLooprendered with no border in light mode.The animation's local
mix()helper returns anrgb(r, g, b)string, but its parser (hexRgb) only understood#rrggbb. The candidate harness border is the only value built from a nested mix (the accent blend wrapped in the settled-green blend), so the outer parse producedrgb(NaN, NaN, NaN)— invalid CSS, which makes the browser drop the entirebordershorthand. Every other box uses a single mix, which is why only that one lost its border.hexRgbis replaced bytoRgb, which parses both#rrggbbandrgb(...), so mixes compose. The mixing math is unchanged.Verified in Storybook (light and dark, mid-lap and settled frames): the harness border now matches the proposer box, and in the settled state it correctly blends to green along with the outer frame.
nx typecheck animationspasses.The sibling
FeedbackLoopanimation carries a copy of the same helper pair. It never nests mixes today so it is unaffected, but the same latent bug lives there.