Skip to content

test(mosaic): refresh visual baselines and remove network flakiness - #11091

Merged
alexcarpenter merged 5 commits into
mainfrom
carp/mosaic-visual-baselines
Dec 3, 2026
Merged

alexcarpenter merged 5 commits into
mainfrom
carp/mosaic-visual-baselines

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Description

The Mosaic Visual Tests job reported differences on every PR because the baselines were out of date. This PR refreshes them and makes them reliable, so the job's warning only appears when a PR really changes a screenshot.

  • Baselines refreshed for the current UI. The old ones predate recent Mosaic changes (role beside the name, primary-colored rows, Card.Actions, the corner close button, Badge spacing).
  • Only Linux baselines are committed. The -darwin copies were never compared in CI and drifted, so they're removed and git-ignored.
  • No network in screenshots. The Google provider icon loaded from img.clerk.com, and a slow response produced a 72 px diff on desktop light, as seen in some recent CI runs. Provider icons are now served from test/public/provider-icons/, other img.clerk.com requests fail, and the tests wait for images to decode before capturing.
  • The job stays advisory. A difference still shows as a warning, with the diff images uploaded as mosaic-visual-failure-artifacts-<run>-<attempt>. Making it fail on differences can follow once the baselines have proven stable.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other: test and CI tooling

@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Dec 3, 2026 4:48pm UTC
mosaic-docs Ready Ready Preview Dec 3, 2026 4:48pm UTC
swingset Ready Ready Preview Dec 3, 2026 4:48pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 351c6ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@11091

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@11091

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@11091

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@11091

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@11091

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@11091

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@11091

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@11091

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@11091

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@11091

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@11091

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@11091

@clerk/express

npm i https://pkg.pr.new/@clerk/express@11091

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@11091

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@11091

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@11091

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@11091

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@11091

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@11091

@clerk/react

npm i https://pkg.pr.new/@clerk/react@11091

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@11091

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@11091

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@11091

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@11091

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@11091

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@11091

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@11091

commit: 351c6ab

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Visual tests now wait for rendered profile images to decode and use local fixtures for Clerk static image requests. Other Clerk image requests return errors. The testing guidance describes image handling, platform-specific baselines, and visual-test CI outcomes. Ignore patterns exclude macOS and Windows screenshot PNGs. The changeset file adds empty YAML frontmatter delimiters.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: austincalvelage, ephem

Merge Risk: Minimal · up to 351c6 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title "test(mosaic): refresh visual baselines and remove network flakiness" matches the main change: refreshed visual-test baselines, Linux-only baselines, and provider icons served locally so scr…
Description check Passed The description states the problem (out-of-date baselines causing warnings on every PR) and the fix (refreshed baselines, Linux-only committed baselines, no network in screenshots, advisory job). Each…
Full details: Title check

Explanation

The title "test(mosaic): refresh visual baselines and remove network flakiness" matches the main change: refreshed visual-test baselines, Linux-only baselines, and provider icons served locally so screenshots make no network calls. It is specific and conventional, and it describes the primary change.

Full details: Description check

Explanation

The description states the problem (out-of-date baselines causing warnings on every PR) and the fix (refreshed baselines, Linux-only committed baselines, no network in screenshots, advisory job). Each point matches files in the changeset, including the .gitignore entry, testing docs, visual test helper, and vitest setup.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: This review skipped 6 repositories. Cross-repository analysis may be incomplete. Check linked repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between fbf554a and 351c6ab.

Files selected for processing: 1

  • packages/mosaic/docs/testing.md
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

@alexcarpenter alexcarpenter changed the title test(mosaic): refresh visual baselines and fail CI on screenshot differences test(mosaic): refresh visual baselines and remove network flakiness Dec 3, 2026
@alexcarpenter
alexcarpenter enabled auto-merge (squash) December 3, 2026 16:50
@alexcarpenter
alexcarpenter merged commit ecd4ec1 into main Dec 3, 2026
63 checks passed
@alexcarpenter
alexcarpenter deleted the carp/mosaic-visual-baselines branch December 3, 2026 16:56

This branch was successfully deployed

2 active deployments
Preview – swingset — 351c6ab3 Deployed Dec 3, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 351c6ab3 Deployed Dec 3, 2026 by vercel[bot]
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.

2 participants