Skip to content

Fix composer send and stop icon centering across display scales - #10407

Merged
shimmyshimmer merged 2 commits into
mainfrom
studio-composer-icon-centering
Sep 7, 2026
Merged

shimmyshimmer merged 2 commits into
mainfrom
studio-composer-icon-centering

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

The composer send arrow and stop square used fixed left offsets intended for Retina displays. Those offsets pushed the icons off-center at other display scales. Remove both offsets, retain flex centering, and remove the unused stop-icon class from all six call sites.

Add browser measurements of the SVG box and drawn glyph against the button center. Each engine covers 216 configurations across display scaling, page zoom, UI font size, themes, and text directions. The checks reuse existing CI jobs: Chromium on Linux, Chromium and Firefox on Windows, and Chromium and WebKit on macOS.

Validation:

  • All 3,888 local icon measurements passed across Chromium, Firefox, and WebKit, with maximum deviation below 0.009 CSS pixels.
  • Frontend typecheck, production build, and all three alignment unit tests passed.
  • All 193 selected workflow tests passed. ESLint and Ruff passed. Workflow validation found no new actionlint issues.
  • Native OS CI results are pending.

@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-07T00:54:59.861782Z 982c6a0 Manual request
ℹ️ 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.

Both composer action glyphs carried a hand-tuned sub-pixel translate: the
send arrow -0.25px and the stop square -0.5px. A translate is a CSS length,
so its device-pixel value follows the display scale, and it only leaves the
raster symmetric when the glyph's ink center lands on a pixel center or a
pixel boundary.

The arrow's ink center sat at 17.75 CSS px in a 36px action. At DPR 2 that is
35.5 device px, a pixel center, so it looked centered on Retina. At DPR 1 it
is a quarter pixel off every symmetry point and the arrowhead's left tip took
2.9x the ink of its right tip, which reads as the arrow sitting a pixel to
the left. At 1.5 it was 9.7x. The stop square's -0.5px happened to survive
DPR 1 and 2 and broke at 1.25 and 1.5, up to 3.2x.

Drop both translates. Each glyph is then flex-centered in its action with
equal gutters, so a reflection about the action's center maps it onto itself
at every ratio, and glyph and circle share one sub-pixel offset. Edge ink
ratio at 1, 1.25, 1.5 and 2 is now 0.99x to 1.03x for both, against 2.9x to
9.7x for the arrow and up to 3.2x for the square before.

aui-composer-cancel-icon had no other rule, so it goes with the translate.
@shimmyshimmer
shimmyshimmer force-pushed the studio-composer-icon-centering branch from f3caea4 to 1ee5f8c Compare September 7, 2026 00:15
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment was marked as resolved.

@shimmyshimmer shimmyshimmer changed the title Studio: center the composer send and stop glyphs at every DPR Fix composer send and stop icon centering across display scales Sep 7, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 982c6a0cdf

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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