Repository navigation
Wait out scrolls in flight before calling a page settled - #4575
Merged
Merged
Conversation
Next on me lands focus on the agent reply it reaches. In a margin card that message wore a ring of its own, drawn over its sticky head since #4556: a frame inside the card, the frame-in-a-frame the card's own rule records rejecting for the thread. The card now wears the ring for a focused message as it does for the focused thread, since the keys that message answers (r, Enter) act on its thread, and the message draws none. The card test now expects the ring on the card face. Firefox showed the old message ring cut at the transcript's end too, which the card ring avoids. Co-Authored-By: Claude <[email protected]>
… it can't colour A one-off run of the corpus ring sweep with #4556's pixel reading (`test_each_sampled_focus_ring_is_shown_whole_in_its_surface`) stopped on four faults in the readers before any ring defect. - macOS raised StopIteration in `_read_ring_boxes` (#4432): the probe stashed the projected focus mark, the runtime replaced it before the CDP read, and the detached node had no `::after` styles. `rings_drawn` now waits for `rendered` before reading, as does the Tab walk after each Tab, and the per-test wait #4556 added to the table test goes. - #4538 folds resolved threads under Threads' Resolved heading, so `open_panel_thread_holding` never found a resolved thread. It unfolds them (`show_resolved`). - `test_rings.py`'s fixture widget still passed `offerAction` the `icon` option #4547 renamed to `action`, so the page failed to load. - The landed diff line was read while `]`'s landing still scrolled the page smoothly, which `page_at_rest` doesn't wait on; that scope now waits with `scroll_settled`. The pixel reading then flagged six rings, all whole on screen. It now leaves to the hit-test reading a ring it can't expect in its known colour: one faded with its box (disabled controls at 0.55 opacity), one in a scaled box (a film's terminal in an SVG foreignObject), and an inline box split over lines. It also leaves out points where a button or link of the box's own stands in front, as a draft's toolbar seated on its top border does. Ring geometry now scales a scaled box's band and offset. Restoring the card message's own outline still fails with "its top edge shows the ring at 0% of its 24 samples". Closes #4432 Co-Authored-By: Claude <[email protected]>
`pageSettled`, which `page_at_rest` and the render gate wait on, counted only finite Web Animations. A landing's smooth scroll is none, so a reading taken after a key could land mid-glide: in the corpus ring sweep, `]` on a diff line left the page scrolling from 6602 to 6926 for about 250ms after `page_at_rest` returned, and the ring was read 32px from where it was painted. `pageSettled` now also asks the runtime's own reading of scrolls in flight (`scrolling` in arrivals.js, newly on the check API), which ends at `scrollend` or a settle after the last scroll frame. The probes take one reading as they load, so the runtime is listening before any input they wait out. With it, the sweep's landing has reached 6926 when `page_at_rest` returns, and the sweep's own `scroll_settled` for that scope goes. Co-Authored-By: Claude <[email protected]>
leaf-agent
approved these changes
Oct 28, 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.
pageSettledis whatpage_at_restand the render gate wait on. It counted only finite Web Animations, and a landing's smooth scroll is not one, so a reading taken after a key press could land mid-glide. In the corpus ring sweep, pressing]on a diff line left the page scrolling from 6602 to 6926 for about 250ms afterpage_at_restreturned. The ring was then read 32px away from where it was painted. #4565 worked around that one case with ascroll_settledcall.pageSettlednow also asks the runtime's own reading of scrolls in flight. That isscrollinginbrowser/runtime/arrivals.js, newly exported on the check API. A scroll counts as in flight untilscrollend, or until a settle after the last scroll frame. The probe module takes one reading as it loads, so the runtime is already listening before any input the probes wait out. The kernel is rebuilt for the new export.With this change, the sweep's landing has reached 6926 by the time
page_at_restreturns, so thescroll_settledcall from #4565 is removed.Checks run locally on current
main:test_card_reply.pyand the render gate'stest_diagrams_preserve_late_state_labels_and_sequence_titlespass (46 tests);pnpm run test:runtimepasses (692);pnpm run check:browserpasses.