Repository navigation
Add leaf-dev words, a survey of what the panel says in passing after each press - #6439
Merged
Merged
Conversation
…each press The panel's seat for passing words answers presses: a notice, a walk's position, the Go-to word, where the user stands. Judging those one call site at a time missed how they read beside each other and beside the screen. This presses, on a set of pages, every page command a key reaches at rest, the journeys whose later presses depend on the first, each key `g` leads to, and each walk a widget declares at its first stop, and tabulates what the seat says, what it says once a notice's moment has passed and what the live region heard, base beside head, with a capture per press. PANEL_SAYS, the seat's reader, moves from the tests to leaf_dev.browser so the tests and the survey read the seat the same way, and the developing-leaf skill points a change to the panel's passing words at the survey.
leaf-agent
previously approved these changes
Nov 18, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 18, 2026
… hear no old reply as news A review of what the panel says after each press (leaf-dev words, #6439) found four defects in an undo's notice, each present on main too: - "Undid: commented “…”" put a verb with its "I" left out in Leaf's voice, which the glossary's "Reader-facing words" forbids. The notice now says "Undone: …". - "· 72d ago" after the undo's words read as when the undo happened. The age now follows the gesture's words with no separator ("Undone: resolved “Feeder” 21d ago"), in the notice and in the command reference's "Undo: …" line alike. - In a thread open in the panel, a notice that offers no press of its own replaced "Reply…" and left the key `c` alone at the field's end. The thread's field now ends such a notice in "Reply…" and `c`, as the page's field ends one in "Comment…" and `c`. - Undoing a resolve on ship-review announced a cut-off fragment of the agent's reply ("Both — it opens on the spinner and ends with the…") before the undo's notice. The resolve had marked the reply read (read_state.py), so its undo made it unread again, and the news rule counted a version as news the first time a tab saw it unread. A version the tab has already seen read is no longer news when it turns unread. Behavior changed for tests: the notice's and the command reference's undo words (test_render_outbox, test_tabs, test_render_reactions); a new panel test holds Reply beside the key after a notice in a thread, and a new Node test holds the news rule. Each new test fails without its fix. Probed in Chromium and Firefox on ship-review and review-a-plan.
leaf-agent
approved these changes
Nov 18, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 19, 2026
Undo now takes back the user's newest gesture in one press of ⌘Z (Ctrl+Z off a Mac), and where its place was out of view, goes there once the page shows the withdrawal; Back returns to where the user pressed. This replaces "show, then take" from #3603, where a first press showed an out-of-view gesture and a second took it, and moves undo off bare `z`. max-sixty chose both today: taking at once, after a review found that the state behind showing had been patched seven times in four weeks and that a missed visibility reading cost a press that took nothing; and ⌘Z, after a word typed onto the page undid work. What one press does, before and after (each row run with `leaf-dev probe` on this branch in Chromium, and each choice row in Firefox too): | When the user presses undo | main (`z`) | this PR (⌘Z) | | --- | --- | --- | | The gesture is in view | takes it | takes it | | It is out of view | shows it, says "Press again to undo"; a second press takes it | takes it, then goes to it | | Right after the Escape that closes a panel over it | reads the closing panel as covering it: scrolls 543 px, adds `#near`, takes nothing | takes it, no scroll | | The user's choice is still being sent | does nothing, says nothing (10 ms at 1× CPU, over 100 ms at 8×, plus server time) | takes it at once by its pending id, as the widget's Undo does | | Two quick presses, a message or resolve still being sent, two choices still being sent, a held drag | the press waits | unchanged | Visibility is read with each cover where it comes to rest (`seenRect`'s `rest`, which `uncovered` already took), and it now decides only whether the press travels. The armed state, its input and scroll watches, and `landedAway` are gone. The `undo.js` header, `events.md` "Undo" and how-it-works' Undo paragraph say what undo does now. **Undo moves from `z` to ⌘Z.** Someone who thought they were typing in a box and typed onto the page undid work: on this branch `zazu` after a pick took the pick and an older comment, and `zazu` just after a passage's first comment took that comment back (main took one gesture in each). max-sixty picked the platform's undo chord over keeping `z`, ⇧Z and `g Z`, and kept Resolve on `r`. A text box keeps every letter with a modifier (`keyboard/text-entry.js`), so ⌘Z undoes typing inside a box and a gesture outside one. Probed in Firefox: `zazu` after a pick or a first comment now sends nothing, ⌘Z after each sends the undo, and ⌘Z in a reply box undoes its typing and sends nothing. A chord isn't a printed key, so the startup hold doesn't keep one: a ⌘Z pressed before the page's history arrives does nothing, where a held `z` waited for it. The docs, examples and tests name ⌘Z, and the notice's key chip spells it `⌘z`, or `Ctrl+z` off a Mac. Review found three more defects, fixed here, each with a test that fails without its fix: - An undo of an action whose POST had answered, before any reading held it, drew nothing until its own round trip: `framework/application.js` withdrew the action under the log's id while the page drew it under its pending id. This held for the widget's own Undo too. - Taking back a comment whose card was closed flashed the card open. A comment's place is now its passage. - The travel to an element ignored input made after the press; it now checks the press's intent, as the thread routes do. **The undo's notice.** A survey of what the panel says after each press ([#6439](#6439)) found four defects in it, each on main too, fixed here: - "Undid: commented “…”" was a verb with its "I" left out, which the glossary's voice rule forbids; it now says "Undone: …". - "· 72d ago" after it read as when the undo happened. The age now follows the gesture's words with no separator, "Undone: resolved “Feeder” 21d ago", and the command reference's "Undo: …" line reads the same way. - In a thread open in the panel, a notice with no press of its own replaced "Reply…" and left `c` alone at the field's end. The field now ends it in "Reply…" and `c`, as the page's field ends one in "Comment…" and `c`. In a narrow panel the notice's age is then cut by the field's ellipsis; the live region still hears it whole. - Undoing a resolve announced a cut-off fragment of the agent's reply before the notice: the resolve had marked the reply read, so its undo made it unread again, and news counted a version the first time a tab saw it unread. A version a tab has already seen read is no longer news when it turns unread (`semantic-news.js`). Taking at once also means undo takes an accepted action whose reading failed to commit, by its attempt, as that action's own Undo would. `test_an_accepted_event_is_not_retried_when_its_state_cannot_render`, written for main's hold, failed on this branch for that reason; it now checks that an older gesture's Undo still waits. This replaces #6402, whose test waited out the Escape case; under this change that test passes as written. Still open, found in review and not probed: an undo pressed inside the 140 ms scroll glide `t` starts reads the choice where the glide stands, not where it lands, so it may revert unseen. Covers are read at rest and glides aren't. The fix is to read both where they come to rest, in `scroll-containers.js`' `seenLanded`. How loudly an undo shows what it took follows in its own PR: max-sixty picked an accent ring on what the undo changed, with the notice held until the next key. Checks: the 85 browser and journey tests that press undo, call the harness's `undo` or read the words above (100 cases with parameters; all pass, the one above after its update), each new test failing without its fix; `pnpm run test:runtime` (1,052 pass) and `pnpm run check:browser`; pre-commit on every changed file. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 19, 2026
…tices declare (#6442) Walk owners and notice producers now declare facts, and the panel composes what it says from them, saying only what the screen and its own words don't; a listener hears the whole position either way. This is #6427's follow-up: Max asked to put "what does this tell the reader that the screen doesn't?" to everything the panel says in passing, to let the panel compose it rather than each call site guessing what is visible, and for a way to survey, review and iterate. `leaf-dev words` (#6439, landed) is that survey; three fresh reviewers worked from its captures. <img src="https://gist.githubusercontent.com/max-sixty/17c067fe5d4b7930043a18803c0295c8/raw/c83ac52419ef0db864c2e3bcc4ba976ad0d6728a/panel-before-after-2.png" alt="The panel's field on main and on this branch after four presses" width="900"> **How it composes.** `beginWalk(key, noun, read, {list, about})`. `list` is the walk's first and last stops: Leaf declines a step while both stand whole in view, so the ring alone answers it and the walk the user came by stands (a two-tab strip, a question's options, a diff whose hunks all show). `about` names the fact where the user stands that the list belongs to ("comparison" for its changes). Each surface passes the facts its own words say: the page field's standing words say a comparison and hidden annotations, so there a change's place reads "5 changes since v2 · 1 of 5" and a notice that only repeats them stays out of the field; the folded leaf's peek and a thread's field say none, so they show the notice and the whole position ("Change 1 of 2 since v1" beside a thread's reply, which read a bare "1 of 5"). Such a notice holds the seat like any other, so on the page field it is unseen for its moment and news waits behind it. Notices take `stands`, the condition their words state, and retire, shown or queued, when it lapses ("N changes since v2 — v shows them" once a comparison stands). **Settled with Max:** a list on screen names what it counts ("Tab 14 of 14", "Command 1 of 97", where #6427 had "14 of 14"), since a fresh reviewer found the bare count ambiguous beside a tab strip whose rows read "1 of 31 pages real". Hiding annotations by key keeps "— o shows them" in the field, since the standing words don't name the key. **Also from the survey:** Go-to armed with no hint in view says "No visible targets"; counts agree with nouns ("1 visible target"), and the filters say "threads" and "margin entries"; page search reads a match inside a word back as the word ("rather", not "ra the r") and Enter says the match's place; `.` announces folding; a diff's steps are heard as "Hunk 2 of 3: src/summary.rs". **Weaknesses:** a dot or line chart bounds its walk by its whole drawing, which counts as shown when taller than the window; a partly visible option list's walk replaces On Me's, so On Me's view loses its ring on that item; Go-to with hint chips still says nothing in the field (as on main). Tests: new browser tests for the thread-field change walk, notices following their premise, the toggle's notice in the field and the folded peek, and a match inside a word; the touched browser and journey tests, `pnpm run check` and the runtime tests pass. > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
added a commit
that referenced
this pull request
Nov 19, 2026
…e stale references (#6492) This PR removes two pieces of dead code and corrects three stale references found in the nightly review. No behavior changes. - **A walk's unread `list`:** `browser/runtime/walk-declaration.js` stored `list` on the current walk, but `walkPosition()` never returns it. Its only consumer, `walk-position.js`, takes the list from the `lf-walk` event's detail instead. - **`elementBorderFrame`** (`browser/runtime/element-frame.js`): its comment described it as "for consumers cloning its computed presentation", but it is private to `elementFrame`. It also read `shownBox` a second time. It now takes the box `elementFrame` already read. - **A panel class nothing draws:** `PANEL_SAYS` in `dev/leaf_dev/browser.py` and the arrival-notice wait in `tests/render_harness.py` looked for `.lf-fp-context`. That is a line over the field that nothing in `browser/` draws any more. `PANEL_SAYS` is shared by the suite's seat reads and, since #6439, by `leaf-dev words`. A notice now shows only as the empty field's placeholder (`data-lf-says="notice"`) or in the leaf's peek. Both selectors already read those, so the dropped branch never matched. - **`notes/dependency-candidates.md`** said Leaf takes printed letters ahead of a page menu's typeahead. Since #6469, a menu, tree, listbox or select-only combobox keeps them. - **`browser/runtime/change-provenance.js`** cited `../SOUL.md`, which doesn't resolve from `browser/runtime/`. **Verification:** the browser type check and the walk, frame and provenance runtime tests pass. The pre-commit hooks pass apart from eslint, which couldn't load in this worktree, so CI runs it. 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.
uv run leaf-dev words [--page NAME]... [--base [REF]]surveys what Leaf's panel says in passing. On a set of example pages it presses every page command a key reaches at rest (twice), the journeys whose later presses depend on the first (a search's next match, a comparison's changes, On Me then its options), each keygleads to, and each walk a widget declares at its first stop. After each press it records the seat's words, what they say once a notice's moment has passed, what the live region heard, and a capture of the window, then writes a table per page with the base's words struck through where they differ.Max asked for a way to survey what the panel produces, review it and iterate. A run over the eight default pages takes about four minutes per page and arm. Its first runs found defects #6442 fixes: Go-to counts such as "1 visible targets", page search reading "ra the r than" for a match inside "rather", and notices that repeated the field's own words.
PANEL_SAYS, the seat's reader, moves fromtests/render_harness.pytoleaf_dev.browserso tests and survey read the seat alike; the developing-leaf skill points panel-word changes at the survey. Ran end to end on all eight pages against main; ruff passes.