Repository navigation
Retire the panel row's gesture steps; every scope row names a finger's route - #3290
Merged
Merged
Conversation
Words a finger selects, or a selection a script or browser command makes where no field opens beside it, used to put a worded "Comment on selection" step in the panel's row in place of the On me and Threads counts. That step outranked a stance's own steps, so selecting words in Draw mode or during a search took them off the row, and it was one more control to find. Now the panel's page field offers the selection itself: its placeholder quotes the words (cut by the field's ellipsis to its room, so a 320px row shows the opening of the quote), its accessible name becomes "Comment on the selection", and a tap or click on it opens the comment on that passage. The counts and a stance's steps and ✕ stay on the row, and letting go of the words brings back the field's ordinary placeholder. Where a page draft hides the placeholder, the line over the field quotes the words instead. The anchor is the one read when the selection last settled, captured at the press's pointerdown and used at its click: the field taking focus drops the page's selection on iOS, and the press's own mousedown puts away any comment box it finds open. A Tab into the field, or the runtime placing the caret there, still writes on the page. The cost the user accepted: while words stand selected, a press on the field always addresses them. The desktop path, the response field beside words a mouse selects, is unchanged. The comment-selection page control and its rank go; the gesture-row machinery stays for search's and Draw mode's steps. Tests, the dev drivers (stills, record-demo, eval user), the how-it-works page and the feature gallery move to the field. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review fixes to the panel field that comments on selected words: - On a page that draws its own annotations, an open comment box stands in the field's place, so new words a finger selected were offered in a hidden editor and had no visible route. While the field quotes selected words, it now stands in the box's place (`data-offers` on the panel), and the box comes back with its draft once the words go. - A press on the field addresses the words only while the field quotes them, so an error the field says instead hides the words and the press writes on the page. - The press's mousedown is cancelled when it will address the words, so the editor never takes focus: no "Comment on the page" placeholder while a mouse button is held, no keyboard raised on a phone before the comment takes focus. - With the editor no longer taking focus, the page's selection still stands when the press ends, so the press now comments on that selection as it stands, falling back to the anchor read when it last settled only where it is gone (as a tap on iOS may leave it). A data update that re-renders the selected words while keeping their native endpoints sends no selectionchange, so the settled anchor alone went stale there and the comment box refused focus (test_call_diff_projects_stable_commentable_rows). - The field's accessible name follows the same reading as its placeholder, so a Tab or programmatic focus names it "Comment on the page", in the repaint frame where the placeholder changes too. - With the comment-selection row gone, page-controls.js no longer arbitrates between gesture ranks: every gesture row comes from the innermost scope at one rank. A new browser test covers a Tab into the field writing on the page, the line over a page draft quoting the words, and the field standing in an open box's place on an annotated page (which fails with the stylesheet change reverted). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/runtime/floating-panel.js # skills/leaf/assets/runtime/page-controls.js # skills/leaf/kernel/kernel.json # tests/journeys/test_render_semantic_selection.py
# Conflicts: # skills/leaf/kernel/kernel.json
# Conflicts: # skills/leaf/assets/runtime/floating-panel.js # skills/leaf/assets/runtime/page-controls.js # skills/leaf/kernel/kernel.json # skills/leaf/kernel/leaf.js # skills/leaf/kernel/runtime/bundle-document-identity.js # tests/journeys/test_render_semantic_selection.py
…s route With search's arrows in its box, a press on the marked match, a drawing's composer undo, lifting a capture's drag and the page field's offer of selected words, no page scope row stands in the panel's row as a worded step any more. The user accepted the review's five proposals, which ended in this 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`; the register refuses one that is neither, as it refuses a page command without `touch`, so a new gesture meets "what does a finger press?" where it is declared. Deleted: the steps half of `touchPresses` (register.js, touch-controls.js), route-level `touch` words and their check (bindings.js), the gesture rows and their rank in page-controls.js, the panel's step branch and `.lf-fp-step` face. Thirty scope rows declare `touch: false`. The Touch routes rule in keyboard/AGENTS.md says the new contract. Behavior: none a user sees; the row already held no steps. The Draw mode panel test, which still expected the counts to give way, now expects them to stay. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 20, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 20, 2026
The panel test helper now finishes only animations with a finite end. In [main CI run 39388826277](https://github.com/max-sixty/leaf/actions/runs/39388826277), three browser tests failed because `panel_settled` called `finish()` on a continuous working indicator while opening a thread; Chromium rejects finishing an infinite animation. The helper still finishes finite panel transitions and waits for them to clear, while allowing the working indicator to keep running. The run's separate Draw mode count assertion was already updated in #3290. The remaining failure reproduced on current `main`; after this change, all three affected browser tests pass locally (4 parameterized cases). Co-authored-by: leaf-agent <[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.
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 declarestouch: false;register.jsrefuses a row that is neither, as it already refuses a page command withouttouch. 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, andbindings.js's contract fortouchfollows.Deleted. The steps half of
touchPressesinregister.jsandtouch-controls.js; route-leveltouchwords and their check inbindings.js; gesture rows and their rank inpage-controls.js(the ✕'s rank is nowexit); the panel's step branch and the.lf-fp-stepface, 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_rowstill 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-stepclass 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 onmain.