Repository navigation
test(ui-kit): lay out design-font probes before the CDP glyph query - #2462
Merged
Merged
Conversation
schlessera
force-pushed
the
fix/1599-design-font-layout
branch
2 times, most recently
from
October 21, 2026 06:38
ceba9d3 to
9ecd229
Compare
schlessera
marked this pull request as draft
October 21, 2026 06:39
schlessera
marked this pull request as ready for review
October 21, 2026 06:39
8 tasks done
CSS.getPlatformFontsForNode reads existing layout without forcing it, so probes inserted by verifyDesignFonts and queried before Chromium laid them out reported zero painted glyphs. Unchanged source failed 8/60 focused runs in the pinned image; with a synchronous layout read it failed 0/60. Closes #1599 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The three reviewed document declarations that pin design-font-checks.ts record its new hash. The helper only adds a synchronous layout read of its probe host; no sink, call, argument or producer changed. Refs #1599 Co-Authored-By: Claude Opus 5.5 <[email protected]>
schlessera
force-pushed
the
fix/1599-design-font-layout
branch
from
October 21, 2026 07:04
9ecd229 to
7602b85
Compare
schlessera
marked this pull request as draft
October 21, 2026 07:05
schlessera
marked this pull request as ready for review
October 21, 2026 07:05
5 of 6 tasks
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.
Closes #1599
What changed
verifyDesignFontsnow forces layout of its freshly inserted probe host before the firstdesignFontUsageCDP query.CSS.getPlatformFontsForNodereads existing layout and does not force it. Probes queried before Chromium laid them out reported zero painted glyphs, so the post-restore positive check in both design-font negative cases failed intermittently withnonempty DM Serif Text painted glyphs: expected 0 to be greater than 0.Why this shape
The acceptance criteria ask for the observed readiness boundary, not a delay, retry or relaxed assertion. The 2026-10-17 same-node control showed that one rendering frame turns
[[],[]]into the locked faces with 22–23 glyphs. A synchronous layout read (host.getBoundingClientRect()) is the smallest barrier that guarantees layout objects exist before the query. It changes no face, identity, glyph assertion or baseline.Proof
Tested head
7602b85eea6623a31a040f7bbc633d32cac38659on base8b5b1fdc706fcaf4734b8a811acdc8e53f33d890. The proof runs below were made at2eb68d242, the same change on baseaf0547c2d, before rebases overe2deae1f3,e1370575(#2463)b7f6360a8(#2467) and8b5b1fdc7(#2470), which touch no ui-kit, visual runner or lockfile input. Pinnedmcr.microsoft.com/playwright:v1.63.0-noble(sha256:eff16c30…), one fresh container per invocation, serial, idle 32-CPU host.468618cf1; font inputs byte-identical to this base)node scripts/visual.mjs --project=visual --filter=design-fonts.visualnode scripts/visual.mjs --project=visualFisher's exact test for 8/60 against 0/60 gives p ≈ 0.003.
Mutation receipts, each restored and rerun green:
painted.every(...)predicate replaced withtrueinrequirePaintedFont). The alias case fails withpromise resolved … instead of rejecting, and so does the absent-CSS case. Restored: 3/3 pass.style.media = "not all"commented out). The absent-CSS case fails withpromise resolved … instead of rejecting. Restored: 3/3 pass.bun run check:pr --base origin/main # passed at 7602b85eea6623a31a040f7bbc633d32cac38659; previously a7954d0e6086860edf1f2531061c73ce5582bcbd; 235 pass / 0 failcheck:prran inside a user-namespacebwrapthat binds every top-level directory except/mnt. This host carries leaked Docker Desktop bind mounts, and that environment brings its sandbox setup probe under the 250 ms guard (see testing.md's remediation and #2370).Producer pin refresh (second commit). The first CI run failed
unit (1)intests/bound-browser-documents.test.ts(8 cases:REVIEWED_*_DOCUMENT_BINDS,STALE_PIN_NAMED). Three reviewed document declarations inscripts/bound-browser-documents.ts(ghostTrace,diagramCapture,diagramRasterComparison) pindesign-font-checks.tsby SHA-256. Localcheck:pr's import-graph feedback missed this: the test reads the file from disk, a documented blind spot. The pins now record the new hash, with a#1599 re-auditnote on each declaration: the only change is a synchronous layout read, with no sink, call, argument or producer change.bound-browser-documents.test.tspasses 15/0 locally.Local
bun run test ./testson this branch: 1731 pass / 4 fail. The 4 failures aretests/native-diagram-inputs.test.ts(a frozen-source hash), and they fail identically on a control checkout without this change. They are local-environment-only and passed in hostedunitshards.Checklist
docs/reflect the change, or nothing documented moved.docs/decisions/provider-history.md): the provider-history guard passes, or nothing on a turn's path changed.Anything left open
ghost-sweep.visual.tsxcases withCannot read properties of null (reading 'useState'). Vite re-optimized the Storybook dependencies mid-run. That is unrelated to this change and filed as ui-kit: cold visual run re-optimizes Storybook dependencies mid-run and breaks ghost-sweep's React #2461. The design-font file passed in that run too.🤖 Generated with Claude Code