Skip to content

fix: defer hidden log measurements until reveal - #4702

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-1987-hidden-readers
Oct 29, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-1987-hidden-readers

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Hidden bounded logs now grow without forcing their skipped subtree to be styled or measured. Scroll-layout tracking keeps observing hidden children but defers their measurements until reveal; hidden scroll events do not become reading choices, and reading-region classification leaves concealed bodies alone. Reopening History still puts both logs at their newest entries.

The existing hidden-log regression reproduced the CI run's 92 reads before the fix. Temporary stack capture identified scrolling.js's child observer and scroll-end listener, bounds.js's scroll listener, and reading-regions.js's scroll classification. The layout observer added in #3772 remains responsible for distinguishing native layout clamps from reader choices; its first visible reading refreshes the baseline after a hidden interval.

Validation: seven focused browser tests passed, including hidden-log growth/reopening, disclosure sampling, feed rebuilding, revision reading restoration, concealed landmarks, and both wheel/clamp variants. pnpm run check passed, including runtime tests and browser/Worker type checks. The kernel is rebuilt. A base/candidate code-comparison startup probe reached upgrade and server-state presentation with 40 requests on each arm, 247 additional code bytes, identical recorded startup shifts, and no console errors. The visibility checks prevent forced hidden layout and need to run before measurements.

Closes #1987 — automated triage

The hidden-log regression reproduced 92 layout and style reads. Stack capture identified scroll-layout child observation, hidden scroll event handlers, and reading-region classification. Apply the shared skipped-content reading before measuring, keep resize observation alive, and refresh its baseline when a box is revealed. Native layout clamps still do not count as reader choices.

Closes #1987
@leaf-agent
leaf-agent merged commit eb178a2 into main Oct 29, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-1987-hidden-readers branch October 29, 2026 13:25
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