Skip to content

test_each_sampled_focus_ring_is_shown_whole_in_its_surface: focused options' rings lose their right edge since #5638 #5832

Closed

Description

@leaf-agent

tests/journeys/test_render_controls.py::test_each_sampled_focus_ring_is_shown_whole_in_its_surface reports that keyboard-focused options draw their ring with the right edge unseen. This started at #5638 (ec2799b1d, "Previews say only the keys that reach a control and take Escape first wherever they show"). The fault reads:

tabbing through alert-review, the ring on lf-option "1choose one ..." is not all there: its right edge shows the ring at 83% of its 35 samples where nothing in front takes hits: paint hit testing can't see is over it, or it isn't painted (ring 316,440,596,583)

Where it shows. Every option in alert-review, heat-loss, ideas-to-implement, pr-walkthrough, release-notes, review-a-fix, review-a-plan and ship-review fails this way. So does command-hub's lf-ask "Which replica-only ledge" (right edge, 85%). Command-hub's three options are also new since 391c24622, though they fail on their bottom edge instead (89% of 164 samples). The bisect below didn't count them. The count has grown with every scheduled run since it appeared:

Scheduled run Checkout Faults in the run (Linux)
42365682113 391c24622 7, none of them this one
42473165114 f926f4fa7 15 (17 on macOS)
42604289041 28c3b37f3 29
42802603869 e6756ad43 31, on both Linux and macOS

The test fails the same way locally on main 25aeadf25 with --run-nightly -n0: 31 faults, 20 of them option rings with the right edge unseen.

Onset. git bisect run from 391c24622 (good) to f926f4fa7 (bad), counting option right-edge faults, names ec2799b1d (#5638) as the first bad commit. Four of those faults show there, against none at its parent 391c24622. The rest arrived after #5638, so later commits may have widened the same mechanism.

Diagnosis so far. "Nothing in front takes hits" means the ring's right edge is missing from the screenshot while hit testing finds nothing over it. Either something that doesn't take hits is painted over the edge, or the edge isn't painted. #5638 changed which preview shows when a control takes focus and what that preview says. A preview standing beside a focused option, painted over the ring without taking hits, would produce this reading. That is a hypothesis to check against a capture of one focused option at ec2799b1d and at its parent. If a preview does cover the ring, then Reading a red suite applies: whether a focus preview may stand over the ring it rides is a product question, and the ring sweep should not simply learn to ignore previews.

Separate faults in the same test. These are not part of this issue:

Cause of a failure tracked in #4225.

Activity

  1. added
    tend-ci-cause
    on Nov 11, 2026
  2. leaf-agent commented on Nov 11, 2026

    @leaf-agent
    CollaboratorAuthor

    Diagnosis complete. The fix is a product decision, so I'm assigning this to @max-sixty. The hypothesis in the issue holds. When Tab lands on an option, a focus preview now stands below the option's digit chip, across the right edge of the option's own ring and over the next option's title. The preview takes no hits, which is why the sweep reads "nothing in front takes hits". I reproduced it on main a52abb1bb with a tab walk of alert-review alone: three option faults, each at 83%. On the right edge, the preview's 27px height over the 143px option accounts for the missing 17%.

    Parent of #5638 (391c24622) #5638 (ec2799b1d) main (a52abb1bb)
    no preview full-label preview choose one preview

    Why it started, and why it still shows. The focused element is the option's pick mark (lf-option-control), the 18px box under the digit. Two changes each produce part of the preview:

    I tried the narrow repair: the command hints record the keys they draw on each control, and controlFace counts those as chips its face shows. That removes the 1 from the preview, but "choose one" still stands in the same place, and every option fault stays (alert-review, heat-loss, release-notes, command-hub). It would also change the preview of every control whose key a hint draws, such as Resolve, which #5746 deliberately keeps as "Resolve" over its r. So I didn't open a PR for it.

    The decision. Each of these would clear the faults:

    1. A focus preview stands clear of the ring that marks focus, not only the box it stands by. Here that is the whole option card, so the preview would stand above or below the card. This is a rule in stand that covers every control whose ring is drawn on an ancestor.
    2. The mark declares no preview while the digit covers it, so a focused option previews nothing, as before Previews say only the keys that reach a control and take Escape first wherever they show; the shift watch credits a preview riding its target #5638. This gives up Previews show only where the user aims, and say only what the target doesn't #5746's "choose one" over the digit, for pointer and focus alike. It also needs the hint-drawn digit counted as a face chip (the narrow repair above), or the 1 chip comes back.
    3. Previews may cover the ring they ride, and the sweep learns that. Reading a red suite in running-tend argues against choosing this without you.

    Once you choose, the repair can land under Fixing a CI failure's cause.

    Reproduction

    I appended a temporary test to tests/journeys/test_render_controls.py that runs _tab_walk on one example: serve(RING_EXAMPLE_FILES[name], comments=2), open_page, _tab_walk(page, name), and assert no faults. Then uv run pytest tests/journeys/test_render_controls.py::test_tmp_repro --run-nightly -n0. For the screenshots, a variant Tabs to the first focused lf-option and reads the visible .lf-preview boxes:

    • At 391c24622 there is no preview.
    • At ec2799b1d the preview is at 572,475,892,531 and says "choose one: Require three failed probes in a row — option 1 of 3" with a 1 chip.
    • On main it is at 572,475,686,502 and says "choose one" with a 1 chip.

    The focused mark's box is 571,445,589,463. Its aria-keyshortcuts is ArrowUp ArrowDown Home End Space 1.

    I haven't diagnosed command-hub's bottom-edge option faults (89% of 164 samples), which the bisect didn't count. They may be a separate cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

tend-ci-cause

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions