Repository navigation
Read focus rings off a settled page, and leave the pixel reading what it can't colour - #4565
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]>
leaf-agent
approved these changes
Oct 28, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 28, 2026
`pageSettled` is what `page_at_rest` and 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 after `page_at_rest` returned. The ring was then read 32px away from where it was painted. #4565 worked around that one case with a `scroll_settled` call. `pageSettled` now also asks the runtime's own reading of scrolls in flight. That is `scrolling` in `browser/runtime/arrivals.js`, newly exported on the check API. A scroll counts as in flight until `scrollend`, 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_rest` returns, so the `scroll_settled` call from #4565 is removed. Checks run locally on current `main`: - the corpus ring sweep, `test_card_reply.py` and the render gate's `test_diagrams_preserve_late_state_labels_and_sequence_titles` pass (46 tests); - `pnpm run test:runtime` passes (692); - `pnpm run check:browser` passes. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude <[email protected]>
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.
One run of the daily corpus ring sweep (
test_each_sampled_focus_ring_is_shown_whole_in_its_surface) with #4556's screenshot reading found no ring a user sees broken. Before it got that far, it stopped on four faults in the tests. Three of them fail the next scheduled run.Faults in the readers and fixtures
_read_ring_boxes(Table link ring probe raises StopIteration for a missing pseudo-element #4432): the probe stashed the projected focus mark (.lf-visual-mark-focus), and the runtime replaced it before the CDP read, leaving a detached node with no::afterstyles. Instrumenting the read confirmed it:connected: false,pseudoElements: [].rings_drawnnow waits forrenderedbefore reading, and so does the Tab walk after each Tab. The per-test wait Draw a focused card message's ring over its sticky head, and read rings off the screenshot where hit testing sees nothing #4556 added to the table test is removed.open_panel_thread_holdingnever found one. It now unfolds them (show_resolved).test_rings.pyfixture widget: it still passedofferActiontheiconoption that Draw every symbol press from its action, so an action shows one symbol everywhere #4547 renamed toaction, so its page failed to load and four tests errored.]'s landing still scrolled the page smoothly.page_at_restdoesn't wait for that, becausemoving()counts only Web Animations, so this scope now waits withscroll_settled.The pixel reading's six findings, each whole on screen
The reading now leaves to the hit-test reading any ring whose colour it can't predict:
foreignObject, whose 1.5px band blends with its ground);It also skips 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.
Checks
test_rings.py(Chromium and Firefox),test_card_reply.pyand the table ring test pass locally: 72 tests.Closes #4432