test(visual): improve screenshot test-runner and regenerate baselines#49
Merged
FL-AntoineDurand merged 7 commits intomainfrom Feb 3, 2026
Merged
test(visual): improve screenshot test-runner and regenerate baselines#49FL-AntoineDurand merged 7 commits intomainfrom
FL-AntoineDurand merged 7 commits intomainfrom
Conversation
… system Replaces organically-accumulated CSS color tokens with a mathematically-derived palette using OKLCH perceptual color space. Introduces 3-layer architecture: primitives (76 tokens), semantic tokens (24), and domain tokens (~45) scoped to their owning packages. Removes Tailwind, adds stylelint enforcement. Also fixes pre-existing no-unused-expressions lint errors in staged files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… packages Adds jest-image-snapshot test-runner config to all 11 Storybook packages. Generates 90 reference screenshots across ui-base (40), ui-views (26), chats (5), jupyter (9), socials (4), whiteboard (3), user-containers (2), and tabs (1). Updates @swc/core to fix es2023 target compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Overhaul all 11 test-runner.js configs to fix flaky screenshots: - Replace waitForPageReady (networkidle) with custom wait (DOM+fonts+settle) - Block pravatar.cc requests in preVisit to prevent context destruction - Add Radix Dialog.Portal detection for portal-rendered components - Add bounding box check to fall back to full-page for clipped roots - Use absolute paths for snapshot directories - Fix dark-on-dark avatar (use surface token), palette filter, SVG imports - Add padding decorators for clipped components (liveSpace, wrapper, etc.) - Remove unused test-runner-visual.config.ts - Regenerate 155 screenshot baselines across 9 packages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…nflict The lockfile was regenerated during an earlier commit which lost npm's peer dependency resolution metadata, causing stylelint-config-standard-scss to fail resolving against stylelint@17 in CI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
npm ci now fails on GitHub Actions due to stricter peer dependency resolution for stylelint-config-standard-scss@14 (requires stylelint ^16) vs stylelint@17. This was previously resolved silently but recent npm behavior changes made it a hard error. legacy-peer-deps restores the previous behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… job build-storybook needs @holistix-forge/ui-base/style and other library exports to be built first. The validate job builds them but runs on a separate runner. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When screenshot tests detect differences: - Collects list of failed packages and changed screenshot files - Uploads __diff_output__ artifacts (was only on failure, now on diff) - Posts/updates a PR comment listing affected packages and files - Links to the artifact download for reviewing diffs - Includes instructions for updating baselines The job still passes (non-blocking) but gives visibility into visual changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📸 Visual Regression DetectedThe following packages have screenshot differences:
Changed screenshotsDownload visual-diffs artifact to review the differences. If these changes are intentional, update the baselines locally: npx nx run <package>:test-storybook -- -u |
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
.storybook/test-runner.jsconfigs for robust visual regression testing:waitUntilReady()replaceswaitForPageReady()(avoidsnetworkidletimeout on external resources)preVisithook blockspravatar.ccrequests that caused flaky context destructionDialog.Portaldetection — screenshots dialog content rendered outside#storybook-rootusers.tsx), palette filter (palette.stories.tsx), SVG imports (background.stories.tsx)liveSpace,wrapper,resource-selection,reduced-cellstoriestest-runner-visual.config.tsTest plan
nx run ui-base:lint,ui-views:lint,jupyter:lint)nx run ui-base:typecheck)npx @storybook/test-runnerper package🤖 Generated with Claude Code