Skip to content

Carry Leaf's focus band and stated control height into the vendored controls - #884

Merged
max-sixty merged 3 commits into
mainfrom
fix/ci-35615354769
Sep 21, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix/ci-35615354769

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

ci on main went red at 725fca7 (#878): lint and test passed and the complete suite in nightly failed on seven cases. One of them, test_agent_status_leaves_the_margin_transcript_where_the_reader_scrolled_it, also fails at 9b17c79 and is #879's; #883 has since landed it. The remaining six are the Web Awesome rollout's, and they share one cause: the rollout moved four packages' controls into a vendor's shadow root, and the facts Leaf had stated about the native elements it replaced stayed on the hosts those elements used to be. #878's stated validation was 177 widget browser tests and the shipped runtime tests, and neither reaches the corpus ring floor or the published site.

What the reader sees

The band is the vendor's, not the layer's. theme.css keeps the ring's thickness in one token so there is one band on the page. A vendored control's ring is painted inside its own shadow root from --wa-focus-ring-*, which the Leaf theme did not map, so every vendored control wore a 3px ring next to Leaf's 2px one — and the diff filter field's own rule, .lf-diff-search:is(:focus-visible, …), stopped matching anything at all, because a wa-input host is neither the Tab stop nor the box that gets ringed. The vendor also transitions outline-color, so the band faded in over 75ms rather than appearing with the focus; theme.css states the opposite for the layer's own rules, and a transition in flight is reported as the value the property is leaving, so the band was invisible to any reading taken when it was drawn.

The shared theme now states the band — --wa-focus-ring-style, --wa-focus-ring-width: var(--here-ring-w) beside the --wa-color-focus mapping that was already there — draws and names it on the text field's own part, since --lf-here-ring does not inherit, and drops outline-color from the two vendored controls that transition it. That is one place for every package rather than a rule per host. The diff package loses its dead filter-field rule, and the duplicate .lf-diff-wrap:focus-visible #878 added beside the named one — the second latent failure, which the corpus floor reached only once the first was fixed.

The chrome above the evidence grew. lf-visual-review gives a focused review a laptop's height, and both rows of chrome above the evidence take their height from the tallest control in them. A vendored control sizes itself from the vendor's form-control height, eight pixels more than .lf-btn's box, so the queue row and the inspector row each grew by eight and the evidence stage lost sixteen — 366px to 350px, under the 360px the workspace states. The package states those controls' height again, as it did before #878 with .lf-vr-inspector-button { min-height: 30px }. Measured on the rebuilt page: both rows back to 30px and the evidence back to 366px.

What the tests were reading

test_site.py still read a wa-slider through to_have_value and drove a wa-select with select_option; both now use the shapes #878 established in test_render_widgets.py. The corpus ring specimen named the wa-input host, which is not in sequential keyboard navigation; it now names the field the reader actually stands on, and a second specimen keeps diff-tools exhibited for the controls that still wear it.

test_a_copy_speaks_reader_origin_after_live_map_is_removed is not a Web Awesome failure. It asserts the card move's optimistic paint and then closes the page — but the paint says nothing about the log, and the export opens its own page with only the log to replay from, so a send still in the wire is aborted by the close. That is the arrangement sending() exists for, under State races are arrangements, not probabilities in tests/CLAUDE.md; the gesture is now enclosed in it. Nothing says #878 introduced it: the two failing main runs before this one carry only the margin case, so this reads as a latent race that the run lost.

Two more the floor could not reach

The corpus ring floor raises inline on the first specimen it cannot stand on, so it reports one per run and fixing one uncovers the next. Behind the diff filter field, two had collected, and this branch takes both because main's nightly stays red on that case otherwise.

lf-shot upgrades to wa-comparison after presentation, and theme.css shows the native checkbox only while no comparison is mounted, so lf-shot > input.lf-shotflip — the control RING_CASES named — is display: none on every live page. The reader's stop is the comparison's own handle, which wears Leaf's band because the host maps --wa-focus-ring to it, and wears the shot name because #892's #paint() writes --lf-here-ring onto that shadow element inline — --lf-here-ring is registered inherits: false, so the host's own declaration does not reach it. The specimen moves there. That is #892's, and the same shape as the diff field: a vendored control took over and the reading stayed on the element it replaced.

The summary range's expand and refold controls draw the here ring and declare no --lf-here-ring, which chrome.css's own header forbids. That is #886's. They share one rule, so they take one name, summary-fold, and one specimen on the gallery's summarized thread.

The walk collecting its per-specimen failures the way test_every_base_corpus_tab_stop_has_a_visible_focus_indicator collects its own would have shown all three in one reading. That is a change against the test rather than against this one, and nothing here makes it harder.

Verification

All six cases pass here, and so do the nightly files they live in or that the theme change could reach: test_render_widgets.py, test_render_visual_review_journey.py, test_render_projection.py, test_render_controls.py, test_render_navigation.py, test_render_anchors.py, test_render_gate.py, test_site.py — 881 passed, beside two test_render_export.py cases that fail in this sandbox for a reason named below and fail identically without this change. pre-commit run --all-files is clean, npm run test:runtime is 28 passed, and the Web Awesome regeneration is scripts/vendor.py webawesome rather than a hand edit of the bundle. That reading was taken at 4bfc53f; with main merged in and the two cases above taken, tests/test_render_controls.py -k "ring or focus_indicator" is 21 passed and tests/test_render_conversations.py is 96 passed, both --run-nightly.

What this does not do

The height fix is the visual review's own, because that is the package whose layout contract broke and where the metric was stated before. The general question — whether the shared theme should state the vendored control's box, so any vendored control matches the Leaf button beside it — is left open: taking it here would move the playground, targeting and diff geometry that #878 reviewed, with no failing case to read the result against. Nothing in this change makes that harder to do later.

It does not settle what shot is declared by. RING_NAMES reads declarations off stylesheets, so that name's whole population entry stays lf-shot:has(> input.lf-shotflip:is(:focus-visible, .lf-focus-visible)) — a rule whose control is display: none wherever the comparison mounts — while the credit comes from the handle's inline property. The two halves the floor compares agree on a string rather than on a rule for that one name. Putting the declaration where the paint is, ::part(handle):focus-visible drawing and naming the band with the #paint() write dropped, is the repair; it is left out here because it answers for lf-shot the question this PR leaves open for the other vendored families, and the corpus floor reaches its end assertions either way.

The failing cases and where each was read

From the nightly job at 725fca74:

FAILED tests/test_site.py::test_the_published_notification_example_runs_its_authored_module@site
  AssertionError: Locator expected to have Value '2' / Error: Not an input element
FAILED tests/test_site.py::test_published_visual_evidence_loads_from_its_page@site
  Locator.select_option: Error: Element is not a <select> element
FAILED tests/test_render_controls.py::test_every_base_corpus_tab_stop_has_a_visible_focus_indicator
  keyboard stops with no visible indication: pr-walkthrough: input#input.control [outline none, shadow none]
FAILED tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
  .lf-diff-search in the page of pr-walkthrough is not in sequential keyboard navigation
FAILED tests/test_render_export.py::test_a_copy_speaks_reader_origin_after_live_map_is_removed
  Locator expected to have attribute '1' / Actual value: None
FAILED tests/test_render_projection.py::test_visual_review_gallery_gives_a_laptop_to_the_evidence
  assert 350.421875 >= 360
FAILED tests/test_render_margin.py::test_agent_status_leaves_the_margin_transcript_where_the_reader_scrolled_it
  assert {'working': [484, 980]} == {'working': [484, 959]}      # #879's, landed in #883

Five of the six reproduce here on main. The export case does not — it passed on three consecutive local runs — and was diagnosed from the arrangement rather than from a local red.

The band's own reading, taken on the focused diff filter field before the transition was removed: outline-width 2px and --lf-here-ring text-entry from the new rule, with outline-color still rgba(0, 0, 0, 0) because the vendor's outline-color transition had not run. That is what made the rule look inert and is why the transition is part of this change rather than a separate one.

Two cases in test_render_export.py fail in this sandbox — test_the_example_preview_command_exports_a_file_that_opens_on_its_own and test_exporting_an_example_leaves_the_live_preview_untouched — because a subprocess cannot launch Chrome here. Both fail identically at 9b17c79 with this change absent, and neither is in the hosted run's failure list. The everyday suite's five failures here are the same sandbox's AF_UNIX and umask limits, as #883 recorded.

Catalog previews are not affected: the resting appearance of a vendored control is unchanged everywhere except the visual review, which the catalog does not carry, and a still has nothing focused.

…ontrols

`ci` on `main` went red at 725fca7 (#878). `lint` and `test` passed; the
complete suite in `nightly` failed on seven cases. One was #879's and landed
in #883. The other six are the Web Awesome rollout's: it moved four packages'
controls into a vendor's shadow root, and the facts Leaf had stated about the
native elements it replaced did not move with them.

The shared Web Awesome theme now states the band's thickness and style, so a
vendored control wears Leaf's ring rather than the vendor's wider one, draws
and names that band on the text field's own part, and takes the transition off
the outline so the band appears with the focus instead of fading in behind it.
The diff package's filter-field focus rule and its duplicate wrap-switch rule
go, both dead. The visual review states its vendored controls' height again, so
the two rows of chrome above the evidence are as tall as the Leaf buttons
standing in them.

On the test side, the published site reads the slider and the case chooser the
way the widget suite already does, and the export copy waits for the card
move's own send before closing the page it was made on.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The band itself lands: measured at 10ece069 and at this head, the same focused wa-slider thumb goes from solid 3px to solid 2px in --accent, which is what --here-ring computes to. My selection is green here — tests/test_render_controls.py -k "ring or focus_indicator" (21 passed) and tests/test_render_projection.py -k visual_review (6 passed).

One concern about what it leaves, which is the same shape as the bug it fixes.

The band the vendor draws is now the layer's band, and eight control families wear it anonymously

Mapping --wa-focus-ring-width to --here-ring-w reaches every host in the :is(…) list, not just the three the new ::part(base) rule names. wa-slider, wa-switch, wa-radio, wa-select, wa-copy-button and wa-color-picker each draw outline: var(--wa-focus-ring) on focus inside their own shadow root, and with --wa-color-focus: var(--accent) already mapped, that now computes to exactly var(--here-ring-w) solid var(--accent) — the layer's band, painted by a rule that declares no --lf-here-ring.

That is the condition the floor's own assert not unnamed forbids: "the corpus paints a here ring on boxes no rule named, so no reading can say which rule drew it". It stays quiet today only because RING_CASES puts no specimen on a vendored control other than the diff filter field. The corpus page carries five wa-slider, thirteen wa-radio, seven wa-select, two wa-switch, three wa-copy-button and one wa-color-picker, so the first specimen that stands on any of them reads a ring the layer's declared population does not hold.

The three text-field families got a name because their band had to be redrawn on a part to exist at all; the other eight got the width token and nothing else. That difference is incidental rather than a decision, and it means the reading that caught this regression still cannot see most of the controls the rollout introduced.

Two directions, and which one is right is a call about what the population is supposed to mean, so I have not pushed either:

  • Redraw and name the band per family on the part each already exposes — part="thumb", part="control", part="combobox", part="swatch", part="trigger …" — which grows the declared population and so obliges a corpus specimen for each.
  • Or teach the population reading to credit the --wa-focus-ring mapping as one declaration, so a band the layer delegates to the vendor carries one name wherever the vendor draws it.
How this was measured

A scratch probe focused the slider on notification-playground and read the thumb's computed outline inside the shadow root, plus rings_drawn for the page, on both trees:

10ece069   thumb: solid 3px rgb(47, 84, 128)   --lf-here-ring: none
           rings_drawn here-rings: [ask]

this head  thumb: solid 2px rgb(47, 84, 128)   --lf-here-ring: none
           rings_drawn here-rings: [ask, (unnamed)]

--here-ring-w is 2px and --accent is light-dark(#2f5480, #8fb0d8) on both, so the head's second entry is the layer's band on a box no rule named. The vendored-control inventory above comes from walking every shadow root of each RING_EXAMPLES page; outside corpus, only pr-walkthrough carries any (two wa-input).

@leaf-agent

Copy link
Copy Markdown
Collaborator Author

These six recurred one commit later. ci on main at f3de402 (#881) failed nightly on the same set, identical failure text, and that commit only moves the Pierre diff bundle and its pin — so the cases are still this PR's and are still live on main.

Two readings from that run worth having here. test_render_margin.py::test_agent_status_leaves_the_margin_transcript_where_the_reader_scrolled_it still fails at f3de402, which is before #883 landed, so the run does not contradict this PR's note that #883 carries it; the next nightly to complete on a commit past 10ece06 is what settles that one. And test_render_export.py::test_a_copy_speaks_reader_origin_after_live_map_is_removed passed, which fits reading it as a latent race rather than #878's.

The seventh case in that run, test_ask_binding_badges_do_not_cover_their_key_line, is a separate cause — a stillness wait taken before the ask walk issued its travel — and is in #891. It touches no file here.

@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Five of these six recurred at the next commit, and they still pass with current main merged in. ci on main at 10ece069 (#883) passed lint and test and failed nightly on six cases: your two test_site.py cases, both test_render_controls.py cases and test_visual_review_gallery_gives_a_laptop_to_the_evidence — identical failure text, assert 350.421875 >= 360 again on the evidence stage — plus test_ask_binding_badges_do_not_cover_their_key_line, which is #891's. Between them the two open PRs account for the whole of main's current red nightly.

This branch merges 801ad61 cleanly, and on that merge all five cases pass here: the two test_render_controls.py cases and the projection case in one selection, and both test_site.py cases. So #887's theme.css edit and the rest of what landed since 588e021 do not disturb the fix.

The run also settles two of this PR's readings. test_agent_status_leaves_the_margin_transcript_where_the_reader_scrolled_it is gone, which is #883 landing it. And test_a_copy_speaks_reader_origin_after_live_map_is_removed passed here, as it did at f3de402 — two consecutive hosted runs green on it since the one that caught it, consistent with reading it as a latent race the 725fca7 run lost rather than something #878 introduced.

One thing worth checking before this merges

The new way test_published_visual_evidence_loads_from_its_page drives the case select — case_select.click() then review.locator('wa-option[value=…]').click() — timed out once here, on the second pass of the loop:

Locator.click: Timeout 30000ms exceeded.
  waiting for locator("#visual-review-run").locator("wa-option[value=\"keep-mobile-destinations\"]")
    - locator resolved to <wa-option … value="keep-mobile-destinations">2 of 3 · All mobile destinations remain reachable…
  attempting click action
    62 × waiting for element to be visible, enabled and stable
       - element is not visible

One occurrence in eleven local runs, and it was the coldest one — the first run in a fresh worktree, with the venv build and the site build competing for the machine. Ten subsequent runs pass, including three under six busy loops on four cores, so I could not make it reproduce on demand and cannot name the mechanism with confidence.

What the shape argues is that nothing between the two clicks states that the listbox is open. select_option carried that fact implicitly; a click pair does not, so the option click's own auto-wait is the only thing holding the ordering, and it fails closed at 30s rather than retrying the open. The suite already has the stated fact for this — test_render_projection.py reads the same control's to_have_js_property("open", False) — so expect(case_select).to_have_js_property("open", True) between the clicks would be the ordering rather than a longer timeout. The candidate mechanism I could not rule out is the widget's own repaint landing on the open listbox: orderChildren(this.#queue, options) re-appends every wa-option on a paint, and the first pass's selection schedules one. If that is it, the fact to wait on is the paint rather than the open, and it would be the widget's problem rather than the test's.

This is an observation on a case the hosted runner will re-run either way, not a blocker on the diff that fixes the six.

The six cases at 10ece06, and what was run here

From the nightly job's JUnit results in run 35626925859 at 10ece06 — 2831 tests, 6 failures, 3 skipped:

tests/test_site.py::test_the_published_notification_example_runs_its_authored_module@site
  AssertionError: Locator expected to have Value '2' / Actual value: None / Error: Not an input element
tests/test_site.py::test_published_visual_evidence_loads_from_its_page@site
  Locator.select_option: Error: Element is not a <select> element
tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
  .lf-diff-search in the page of pr-walkthrough is not in sequential keyboard navigation
tests/test_render_controls.py::test_every_base_corpus_tab_stop_has_a_visible_focus_indicator
  keyboard stops with no visible indication: pr-walkthrough: input#input.control [outline none, shadow none]
tests/test_render_projection.py::test_visual_review_gallery_gives_a_laptop_to_the_evidence
  assert 350.421875 >= 360
tests/test_render_widgets.py::test_ask_binding_badges_do_not_cover_their_key_line   # #891's
  Locator expected to have count '1' / Actual value: 2

Verified on 4bfc53f with 801ad61 merged in, --run-nightly -n0: the two test_render_controls.py cases and test_visual_review_gallery_gives_a_laptop_to_the_evidence together, 3 passed in 152s; test_the_published_notification_example_runs_its_authored_module passed; test_published_visual_evidence_loads_from_its_page is the 1-in-11 above.

main has since moved to 801ad61, and the nightly for 10d61b2 was still running when this was written.

# Conflicts:
#	skills/leaf/packages/default/vendor/webawesome.esm.js
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Merging this PR alone will not return main's nightly to green: it fixes five of six, and the sixth is a case main's current red hides.

ci on main at 10d61b21 (#887) failed nightly on exactly your five and nothing else — test_ask_binding_badges_do_not_cover_their_key_line passed there, as did the margin and export cases — so at that commit this PR was the whole of main's red. All five still reproduce with identical failure text at main's tip, 7925553, which I ran locally: #892 regenerated the vendored bundle and rewrote lf-shot, and it moved none of them.

The sixth case this branch reaches

On this head, e34a163, the two test_site.py cases, test_every_base_corpus_tab_stop_has_a_visible_focus_indicator and test_visual_review_gallery_gives_a_laptop_to_the_evidence all pass. test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus now fails one example further along, on the shot specimen in release-notes:

FAILED tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
  AssertionError: Locator expected to be focused
  Actual value: inactive
  - waiting for locator("lf-shot > input.lf-shotflip").first
    14 × locator resolved to <input type="checkbox" class="lf-shotflip lf-ui" …>

That is not this branch's. RING_CASES visits pr-walkthrough before release-notes, so on main the .lf-diff-search assertion this PR fixes raises before the loop ever reaches the shot specimen. Fixing the earlier case is what lets the floor arrive at the later one.

The cause is #892's, and it is the shape this PR is already about. lf-shot upgrades to wa-comparison after presentation, and theme.css shows the native checkbox only while no comparison is mounted — so once the upgrade lands, the control the floor names is display: none. Probed on the release-notes page at 7925553:

{'comparison': True, 'comparisonTag': 'WA-COMPARISON', 'display': 'none', 'tabIndex': 0, 'focusable': False}

tabIndex still reads 0 on a hidden checkbox, which is why the floor's tabIndex >= 0 assertion passes and to_be_focused is what catches it. The reader's own stop after the upgrade is the comparison's handle, which #paint() names with --lf-here-ring: shot inside the vendor's shadow root — so the specimen needs to move there, and what it should name is the question the standing review concern on this PR already asks: whether the floor can credit a band drawn by a vendor rule that declares no --lf-here-ring of its own. I have left it alone rather than answer that here.

What I ran

At 7925553, all five failing, -n 2:

tests/test_render_controls.py::test_every_base_corpus_tab_stop_has_a_visible_focus_indicator
tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
tests/test_render_projection.py::test_visual_review_gallery_gives_a_laptop_to_the_evidence
tests/test_site.py::test_the_published_notification_example_runs_its_authored_module
tests/test_site.py::test_published_visual_evidence_loads_from_its_page

The same five at e34a163: 4 passed, 1 failed as above. The probe is a throwaway test that serves release-notes through the ordinary fixture, waits past presentation, and reads the checkbox's computed style and focusability.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shot specimen can move now, and there is a third defect behind it. Both measured at this head, --run-nightly -n0.

The vendor does declare the name

The comment above leaves the specimen alone because crediting a band the vendor draws is the open question on this PR. For lf-shot it isn't open: theme.css sets --lf-here-ring: shot on .lf-shotcomparison itself, so the handle inside the shadow root computes the name without any rule of the vendor's declaring it. Probed on release-notes at e34a163b, before any change:

lf-shot .lf-shotcomparison [part~="handle"]
  tabIndex 0   outline rgb(47, 84, 128) solid 2px   --lf-here-ring shot
  :focus-visible true

That is a complete specimen — the reader's stop, Leaf's band, and a name — so pointing RING_CASES at it is the same move this PR already made for .lf-diff-search input, not a decision about the eight anonymous families. Making it turns the failure into the next one rather than into green.

Behind it, a band that names nothing

#886 added :is(.lf-summary-expand, .lf-summary-refold):is(:focus-visible, .lf-focus-visible) with outline: var(--here-ring) and no --lf-here-ring, which chrome.css's own header forbids — "Every rule that draws the ring names it in --lf-here-ring, in the same declaration". The floor says so only once the specimen ahead of it stops raising:

AssertionError: 1 rules draw the here ring and name none of them …
    :is(.lf-summary-expand, .lf-summary-refold):is(:focus-visible, .lf-focus-visible)

So the run order is: .lf-diff-search (this PR), then the shot specimen (#892), then this (#886). Three commits, three items, one visible per run.

What produced the sequence

The floor raises inline on the first specimen it cannot stand on, while unnamed, unseen and faults accumulate to the end. One run therefore names one stale specimen, and a branch can verify "the six pass" truthfully and have it stop being true on a base merge that touched none of its files. The sibling test_every_base_corpus_tab_stop_has_a_visible_focus_indicator collects its failures into a list and asserts once; this walk doing the same would have shown all three in one reading. Under it: each of #878, #886 and #892 landed green, because the complete suite runs on main after the merge rather than on the pull request that causes it. Both are changes against the gate rather than against this diff, and this diff leaves them exactly as easy to make.

The fix going up on this branch

  • RING_CASES names lf-shot .lf-shotcomparison [part~="handle"] for shot.
  • The summary rule declares --lf-here-ring: summary-fold, with a feature-gallery specimen on .lf-summary-expand for it.

With both, tests/test_render_controls.py -k "ring or focus_indicator" is 21 passed and tests/test_render_conversations.py is 96 passed, --run-nightly. Merging without them leaves main's nightly red on this case.

…eader does

The corpus ring floor visits one stale specimen per run: it raises inline on the
first control it cannot stand on while the unnamed, unseen and fault readings
accumulate to the end, so fixing one uncovers the next. Behind the diff filter
field this branch already moved, two more had collected.

`lf-shot` upgrades to `wa-comparison` after presentation and `theme.css` shows the
native checkbox only while no comparison is mounted, so the control the floor named
is `display: none` on every live page. The reader's stop is the comparison's own
handle, which already wears Leaf's band and the `shot` name the host declares, so
the specimen moves there — the same move this branch made for `.lf-diff-search`.

The summary range's expand and refold controls draw the here ring and name nothing,
which `chrome.css`'s own header forbids. They share one rule, so they take one name
and one specimen on the gallery's summarized thread.

`tests/test_render_controls.py -k "ring or focus_indicator"` is 21 passed and
`tests/test_render_conversations.py` is 96 passed, both `--run-nightly`.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both specimens land — tests/test_render_controls.py -k "ring or focus_indicator" is 21 passed on the merge ref, --run-nightly -n0, so the floor now reaches its end assertions and no further unnamed rule is waiting behind these.

One finding on the shot half, and it corrects what I told you on the last commit.

The handle's name comes from lf-shot.js, not from the rule the floor counts

--lf-here-ring is registered inherits: false (skills/leaf/assets/theme.css), so lf-shot .lf-shotcomparison { … --lf-here-ring: shot; } on the host does not reach the handle inside wa-comparison's shadow root. What the specimen reads there is an inline write — handle.style.setProperty("--lf-here-ring", "shot") in #paint(), on the element the vendor gives part="handle" and role="scrollbar".

RING_NAMES reads declarations off stylesheets, so the whole of shot's population entry stays lf-shot:has(> input.lf-shotflip:is(:focus-visible, .lf-focus-visible)) — the rule whose control is display: none wherever the comparison mounts, which is why the specimen had to move at all. After this commit the name is declared by a rule the corpus can never paint and credited by a box no stylesheet names. The floor's own comment says what that costs: "a name is worth nothing to the floor below until both agree it stands for one drawn ring". For shot the two halves now agree on a string rather than on a rule, so cutting the native rule's band in half leaves this case green.

The repair is to put the declaration where the paint is — lf-shot .lf-shotcomparison::part(handle):focus-visible { outline: var(--here-ring); --lf-here-ring: shot; }, with the #paint() write dropped. That is the move this branch already made for .lf-diff-search, and it would give shot a population entry a live page exercises.

I have not pushed it, because for lf-shot it answers the question the standing comment above puts to you for eight other vendored families: whether the floor should credit a band the vendor draws, or the layer should redraw and name it on each part. Settling that by precedent on the family with the least at stake is not mine to do. The red-nightly path this PR is for works either way; it just leaves shot inside that open question rather than outside it.

I have corrected the description, which under squash is main's commit message — it said the handle wears "the shot name its host declares" — and named what the change leaves for shot there.

What was measured

Both probes serve release-notes through the ordinary fixture and read past presentation, at this head with main merged in.

The handle's name, and where it comes from:

{'mounted': True, 'hostName': 'shot', 'dividerComputed': 'none',
 'handleComputed': 'shot', 'handleInline': 'shot',
 'handleInlineRemovedComputed': 'none', 'flip': 'none'}

dividerComputed is the control: a sibling part inside the same shadow root reads none while the host reads shot, which is inherits: false doing its job. Removing the inline property takes the handle to none with it. flip is the native checkbox's display.

The declared side, RING_NAMES evaluated on the same page:

{'name': 'shot', 'said': ['lf-shot:has(> input.lf-shotflip:is(:focus-visible, .lf-focus-visible))']}

Selection: tests/test_render_controls.py -k "ring or focus_indicator" --run-nightly -n0 — 21 passed in 272s.

@max-sixty
max-sixty merged commit 95d8508 into main Sep 21, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix/ci-35615354769 branch September 21, 2026 23:12
max-sixty pushed a commit that referenced this pull request Sep 21, 2026
`ci` on `main` went red at f3de402 (#881): [`lint` and `test` passed and
the complete suite in `nightly` failed on seven
cases](https://github.com/max-sixty/leaf/actions/runs/35616173899). Six
are #884's, unchanged from [the run before
it](https://github.com/max-sixty/leaf/actions/runs/35615354769) and
still open there. The seventh is this one, and it is not #881's: that
commit moves the Pierre diff bundle and its pin, and the binding-badge
fixture draws no diff.

`test_ask_binding_badges_do_not_cover_their_key_line` failed with the
shape #876 repaired — the badge the test scrolls one pixel into the
shortcut bar's band still worn, count 2 rather than 1, stable across all
fourteen polls.

## What the wait could not see

Stillness is half a reading. A page that has not begun an effect is
indistinguishable from one that finished it when the only evidence is
the scroll number holding still, which `tests/CLAUDE.md` already states
under **A wait consumes a fact the system states**.
[`goToAskNow`](https://github.com/max-sixty/leaf/blob/cf0c6cf185346c5e68a392b176578c4d1f4d0466/skills/leaf/assets/runtime/asks/view.js#L1115)
awaits `materializeAsk` and one or two `reveal`s before it issues any
travel, so `scroll_settled` called straight after the press can count
its three still frames on a page the walk has not moved yet. The test
then measures its geometry where the walk began, issues its own
`scrollTo` from there, and the travel lands on top of it — the badge
back above the bar, legitimately kept, for the rest of the assertion's
timeout.

#876 changed the unit and not the ordering, and the measurement says it
addressed the smaller window. On the ask walk here the glide pause is
nought to one frame and holds at nought under
`Emulation.setCPUThrottlingRate`, because the compositor starts the
glide on the frame after the instant move whatever the main thread is
doing. The window that grows under load is the asynchronous gesture
before the travel is issued at all, which is main-thread work; no count
of frames bounds it, so raising the count would have been the next
wording rather than the fix.

## What this changes

The walk arrives and then travels, in that order and in one task —
[`arriveAt`](https://github.com/max-sixty/leaf/blob/cf0c6cf185346c5e68a392b176578c4d1f4d0466/skills/leaf/assets/runtime/asks/view.js#L936)
focuses, `scrollToElement` follows with no await between — so the
arrival is a fact the stillness can be read behind. Each press in this
test now waits on its ask's focus before `scroll_settled`.

That is the rule the rest of the suite already keeps. This was the only
one of the suite's 38 `scroll_settled` call sites that read stillness
with nothing stated before it: every other waits on a moved scroll
number, a painted `data-lf-ask`, a URL, `to_be_in_viewport`, or the
focus. So the durable half of the change is in the helper's own contract
and in `tests/CLAUDE.md`, which said the helper "waits for a scroller to
have arrived" — a promise it cannot keep — and now says it waits for one
to have stopped and is asked behind the fact that it started. The
frames-versus-milliseconds reasoning #876 established stays; what it is
for is now named as the glide, not the gesture.

## Verification

The mechanism reproduces on demand: with the stillness wait allowed to
answer early (`frames=0`), the page ends at the travel's own position
rather than the test's, with the badge worn and the count stable at 2 —
the run's failure exactly. The two windows were measured separately on
the ask walk at throttling rates 1, 2, 4 and 10; the glide pause reads 0
frames at every rate and the press-to-travel window is the one that
carries the slack.

`tests/test_render_widgets.py --run-nightly` is 179 passed, `npm run
test:runtime` 28 passed, and `pre-commit run --all-files` clean. The
everyday suite is 1195 passed beside six cases that fail in this sandbox
and fail identically at the merge base — an `AF_UNIX` socket it refuses,
a umask it does not grant, and a Node bundle step it cannot run.

## What this does not do

The six Web Awesome cases stay with #884; nothing here touches them, and
`nightly` stays red until that merges. `scroll_settled` keeps its
signature: the ambiguity it carries is not one the helper can settle
from outside the page — a gesture that legitimately moves nothing looks
the same as one that has not started — so the caller consuming a stated
fact is the fix rather than a way around it.

<details><summary>The failing cases and where each was read</summary>

From [the `nightly` job at
f3de402](https://github.com/max-sixty/leaf/actions/runs/35616173899):

```
FAILED tests/test_render_widgets.py::test_ask_binding_badges_do_not_cover_their_key_line
  Locator expected to have count '1' / Actual value: 2
  14 × locator resolved to 2 elements                            # this change

FAILED tests/test_site.py::test_the_published_notification_example_runs_its_authored_module@site
FAILED tests/test_site.py::test_published_visual_evidence_loads_from_its_page@site
FAILED tests/test_render_controls.py::test_every_base_corpus_tab_stop_has_a_visible_focus_indicator
FAILED tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
FAILED tests/test_render_projection.py::test_visual_review_gallery_gives_a_laptop_to_the_evidence
FAILED tests/test_render_margin.py::test_agent_status_leaves_the_margin_transcript_where_the_reader_scrolled_it
                                                                 # the six in #884
```


`test_render_export.py::test_a_copy_speaks_reader_origin_after_live_map_is_removed`,
the seventh in the 725fca7 run, passed here — consistent with #884
reading it as a latent race rather than #878's.

The badge test passed 18 consecutive local runs before this change,
including ten under six busy cores, so the window is not one an idle
machine reaches. What reproduces it is letting the wait answer early,
which is what the loaded runner does.

</details>

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Sep 22, 2026
…htly tests around what #886, #889 and #892 moved (#903)

`ci` on `main` went red at 7925553 (#892): [`lint` and `test` passed
and the complete suite in `nightly` failed on eleven
cases](https://github.com/max-sixty/leaf/actions/runs/35650845868). Five
of them were #884's and #891's, both since merged, and the visual-review
one is green again on today's `main`. This PR is the other six, which
arrived together because three features landed between that run and the
one before it and none of them was validated against the nightly
selection.

One is a fault in the layer. The other five are tests still standing
where those features used to put things.

**The comparison handle's lift is cast in `--shade`.** #892 gave
`wa-comparison`'s handle `box-shadow: 0 1px 3px color-mix(in srgb,
var(--ink) 20%, transparent)`. The layer states one shadow ink per
scheme precisely because a hand-mixed colour can only be right about one
ground — a drop shadow written for the light paper lifts a dark one by a
fraction of what it promises — and
`test_every_shadow_the_layer_lifts_a_box_with_is_cast_in_the_scheme_s_own_ink`
is the reading that holds every elevation shadow to the token. The
handle now spends it.

**#889 made a finding say where it is; two assertions held the old
wording.** `render-checks/locate.js` reads an element without an id as
`<strong> in <lf-option id=c-bearer>` rather than as the host alone.
That is the change #889 made on purpose, so the two nightly assertions
that spelled the host move to the stated form.

**#892 made the screenshot's checkbox a fallback; a test still pressed
it.** `test_a_widgets_native_control_names_the_press_the_platform_makes`
scrolls `lf-shot`'s transparent checkbox into view and presses Space on
it. Since #892 the theme hides that checkbox the moment Web Awesome's
comparison lands, so on the live page there is no control there to
scroll to. The test now holds the bundle from outside the page through
`primed`, which is what `tests/CLAUDE.md` asks for when the ordering
matters — an arrangement rather than a race. It needed a page of its own
to do it: `lf-diff` imports the same bundle at the top of its module, so
holding it on the combined fixture left that widget unupgraded and the
page never presented. The staged-control half of the test now runs on
`DIFF_PAGE`, and `NATIVE_CONTROL_PAGE` goes with the split.

**#886 added a thread to the gallery; a walk was counting presses to a
different one.**
`test_a_forced_inline_thread_keeps_its_control_inside_the_margin_budget`
pressed `t` twice to walk from the gallery's first thread to the crowded
suggestion's. #886's summary example anchors at `bg-thread-checkpoint`,
which sits between them, so the second press landed there and the test
went on to measure a card three thousand pixels from the cluster it
names. The walk now goes to the thread it is for, gives up when it comes
back round to one it has already stood on, and waits for each press's
arrival before the next.

**#892's upgrade arrives after the page says it has presented; a
settled-page reading started before it.**
`test_a_settled_page_with_a_standing_reaction_stops_rendering_its_margin`
counts margin layouts across thirty frames on the gallery and allows
one. The gallery carries an `lf-shot`, and moving its two frames into
`wa-comparison` lays the margin out twice a few milliseconds apart, at
whatever moment the module happens to resolve. The stamps `open_page`
waits on do not cover an upgrade deliberately placed after them, so the
page was still arriving when the count began. The test waits for the
comparison first.

## Verification

The six cases pass on this branch and five of them still fail on `main`
without it; the sixth is the intermittent one, measured below.
`tests/test_render_controls.py`, `tests/test_render_anchors.py`,
`tests/test_render_projection.py`, `tests/test_render_margin.py` and
`tests/test_render_commands.py` were run whole under `--run-nightly`,
along with the everyday suite, `npm run test:runtime` and pre-commit on
the changed files.

<details><summary>Evidence, and what this leaves</summary>

**The settled-page case is intermittent, and the hold is what names its
cause.** Without the wait it went red on 2 of 12 local runs, with both
layouts landing 6–13ms apart somewhere in the first 700ms of the window
— 296/302, 191/197, 521/527. With the wait it is 8 of 8 green. Holding
`**/vendor/webawesome.esm.js` from outside the page instead, changing
nothing else, is 8 of 8 with no layouts counted at all, which is what
identifies the shot's upgrade rather than the two-second heartbeat the
test's docstring had assumed.

**Attribution.** Each failure was placed by running the case at the
commits between the two nightly runs: the margin walk passes at 10d61b2
and 2f8ee1b and fails at 965369b (#886), and `git show 965369b --
examples/developer/feature-gallery.html` is the added
`bg-thread-checkpoint` paragraph and its thread.

**Not in this PR.** One document change producing two margin layouts on
adjacent frames is a doubled render in the thing that test exists to
bound; this change waits for it rather than removing it, and whether the
upgrade should lay out once is #892's question to answer. The wait
itself is the third place a test names, by hand, a widget of its own
fixture that is still arriving after the page said it presented —
`test_margin_layout_batches_the_composed_page_without_refolding_controls`
and `test_unchanged_margin_refresh_cost_is_bounded_by_refresh_count`
each wait on `[data-interaction-frame]` carrying
`data-interaction-ready`, and this adds `lf-shot wa-comparison`. That is
one missing fact rather than three waits: a page-level stamp a deferring
widget raises when it lands, which `open_page` could wait through, would
settle every fixture at once. It is a change to make on its own terms
rather than inside a CI repair, and until it is made the next widget to
defer will redden some other test at a wait far from its cause.
Separately, four nightly cases are red on today's `main` and are not
from this run —
`test_a_thread_beside_its_cluster_takes_the_room_to_the_visible_edge`,
`test_the_margin_groups_meanings_at_one_destination_without_moving_the_page`
and `test_a_diff_surface_keeps_the_complete_thread_lifecycle_inline` in
both schemes. All four pass at 7925553 and fail at 39d9cad, so they
are #895's, and the run that reaches them will be that commit's own.

**Environment note.** Six everyday cases and the four browser-launch
cases in `tests/test_render_commands.py` fail in this CI sandbox on a
clean tree as well — no `AF_UNIX`, no installed Chrome for the
subprocess gate — and all of them were green in the `test` job of the
run under diagnosis.

</details>

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.

2 participants