Repository navigation
Walk page search's matches from arrows in its own box - #3251
Merged
Merged
Conversation
Page search put Previous and Next in the floating panel's row, a box away from the
"1 of 3" they move. The user accepted moving them into the search box, as every
browser's find bar has them: up and down arrows beside the count.
The walk row's routes name the arrows as their `control`, so scopes.js wires each
press to the row's run and reflects its availability, and the row declares
`touch: false`: the arrows are a finger's route, and the panel's row now holds only
Select and the ✕. A press keeps focus in the field, so a phone's keyboard stays up
and the next letter still edits the query. control-keys.js now writes a route's
control's title with that route's key ("Next match (⇥)"), as it did for a row's.
The arrows wear the field's quiet face, as its clear button does. Adds the `up` icon.
Behavior changed: the panel's row no longer offers Previous and Next during a
search; Tab and Shift+Tab are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
On a coarse pointer the two 44px arrows left a 320px phone almost no room for the query, because the count reserves room for the largest count the page could have. That reservation is now the most the count takes rather than a floor: short of room, the count gives way to the words it says now and the query keeps 4em. At 390px and on desktop nothing moves. The arrows are no Tab stop, since Tab is their key: Tab from a box with no matches goes where it did before. A route's non-button control gets its own aria-keyshortcuts. The journey test that tapped Previous and Next in the panel's row taps the box's arrows instead, and prose that gave walking a search as a panel step names Select. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/kernel/kernel.json
leaf-agent
previously approved these changes
Oct 20, 2026
# Conflicts: # skills/leaf/kernel/kernel.json
leaf-agent
approved these changes
Oct 20, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 20, 2026
…s route (#3290) The review of why the floating panel's row holds gesture buttons ended in five proposals the user accepted, each giving a finger its route on what the gesture acts on: search walks from arrows in its box (#3251), the duplicate Undo stroke, Done and Select steps go and a press on the marked match selects it (#3267), lifting a capture's drag attaches it (#3262), and the page's field quotes and comments on selected words (#3275), beside the one ✕ a stance offers (#3233). With those landed, no page scope row stands in the row as a worded step, and the review's last proposal was the rule that keeps it so. **The rule.** A page scope's rows take no words. Each row of a page scope that runs a press is its stance's `exit`, which the panel's ✕ runs, or declares `touch: false`; `register.js` refuses a row that is neither, as it already refuses a page command without `touch`. So a new gesture meets "what does a finger press?" where it is declared, rather than gaining a worded button by construction. `keyboard/AGENTS.md` ("Touch routes") states it, and `bindings.js`'s contract for `touch` follows. **Deleted.** The steps half of `touchPresses` in `register.js` and `touch-controls.js`; route-level `touch` words and their check in `bindings.js`; gesture rows and their rank in `page-controls.js` (the ✕'s rank is now `exit`); the panel's step branch and the `.lf-fp-step` face, with the typing rule's exception for it. **Declared.** Thirty scope rows gain `touch: false`, across the thread landing, the command reference, the standing scope, the margin, the response bar and reactions, the composer, the target picker's hints, Go-to, and area capture's arrows. Each is reached by a tap on what it acts on or the surface's own control. **Tests.** `test_a_mode_entered_from_the_panel_offers_its_way_out_in_the_row` still expected Draw mode's counts to give way to a step, which #3267 had ended; it now expects them to stay. Assertions on the gone `.lf-fp-step` class are dropped, and the stale step prose in tests and runtime comments is rewritten. Checked: `pnpm run test:runtime`, `pnpm run check:browser`, probes of the feature gallery and review-a-plan (no register refusal), and the tests that drive each stance, the ✕, the field's offer and area capture. `test_reactions_keep_all_six_buttons_on_an_occupied_target[390-keyboard]` fails, and fails the same on `main`. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 20, 2026
The nightly [run 39411015460](https://github.com/max-sixty/leaf/actions/runs/39411015460) failed `test_a_finger_reaches_the_page_commands_its_keys_reach` because page search's Next match arrow was still `aria-disabled` beside a "1 of 3" count, so Playwright refused to tap it. The arrows' size, place and hit-testing are correct at 320, 360 and 390px; only their availability was stale. The arrows (#3251) take their availability from the walk row's `when`, which reads the target picker's `matches`. No signal tracks that variable, so `scopes.js` read the arrows again only when an unrelated pass happened to mark every button. A query that arrives with no key press, such as a paste, a phone's suggestion or Playwright's `fill`, could leave both arrows dimmed and `aria-disabled` while they matched. A press still worked, because the click handler reads availability live. `presentSearchStatus`, which paints the count whenever the matches change, now also marks the search box's buttons with `paintKeysWithin`. The floating-panel search test now fills its first query and expects the arrows offered. It also aims its press at the match's words instead of the mark, which moves to them a frame after the count changes; reading the mark in between failed the test about half the time locally. Visible change: after a pasted or filled query, the arrows show at full strength instead of dimmed (`leaf-dev stills` states `page-search` and `page-search-phone`). > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Page search put Previous and Next in the floating panel's row, a box away from the "1 of 3" they move. The user reviewed why the row holds these buttons and accepted moving them into the search box, where every browser's find bar has them: up and down arrows beside the count.
The mechanism. The walk row's two routes name the arrows as their
control, soscopes.jswires each press to the row'srunwith that route's binding and reflects the row's availability asaria-disabled; the row declarestouch: false, since the arrows are a finger's route. A press keeps focus in the field (mousedownis prevented, as the composer's microphone does), so a phone's keyboard stays up and the next letter still edits the query.control-keys.jsnow writes a route control's title with that route's key ("Next match (⇥)"), as it already did for a row's control. The arrows wear the field's quiet face, as its clear button does, and are no Tab stop, since Tab is their key;icons.jsgainsup.Room on a phone. Two 44px arrows left a 320px phone almost no room for the query, because the count holds room for the largest count the page could have. That reservation is now the most the count takes rather than a floor: where the box is short of room, the count gives way to the words it says now, and the query keeps a 4em floor. On a 320px phone the query keeps 56px and "No matches" stays whole; at 390px and on desktop the count keeps its full reservation, so the field doesn't resize as the count changes.
Behavior that changed. While a search stands, the panel's row holds Select and the ✕; Previous and Next are gone from it. Tab and Shift+Tab are unchanged.
test_page_search_stands_with_its_controls_at_the_panelwalks the matches with the arrows and checks the count and that the row's only step is Select; the journeytest_a_finger_reaches_the_page_commands_its_keys_reachtaps the box's Next match at 320px and checks the field keeps focus.Checked with probes in Chromium (desktop, and touch at 320, 360 and 390px with taps) and Firefox in dark scheme: the arrows move the count, focus stays in the field, their titles name Tab and Shift+Tab, and Tab from a box with no matches goes where it did before.
pnpm run test:runtime,pnpm run check:browserand both changed tests pass.