Skip to content

Studio: unbreak the frontend suite and the icon alignment check - #10413

Merged
danielhanchen merged 2 commits into
mainfrom
fix-composer-icons-crypto-boot
Sep 7, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
fix-composer-icons-crypto-boot

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

Frontend CI has been red on main since #10407 landed (runs 34071451180 and 34074738138, both jobs failing). Two independent breaks from that PR, the first of which was masking the second.

1. The smoke page has no crypto polyfill. smoke-composer-icons.html is the one HTML entry without the /crypto-boot.js tag, and tests/crypto-uuid-boot.test.ts enumerates *.html rather than a fixed list:

every page loads the polyfill before its module entry
  AssertionError: smoke-composer-icons.html must load /crypto-boot.js

Reproduced on a clean checkout of main. One tag, where the other entries put it. npm test goes 6933 pass / 1 fail to 6934 pass / 0 fail.

2. The alignment check measures the glyph centre wrongly on firefox. Only visible once the first fix lets the job reach that step. It reports chat-send 1.38px out on an icon whose svg box it measures as perfectly centred, at every zoom except 1, on Linux as well as Windows:

"svgDx": 0, "svgDy": -7.6e-06, "glyphDx": 1.379167, "glyphDy": 1.379163

The icons are fine; the measurement is not. Firefox leaves CSS zoom out of getScreenCTM() while getBoundingClientRect() applies it, so at zoom: 0.8 the CTM scale comes back as 0.5747 where the rendered box gives 0.4597 (chromium reports 0.4596 for the same icon), and the mapped centre lands 1/zoom out. Mapping with the correct scale puts the glyph centre at 44.9997 against a button centre of 45.0.

Scaling from the rendered box and the viewBox needs no CTM and is engine independent. 216 configurations on each of chromium, firefox and webkit now pass, 3888 icons.

The check still bites, which I verified rather than assumed: injecting a 2px glyph shift inside an unmoved svg box is caught on both engines at 0.91px against the 0.02px tolerance.

Opened while reviewing #10262, whose only red check is this one.

smoke-composer-icons.html was added without the /crypto-boot.js tag every other
HTML entry carries, and tests/crypto-uuid-boot.test.ts enumerates the entries
rather than a list, so main's own frontend suite has been one test red since it
landed. That failure surfaces on every open frontend PR.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-07T03:48:57.483439Z 85bf919 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The composer icon alignment check fails on firefox at every zoom other than 1, on
Linux as well as Windows, reporting a glyph centre 1.38px out on an icon whose svg
box it measures as perfectly centred.

The icons are fine; the measurement is not. Firefox leaves CSS zoom out of
getScreenCTM() while getBoundingClientRect() applies it, so at zoom 0.8 the CTM
scale comes back as 0.5747 where the rendered box gives 0.4597, and the mapped
glyph centre lands 1/zoom out. Chromium reports 0.4596 for the same icon.

Scale from the rendered box and the viewBox instead, which needs no CTM. 216
configurations on each of chromium, firefox and webkit now pass, 3888 icons. The
check still bites: injecting a 2px glyph shift inside an unmoved svg box is caught
on both engines, at 0.91px against the 0.02px tolerance.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@danielhanchen danielhanchen changed the title Studio: load the crypto polyfill on the composer icon smoke page Studio: unbreak the frontend suite and the icon alignment check Sep 7, 2026
@danielhanchen
danielhanchen merged commit 5b283e5 into main Sep 7, 2026
35 of 39 checks passed
@danielhanchen
danielhanchen deleted the fix-composer-icons-crypto-boot branch September 7, 2026 06:27
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