Skip to content

Read stills' styles as computed values, so an auto margin reads auto - #7464

Merged
max-sixty merged 2 commits into
mainfrom
stills-summary-card-capture
Nov 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
stills-summary-card-capture

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

leaf-dev stills still reported style changes on identical arms in 3 of 63 card and thread states (detached-thread, threads-returning, thread-picture): one arm read an auto margin as 0px and the other as 217px or 336px. getComputedStyle reports a margin's used length, which Chromium sometimes misreports as 0px while the box stays put; on one tab it flipped across a style walk or a ring reading. The style walk now reads computed values through computedStyleMap, the cascade's own value the stills header already asks for, so the margin reads auto. Firefox has no computedStyleMap and keeps getComputedStyle.

The walk costs the same (about 0.3 s on the feature gallery). The three states and summary-card read unchanged in 3 of 3 identical-arm runs, and a margin-left: 3% added to the card is still reported, as 0px -> 3%. A follow-up to #7456, which Max asked to have fixed before this session closed. dev/tests/model/test_stills.py passes.

This was written by Claude Code on behalf of max-sixty

`leaf-dev stills` reported style changes on identical arms in 3 of 63
card and thread states (detached-thread, threads-returning,
thread-picture): one arm read an auto margin, on `main` or a shot's
canvas, as 0px and the other as 217px or 336px. `getComputedStyle`
reports a margin's used length, and on one tab at detached-thread
Chromium went from 336px to 0px across a style walk or a ring reading
while the box stayed at 336px. #6798 moved the style walk before the
screenshot for the same symptom, which this reading makes unnecessary.

The walk now reads each property's computed value through
`computedStyleMap`, the cascade's own value the header already asks for,
so the margin reads `auto` throughout. Firefox has no `computedStyleMap`
and keeps `getComputedStyle`. The walk costs the same (0.29-0.31s vs
0.26s on the feature gallery), the three states plus summary-card read
unchanged in 3 of 3 runs on identical arms, and a `margin-left: 3%`
added to the card is still reported, as `0px -> 3%`.
@max-sixty
max-sixty merged commit 75f51af into main Nov 27, 2026
6 checks passed
@max-sixty
max-sixty deleted the stills-summary-card-capture branch November 27, 2026 23:44
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.

2 participants