Skip to content

Skip hidden reading regions in user-view reports - #1989

Merged
leaf-agent merged 2 commits into
mainfrom
fix/ci-37596375818-hidden-logs
Oct 7, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/ci-37596375818-hidden-logs

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

User-view reports now skip reading regions inside concealed tabs and closed disclosures before measuring their geometry. A frame trace from the failed hidden-log test showed the optional report entering seenRect for each closed-tab log; its geometry walk forced getComputedStyle and clientHeight reads under hidden="until-found". The reading-region owner now applies its structural concealment rule and the geometry module's existing skipped reading, which also covers closed native <details>, while keeping those regions registered for when they open.

The hidden-log test failed in 8 of 18 repeated instrumented runs before this change and passed in 18 of 18 instrumented and 18 of 18 ordinary runs after it. The closed-disclosure regression and real-tab user-view test passed. All 232 runtime tests and pre-commit passed before the review addition; the PR's current head has passed its focused browser tests and is running the full CI suite.

Fixes #1987

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closed native <details> disclosures still send their reading regions into geometry. concealed checks only hidden and aria-hidden, while a closed <details> has neither; user-view then calls seenRect(body), which starts with getBoundingClientRect() in the skipped subtree. The existing geometry.skipped(body) reading recognizes closed disclosures without measuring them, so the sampling filter should use it before seenRect.

A passive user-view report measured every registered reading body, including bounded logs inside a closed tab. The geometry walk forced style and clientHeight reads under hidden="until-found". Share the structural concealment rule with reading-region ownership and filter those regions before user-view geometry. The failing hidden-log browser test reproduced in 8 of 18 instrumented runs before the fix and passed in 18 of 18 instrumented and 18 of 18 ordinary runs after it. The tab context test, pre-commit, and runtime tests passed. Fixes #1987.
A closed details element skips its contents without a hidden attribute. Keep its reading region registered, but exclude it from user-view geometry until the disclosure opens. The browser test now protects that transition.
@leaf-agent
leaf-agent force-pushed the fix/ci-37596375818-hidden-logs branch from 9efe990 to 35b3650 Compare October 7, 2026 12:10
@leaf-agent
leaf-agent merged commit d20af5e into main Oct 7, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/ci-37596375818-hidden-logs branch October 7, 2026 12:53
max-sixty added a commit that referenced this pull request Oct 7, 2026
On Linux CI, widening the visual review journey from phone width to 1366px
left the open comment field 700px below the window. The resize scrolled
the page, and continuity recorded the user's place from that scroll in the
same frame, after the review had rewrapped but before the size observer
announced the width shift. The field was off screen by then, so the record
held a text landmark instead of the editor, and the shift's restore
returned the page to that moved place. macOS Chrome sent no scroll during
the resize, so the stale editor record survived there.

`scrollersSettled` already refused a record while a region's scroller
handover was unannounced. It is now `regionsSettled`, and compares the
width the observer last saw as well, so the width shift announced since
d8dc7df gets the same protection. Regions hidden from layout are left
out of both readings: they show no words to move, a hidden region no
longer records a zero width that would announce a shift when it shows,
and measuring one in skipped content would lay out what it skips (#1989).

Reproduced in Ubuntu 24.04 with fonts-dejavu and Playwright's Chromium
headless shell: the journey failed with the field at y=1390 before this
change and passes after it. module-authoring.md now says a shift follows
a width change too.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.

ci-fix: hidden bounded logs are styled while their tab is closed

1 participant