Skip to content

Give the definition-container header a whole-pixel min-height - #6078

Open
backspace wants to merge 1 commit into
mainfrom
percy-subpixel-header-height
Open

Give the definition-container header a whole-pixel min-height#6078
backspace wants to merge 1 commit into
mainfrom
percy-subpixel-header-height

Conversation

@backspace

@backspace backspace commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

This is meant to address this pattern of Percy diffs, which only shows in Firefox, a tiny shift in the sidebare:

s 2026-09-10 at 15 55 04@2x

Claude: --boxel-header-min-height: 1.56rem is 24.96px at the default root size. A fractional height leaves each engine to round it however it likes, so the same content can land a pixel apart between browsers, and everything below the header shifts with it.

The value reads as a conversion that lost precision: 25 ÷ 16 is 1.5625, and 1.56 is that rounded to two places. 1.5625rem is 25px exactly. The surrounding declarations already sit on whole pixels — the button min-height two rules down is 1.5rem, a clean 24px.

Why this is worth changing

An inspector-sidebar snapshot has been reporting a Firefox-only diff, one comparison out of 118, at a diff-ratio of 0.00091737 — stable to six figures across builds and across two unrelated branches. That is the signature of a single region shifting by a fixed amount, not of anything either branch changed, and not of random rounding noise.

A fractional header height in that sidebar accounts for it. Of every rem value in the host component tree, only six fail to land on a whole pixel, and this is the one inside the affected component.

This is a candidate, not a confirmed cause

I have not seen the rendered images, so the mechanism is inferred from the value and the diff's shape rather than observed. The test is whether the recurring diff stops. If it does not, the next thing to look at is what else in that sidebar computes to a fraction.

Expect a small one-time diff from this change itself: the header moves from 24.96px to 25px, so whichever engine was rounding down now agrees with the other.

The same declaration is duplicated in boxel-ui's header usage page. It is changed too, since that is where it would be copied from next.

`1.56rem` is 24.96px at the default root size. A fractional height leaves each
engine to round it however it likes, so the same content can land a pixel apart
between browsers — and everything below it shifts with the header.

The value reads as a conversion that lost precision: 25 / 16 is 1.5625, and
1.56 is that rounded to two places. `1.5625rem` is 25px exactly, which is what
the surrounding declarations use — the button min-height two rules down is
`1.5rem`, a whole 24px.

This is a candidate fix rather than a confirmed one. An inspector-sidebar
snapshot has been reporting a Firefox-only diff at a `diff-ratio` stable to six
figures across builds and across branches, which is the signature of one region
shifting by a fixed amount rather than of anything either branch changed. A
fractional header height in that sidebar explains it, and only six rem values
in the whole component tree fail to land on a whole pixel. Whether it is the
cause is answered by the diff either recurring or stopping.

The same declaration is duplicated in boxel-ui's header usage page, which is
where it would be copied from next.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 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-10T16:38:37.561340Z 2ef3ed4 PR opened
ℹ️ 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.

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files      1 suites   2h 40m 35s ⏱️
4 733 tests 4 719 ✅ 14 💤 0 ❌
4 748 runs  4 734 ✅ 14 💤 0 ❌

Results for commit 2ef3ed4.

Realm Server Test Results

    1 files    208 suites   1h 12m 47s ⏱️
2 721 tests 2 721 ✅ 0 💤 0 ❌
2 760 runs  2 760 ✅ 0 💤 0 ❌

Results for commit 2ef3ed4.

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