Repository navigation
Let a press's history entry and a strip's reveal move the control it pressed - #3972
Merged
Merged
Conversation
…pressed #3921 failed a gesture whose own scroll carries the control it was made on unless its command declares `travels`, so a press, which has no command, could take the user nowhere. The tab tests stayed unsurveyed; forced on, they reported three `lf-tabs` presses. Max chose: a root switch travels, the sideways reveal stays, and the embedded move is a defect. ## What the watch allows now - A gesture that adds a history entry takes the user somewhere. The watch reads it from the Navigation API's `navigate` event (a `push`), so the root set's switch, which adds one and opens the view at its place, needs no declaration of its own. Renaming the entry the user is on (`replaceState`) takes them nowhere. The link exemption stays, since a link whose script travels in place of the browser adds its entry only after arrival. - A scroll may bring the pressed control whole into the view of a box that showed only part of it (its scrollport less its scroll-padding, clear of the control's scroll-margin), by no more than the part it hid, as the browser's own focus does. `#showTab` revealing a tab from under the strip's edge press is one. - A scroll counts only on the boxes the gesture's own calls scrolled: the box a call names, or every box holding a reveal's or a focus's target. Before, once a gesture had called any scrolling API, the test driver's actionability scroll before its next press counted too. - Back and Forward open a rendering, as an input does: the browser's chrome makes them, so no event in the page carries them. ## What the forced run reported, measured - The 295px "root switch" was the driver: after a framed tab's reveal, Playwright scrolled the page 370px to reach the next tab, and the watch blamed the framed tab's click. Per-box attribution removes it. - The 51px "reveal" was the driver too. A first tab's ring room at its strip's start asked the strip to scroll -35px it could not travel; that no-op `scrollBy` marked the press as scrolling, and Playwright then scrolled the strip 51px for the next tab. `localScrollBy` now clamps every path to what the scrollport can travel, and `scrollIntoView` skips a box that won't move. The real reveal on the next press is 7px, its ring room. - The root switch's own landing carries the tab 72px (`test_a_tab_layout_completion_preserves_native_navigation`) and is now allowed by its entry. - The embedded set's 24px was scroll anchoring. The browser's anchor stood in the panel the switch hides; once anything laid out that panel's content again (the watch, a passage read, find-in-page), it lost the open panel's 24px padding and the page scrolled by that. Unwatched, one `getBoundingClientRect` on the hidden panel's heading after the switch reproduced it. A hidden panel or part now declares `overflow-anchor: none`: before 229 → 205 scrollY, after 229 → 229. ## Tests - The tab tests (`widgets/test_tabs.py`, `navigation/test_tabs.py`) now watch shifts, except the gallery case whose live revision adds a tab set above and moves the strip 430px, recorded in `TODO.md`. The side list test's large root font is now the second page's own from first paint, since setting it by script moved the page without input. - `test_a_scroll_during_a_gesture_may_not_carry_its_control` gains an entry the press adds (passes) and one it renames (fails); the first fails without the `push` rule. It now serves from an origin, which a data: URL lacks for the Navigation API. - `test_a_press_may_bring_its_control_whole_into_its_scroller`: a scroll by exactly the hidden 40px passes, 80px fails; without the reveal rule the first fails, without its bound the second passes. - Without the `overflow-anchor` rule, `test_embedded_tab_selection_preserves_the_document_reading_position` fails 205 vs 229; without the clamp, `test_pointer_tab_underline_moves_without_delaying_the_view` reports the 51px; without traversal as input, `test_back_to_a_fragment_the_page_has_hidden_since_lands_on_it` reports a passive 196px move. - With #3921's Escape landing reverted and its position assertion removed, `test_escape_from_a_box_leaves_it_where_it_stood` still reports 49px under per-box attribution. The merge film's Next inspection (83px) scrolls to keep its details in view rather than to reveal the button, so it stays in `TODO.md`. > _This was written by Claude Code on behalf of max-sixty_ Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # TODO.md
# Conflicts: # TODO.md
leaf-agent
approved these changes
Oct 25, 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.
#3921 failed a gesture whose own scroll carries the control it was made
on unless its command declares
travels, so a press, which has nocommand, could take the user nowhere. The tab tests stayed unsurveyed;
forced on, they reported three
lf-tabspresses. Max chose: a rootswitch travels, the sideways reveal stays, and the embedded move is a
defect.
What the watch allows now
watch reads it from the Navigation API's
navigateevent (apush),so the root set's switch, which adds one and opens the view at its
place, needs no declaration of its own. Renaming the entry the user is
on (
replaceState) takes them nowhere. The link exemption stays,since a link whose script travels in place of the browser adds its
entry only after arrival.
that showed only part of it (its scrollport less its scroll-padding,
clear of the control's scroll-margin), by no more than the part it
hid, as the browser's own focus does.
#showTabrevealing a tab fromunder the strip's edge press is one.
the box a call names, or every box holding a reveal's or a focus's
target. Before, once a gesture had called any scrolling API, the test
driver's actionability scroll before its next press counted too.
chrome makes them, so no event in the page carries them.
What the forced run reported, measured
Playwright scrolled the page 370px to reach the next tab, and the
watch blamed the framed tab's click. Per-box attribution removes it.
strip's start asked the strip to scroll -35px it could not travel;
that no-op
scrollBymarked the press as scrolling, and Playwrightthen scrolled the strip 51px for the next tab.
localScrollBynowclamps every path to what the scrollport can travel, and
scrollIntoViewskips a box that won't move. The real reveal on thenext press is 7px, its ring room.
(
test_a_tab_layout_completion_preserves_native_navigation) and isnow allowed by its entry.
stood in the panel the switch hides; once anything laid out that
panel's content again (the watch, a passage read, find-in-page), it
lost the open panel's 24px padding and the page scrolled by that.
Unwatched, one
getBoundingClientRecton the hidden panel's headingafter the switch reproduced it. A hidden panel or part now declares
overflow-anchor: none: before 229 → 205 scrollY, after 229 → 229.Tests
widgets/test_tabs.py,navigation/test_tabs.py) nowwatch shifts, except the gallery case whose live revision adds a tab
set above and moves the strip 430px, recorded in
TODO.md. The sidelist test's large root font is now the second page's own from first
paint, since setting it by script moved the page without input.
test_a_scroll_during_a_gesture_may_not_carry_its_controlgains anentry the press adds (passes) and one it renames (fails); the first
fails without the
pushrule. It now serves from an origin, which adata: URL lacks for the Navigation API.
test_a_press_may_bring_its_control_whole_into_its_scroller: a scrollby exactly the hidden 40px passes, 80px fails; without the reveal rule
the first fails, without its bound the second passes.
overflow-anchorrule,test_embedded_tab_selection_preserves_the_document_reading_positionfails 205 vs 229; without the clamp,
test_pointer_tab_underline_moves_without_delaying_the_viewreportsthe 51px; without traversal as input,
test_back_to_a_fragment_the_page_has_hidden_since_lands_on_itreports a passive 196px move.
removed,
test_escape_from_a_box_leaves_it_where_it_stoodstillreports 49px under per-box attribution.
The merge film's Next inspection (83px) scrolls to keep its details in
view rather than to reveal the button, so it stays in
TODO.md.