Repository navigation
fix: defer hidden log measurements until reveal - #4702
Merged
Merged
Conversation
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
This was referenced Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andreading-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 checkpassed, including runtime tests and browser/Worker type checks. The kernel is rebuilt. A base/candidatecode-comparisonstartup 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