Repository navigation
fix: follow lf-options' shadow roots in the page reading, the group's redraw and focus keys - #7517
Merged
Merged
Conversation
…aw and focus keys #7417 moved lf-options' controls into shadow roots. Eight browser tests have failed on main since. Three only read light-DOM nodes that moved, and four caught behavior that changed: - A retired suggestion slot no longer silenced words a widget inside it draws in its shadow root, so a quote matched the settled label in the half the user accepted away. The reading now keeps silence across a declared root, and settledAway climbs out of shadow roots to find the slot. - A revision that replaced an option node left the new node with no face, mark or `selected`, since the group's args didn't change. The group now draws again on its slot's slotchange and declares its key rows again. - Back named a mark in an option's shadow root as the option, so focus came back to the option rather than its mark. A focus key now names a control by its place in the named element's shadow root as well as its light tree. A page revision still hands back the obligation, as before. The three probes now reach Add's submit, a key badge and a row's mark through their shadow roots. Closes #7494
leaf-agent
commented
Nov 28, 2026
leaf-agent
left a comment
Collaborator
Author
There was a problem hiding this comment.
Dropping silenced: false from crossed makes the reading-context header above NO_CONTEXT in browser/runtime/readings/passages.ts false. It still says "Three of the facts stop at a shadow boundary … closest for chrome, silence and the generated marks". Silence now crosses a declared root, and settledAway and retiredSlot both climb with upFrom. That header is the module's statement of which facts start over at a root, so a later change to crossed would read the old rule there. I'll push a commit that moves silence to the facts that cross, beside blocks and cells, in both passages.ts and the built passages.js.
…hadow root The change to `crossed` carries silence into a declared root; the header above NO_CONTEXT still listed it with chrome and the generated marks as stopping there.
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#7417 moved
lf-options' controls into shadow roots. Eight browser tests have failed on every push tomainsince. Three only read light-DOM nodes the port moved. The other four caught real regressions, and this PR fixes those in the code while keeping #7417's design. Each of the eight fails onmainand passes here; the Back test passes in both Chromium and Firefox.Regressions fixed
test_a_label_in_a_retired_slot_leaves_the_page_with_the_slot). The page reading resetsilencedat every declared shadow root (crossedinreadings/passages.ts). A retired slot therefore stopped silencing words that a widget inside it draws in its own root. Port lf-options to Effect UI as the first decorating widget #7417 moved the settled group's "Settled: …" label into such a root, so a comment on those words found them again and painted a mark there. Silence now carries across a declared root, andsettledAwayclimbs out of shadow roots (upFrom) to find the slot. This rule predates Port lf-options to Effect UI as the first decorating widget #7417, which only exposed it.test_ideas_shortlist_survives_revision_and_can_reopen). A revision replaces an option element whose words changed. The group's arguments stay the same, soGroupLight.shownever reached the new node, which was left with no face, no mark and noselected. The group's state still held the pick. The group now draws again on its slot'sslotchange. It also declares its key rows again, because their closures held the old option node.test_back_returns_to_a_named_control_in_a_message_the_agent_rewrote). Before the port, the mark was a light child of the option, and a focus key named it by its place inside the option. Now the mark is in the option's shadow root, andnameIncollapsed it into the option itself.records/carry.tsnow looks for that place in the named element's shadow root after its light tree. On the page, such a place still counts only within the revision it was read in. Sotest_a_restated_obligation_returns_a_user_to_the_question_not_to_a_controlstill hands the obligation back after a revision. I first tried adata-lf-carrykey on the mark, which broke that test, so I dropped it.Already correct; the probes now reach the shadow roots
test_a_pin_keeps_clear_only_of_controls_the_user_can_see: its lastbuttonwas Add's submit, which is now in the group's shadow root.test_one_key_keeps_one_keyboard_face_across_the_page: it reads the option's key badge through the locator. The badge's key face still matches the sequence chip's and the target picker's.test_a_wide_widget_stays_inside_a_box_that_frames_it: the row's mark is read through its option's shadow root.test_an_obligations_digits_are_drawn_whole:CLIPPED_BYandINSIDE_ITS_OPTION(tests/render_cases_navigation.py) now climb from the badge to the option that hosts its root. The digits are still unclipped, off the words and on one seat per form.Other checks
pnpm run test:runtimepasses, and so doespnpm run check.tests/browser -k "option or obligation or pick"passes, as does-k "back or forward or carry or history", apart fromtest_design_mode_reads_each_shape_of_control_into_the_anchor_its_routes_carry. That one fails the same way onmainat this run's base, which predates fix: keep the panel tab's preview on its list's name, and follow #7403's names in five tests #7493's repair of it.-k "retired or settled or suggestion or revision"shows two teardown errors (unchanged write: aria-expandedon the margin's More face, intest_suggestion_actions_stay_reachable_through_a_decision_and_its_undoandtest_a_decision_undone_leaves_every_suggestion_pin_where_it_stood). Both also fail onmainwithout this change.Closes #7494 — automated triage