Repository navigation
Drop the panel steps that repeat a route a finger already has - #3267
Conversation
Draw mode's Undo stroke, a to-do's Done and page search's Select each stood in the floating panel's row as a worded step, though each repeats a route that already works: the undo button on the drawing's composer, the Done on the to-do's On me row, and Return in the search box. The user accepted dropping all three, with a press on the marked search match selecting it. Each row now declares `touch: false`. A press on the active match (mousedown and click, taken at capture) selects it as Enter does, so the browser starts no selection of its own and a link under the words is not followed. With Done's step gone, `doneTodo` no longer keeps the to-do a step was shown for while focus sits in Leaf's chrome under a finger; it is the to-do the user stands on. Behavior changed: in Draw mode, on a to-do and during a search the panel's row keeps its counts. The test that Tabbed onto the Done step is deleted; the finger's Done test ends the to-do from its On me card. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The new match press handler can take a click meant for content covering the marked words. I reproduced this with a button positioned over the active match: its click handler did not run, and search selected the match instead. The document capture listener needs to check what received the press before cancelling it.
The review found that the match's capture listener took a click meant for a control painted over the words. A press now lands on the match only when it went through the block holding them. It is also claimed whole from its pointerdown, as an aimed press is: with only its mousedown and click taken, the page's own selection gesture still finished the press after focus had left the box, and widened the selection to "review." past the match. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Stopping the press at the document's capture left the page's selection gesture (surface.js) half the press: its own capture listener on the document still saw the pointerdown, but never the pointerup that ends it, so a later selectionchange read as part of a press still held and the offer of the selected words never cleared. Claimed on the window, the press reaches none of the document's listeners. The phone journey caught it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/kernel/kernel.json
leaf-agent
left a comment
There was a problem hiding this comment.
Moving this capture handler to window prevents the document capture listener in the shift watcher from seeing the marked match's press. The focused test_page_search_stands_with_its_controls_at_the_panel passes its search assertions but errors at teardown: after the match is selected, the On me and Threads chips move 34 px and the watcher reports movement without input. I reproduced this twice at the reviewed head. The input attribution gate needs to see a press that Leaf claims at window capture so this test can pass.
Claiming the whole press on the window hid it from everything that reads input at the document, the shift watch's attribution among them, so the panel's row reflowing as search closed read as movement without input. The mouse events are the part that needs claiming: mousedown, where the browser would start a selection, mouseup, where the page's selection gesture would snap one, and the click, where a link would be followed. The pointer events pass, so the page's gesture sees its press both start and end, and its state stays whole. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/kernel/kernel.json
…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]>
Draw mode's Undo stroke, a to-do's Done and page search's Select each stood in the floating panel's row as a worded step, though each repeats a route that already works: the undo button on the drawing's composer, the Done on the to-do's On me card, and Return in the search box. The user reviewed why the row holds these buttons and accepted dropping all three, with a press on the marked search match selecting it.
The change. Each row declares
touch: false(composing/drawing.js,queue-walk.js,composing/target-picker.js). In page search, a press on the active match selects it as Enter does:pressMatchclaims the press's mouse events at the document's capture, from its mousedown to its click: the browser starts no selection from it, the page's selection gesture does not snap one on mouseup, and a link the words stand in is not followed. Its pointer events pass, so the page's gesture and anything else reading input hear the press start and end. A press counts only when it went through the block holding the words, so a control painted over them keeps its own. With Done's step gone,doneTodoloses its coarse-pointer branch, which kept the to-do a step was shown for while focus sat in Leaf's chrome; it is now the to-do the user stands on.Behavior that changed. In Draw mode, on a to-do, and during a search, the panel's row keeps its On me and Threads counts beside the ✕.
test_a_keyboard_reaches_the_panel_s_done_step_under_a_fingeris deleted with the step it reached;test_a_finger_ends_a_todo_on_you_from_the_panel_s_rownow ends the to-do from its On me card and checks the row has no step. The panel's search test presses the marked match after focus has left the box, and checks a control painted over it keeps its press; the phone journey taps it and checks that neither mode offers a step. The feature gallery's Draw mode line anddocs/how-it-works.htmlfollow.Checked with probes in Chromium (mouse, and touch at 390px with a tap) and Firefox: a press on the marked match selects exactly the match and closes search.
pnpm run test:runtime,pnpm run check:browserand the three changed tests pass.