Skip to content

fix: identify focus ring rules from serialized selectors - #4413

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-4412
Oct 27, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-4412

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

The focus-ring reader used each matched selector's source text, so line breaks inside :has() made a painted tab ring fail its expected-rule assertion. It now reads Chromium's serialized selector list and selects the entries Chromium reports as matched. The existing CSS parser separates top-level selectors without splitting nested functions or quoted values; the pane specimen now expects the browser's quoted attribute serialization.

A focused browser regression fails before the change and passes afterward, covering multiline functional selectors, an unmatched list entry, nested commas, quoted whitespace and scope context. Three existing ring checks also pass, alongside Python compilation and Ruff checks. The paint-token, winning-declaration, sample and geometry assertions remain in place.

The isolated #pr-flow-tab specimen passes with the fix. The full sweep now passes that specimen and reaches a separate stale release-notes paragraph expectation: it expects .lf-mark-el although the visual overlay paints the ring. That same failure reproduces on unchanged main at 23e58acbd in an isolated specimen run and is tracked in #4414; the full sweep is therefore not green.

Closes #4412 — automated triage

Use Chromium’s serialized selector list rather than each selector’s source range, retaining only the entries matched by the browser. Split the list with tinycss2 so nested commas and quoted whitespace retain their meaning. Update the pane specimen to the browser’s quoted attribute form.

Closes #4412
@leaf-agent
leaf-agent merged commit 35e5f41 into main Oct 27, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4412 branch October 27, 2026 09:08
leaf-agent added a commit that referenced this pull request Oct 27, 2026
The focus-ring sweep now expects the rules that paint five specimens:
the release-notes paragraph’s projected mark, the thread card’s Resolve
icon, the floating response field, a contents link and a settled option.
Their stale selectors stopped the sweep despite painted rings belonging
to the focused samples. The ownership, paint-token, clipping and
coverage assertions remain unchanged; runtime and visual behavior are
unchanged.

The complete sweep passes in 382 seconds, including the corpus-wide Tab
walk and every named specimen. Isolated runs reproduce the stale
expectations before correction and pass afterward. The existing
projected-focus regression also passes, including its control that
removes the ring and requires the focus reading to reject it. Python
compilation and `git diff --check` pass.

The paragraph expectation became stale when #4294 moved focus paint onto
the projected mark. This branch includes main’s merged #4413
selector-serialization repair, which lets the sweep reach these stale
expectations.

Closes #4414 — automated triage

---------

Co-authored-by: leaf-agent <[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.

Focus ring sweep rejects a painted tab ring because of CSS whitespace

1 participant