Skip to content

Read focus rings off a settled page, and leave the pixel reading what it can't colour - #4565

Merged
max-sixty merged 5 commits into
mainfrom
anchored-thread-box
Oct 28, 2026
Merged

max-sixty merged 5 commits into
mainfrom
anchored-thread-box

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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

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:

  • a ring faded with its box (two disabled controls at 0.55 opacity);
  • a ring in a scaled box (a film's terminal in an SVG foreignObject, whose 1.5px band blends with its ground);
  • an inline box split over lines, where each fragment wears its own ring.

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

  • Restoring the card message's own outline still fails "its top edge shows the ring at 0% of its 24 samples".
  • The sweep, test_rings.py (Chromium and Firefox), test_card_reply.py and the table ring test pass locally: 72 tests.

Closes #4432

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 5 commits October 27, 2026 23:00
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]>
@max-sixty
max-sixty merged commit 87d9321 into main Oct 28, 2026
3 of 4 checks passed
@max-sixty
max-sixty deleted the anchored-thread-box branch October 28, 2026 08:47
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]>
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.

Table link ring probe raises StopIteration for a missing pseudo-element

2 participants