Skip to content

fix(animations): restore candidate harness border in harness optimization loop - #14

Merged
juristr merged 1 commit into
mainfrom
harness-opt-animation-fix-df791820
Aug 2, 2026
Merged

fix(animations): restore candidate harness border in harness optimization loop#14
juristr merged 1 commit into
mainfrom
harness-opt-animation-fix-df791820

Conversation

@juristr

@juristr juristr commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

The candidate harness box in HarnessOptimizationLoop rendered with no border in light mode.

The animation's local mix() helper returns an rgb(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 produced rgb(NaN, NaN, NaN) — invalid CSS, which makes the browser drop the entire border shorthand. Every other box uses a single mix, which is why only that one lost its border.

hexRgb is replaced by toRgb, which parses both #rrggbb and rgb(...), 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 animations passes.

The sibling FeedbackLoop animation carries a copy of the same helper pair. It never nests mixes today so it is unaffected, but the same latent bug lives there.


Polygraph View session ↗

…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
@netlify

netlify Bot commented Aug 2, 2026

Copy link
Copy Markdown

Deploy Preview for nrwl-harnesstools ready!

Name Link
🔨 Latest commit 4fa3be6
🔍 Latest deploy log https://app.netlify.com/projects/nrwl-harnesstools/deploys/6a6fa8d6abf00f00087380cf
😎 Deploy Preview https://deploy-preview-14--nrwl-harnesstools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@juristr
juristr marked this pull request as ready for review August 2, 2026 20:44
@juristr juristr self-assigned this Aug 2, 2026
@juristr
juristr merged commit 8cf6752 into main Aug 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant