Repository navigation
fix: decide a margin card's scrollbar gutter in its fit, outside the transcript's size delivery - #5934
Merged
Conversation
…transcript's size delivery A card transcript whose turns overflow holds a `scrollbar-gutter` (`data-lf-overflows`), which narrows its content box. Only the reach pass's paint decided it (`paintContinuation`), and that paint runs inside reach's ResizeObserver delivery for the transcript. Marking the gutter there resized a box the delivery had already reported, so Chromium reported "ResizeObserver loop completed with undelivered notifications". Before #5811 the card's fit scrolled a reader at the end to the new end, and that scroll ran the same paint in the placement's script, before the frame's layout. #5811 moved end-following into `followEnd`'s size delivery, so the decision waited for reach's delivery. The gutter decision is now one function the card's fit calls after it changes the card's room (`measureThreadCard`), in the script before the frame's layout, and the paint still calls it for overflow no fit answers. What the gutter is and when it changes are unchanged. `test_a_second_margin_reply_grows_below_the_first_line` errored at teardown with the loop on main and passes three of three runs after. Closes #5933
This was referenced Nov 14, 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.
A margin card's transcript holds a scrollbar gutter once its turns overflow (
data-lf-overflows→scrollbar-gutter: stable,annotation-chrome.css), which narrows its content box. Only the reach pass's paint decided that gutter (paintContinuationinthread-preview.js). That paint runs inside reach's own ResizeObserver delivery for the transcript, so marking the gutter resized a box the delivery had just reported, and Chromium raisedResizeObserver loop completed with undelivered notifications. The nightly journeytest_a_second_margin_reply_grows_below_the_first_linehit this at teardown.Before #5811, the card's fit scrolled a reader at the end to the new end, and that scroll ran the same paint in the placement's script, before the frame's layout. #5811 (intended: one keeper,
followEnd, for a reader at the transcript's end) removed that scroll, so the decision waited for reach's delivery. This PR keeps #5811's design. The gutter decision is now one function, and the card's fit (measureThreadCard) calls it right after changing the card's room, before the frame's layout. The paint still calls it for overflow that no fit answers. What the gutter is and when it changes are unchanged.Verification
415cf1d6fand passes three of three runs with the change.-k "scrollbar or follows_its_last_turn or new_reply_once_its_picture or grows_below or bounded or end or ride"overtests/browser/margin/test_card_reply.pyandtests/journeys/test_render_margin.py).pnpm run check:browserandpnpm run test:runtimepass.How the delivery was traced
I wrapped
ResizeObserverand added a documentMutationObserverin an init script. On main, in the frame that errors, the order is:max-heightdrops from 534px to 260px.reach.js:419) is delivered the transcript at 413px wide.data-lf-overflowsis set during that delivery.At #5811's parent, the same trace shows
data-lf-overflowsset right after themax-heightwrite, before any delivery in that frame.One path is left. If the gutter's answer changes when a turn grows inside a card already at its cap, with no new fit, the decision still lands in a size delivery. That path predates #5811, and nothing currently reports it.
Closes #5933 — automated triage