Skip to content

Fix visual regression false positives due to UUID truncation race - #3407

Merged
david-crespo merged 1 commit into
mainfrom
truncate-remeasure-on-font-load
Oct 10, 2026
Merged

david-crespo merged 1 commit into
mainfrom
truncate-remeasure-on-font-load

Conversation

@david-crespo

@david-crespo david-crespo commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Canvas measureText uses fallback font metrics until the web font loads, and the font swap doesn't necessarily resize the container, so the truncation stayed computed against the fallback font. This made truncated UUIDs nondeterministic, which showed up as false positives in the visual regression suite.

Canvas measureText uses fallback font metrics until the web font loads,
and the font swap doesn't necessarily resize the container, so the
ResizeObserver never fired and the truncation stayed computed against
the fallback font. This made truncated UUIDs nondeterministic, which
showed up as false positives in the visual regression suite.
@vercel

vercel Bot commented Oct 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
console Ready Ready Preview Oct 10, 2026 4:40pm UTC

Request Review

@david-crespo david-crespo changed the title Remeasure middle truncation when web fonts finish loading Fix visual regression false positives due to UUID truncation race Oct 10, 2026
@david-crespo
david-crespo enabled auto-merge (squash) October 10, 2026 16:41
@david-crespo
david-crespo merged commit 16b3d16 into main Oct 10, 2026
7 checks passed
@david-crespo
david-crespo deleted the truncate-remeasure-on-font-load branch October 10, 2026 16:53

This branch was successfully deployed

1 active deployment
Preview — 624c2594 Deployed Oct 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant