Repository navigation
Description
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:
lf-askrings 5px outsidehtmlin data-explorer, notification-playground and shadow-scale (Eighteen nightly journey cases fail on main since before Nov 5, not yet bisected #5657).- Bottom-edge faults on code-comparison's and motion-playground's
lf-ask, already present at391c24622.
Cause of a failure tracked in #4225.
Activity
leaf-agent commentedon Nov 11, 2026
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
a52abb1bbwith 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%.391c24622)ec2799b1d)a52abb1bb)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:reachingNow). Before it, the mark had no keys, its label read as said by the option's words, and focus previewed nothing. After it, the mark previewed its fullaria-labeland a1chip. That chip repeats the digit the command hints already draw on the option.beyondFacedrops "a press whose key chips the face shows", butfaceOfcounts onlykbd.lf-key-badgetext inside the control. The option's digit is a lentspan.lf-key-badgebeside the mark (lf-options.js,#keys), so the preview can't see it.{name: mark.textContent}("choose one"). This holds even while the digit is painted over the mark and the mark is atopacity: 0. So on main, a focused option previews "choose one 1".I tried the narrow repair: the command hints record the keys they draw on each control, and
controlFacecounts those as chips its face shows. That removes the1from 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 itsr. So I didn't open a PR for it.The decision. Each of these would clear the faults:
standthat covers every control whose ring is drawn on an ancestor.1chip comes back.running-tendargues 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.pythat runs_tab_walkon one example:serve(RING_EXAMPLE_FILES[name], comments=2),open_page,_tab_walk(page, name), and assert no faults. Thenuv run pytest tests/journeys/test_render_controls.py::test_tmp_repro --run-nightly -n0. For the screenshots, a variant Tabs to the first focusedlf-optionand reads the visible.lf-previewboxes:391c24622there is no preview.ec2799b1dthe preview is at572,475,892,531and says "choose one: Require three failed probes in a row — option 1 of 3" with a1chip.572,475,686,502and says "choose one" with a1chip.The focused mark's box is
571,445,589,463. Itsaria-keyshortcutsisArrowUp 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.
fix: stop the file tree writing scrolls that move nothing when it rev…