Repository navigation
End the Leaf panel's row in one seat: the On me mark, or Close - #4144
Merged
Merged
Conversation
The row ended in an On me mark, a Threads mark, and a 32px seat kept empty for the ✕ since #3651, which left a gap at the row's end and cut the status words short. Now one seat holds one button: the On me mark at rest, with its count and a dot while a thread holds an unread reply, or the way out of a view, stance or search in exactly its place. The press that opens a view leaves the user on what closes it, and nothing needs room kept. Threads is the On view's tab (On me · On <agent> · Threads · Plan), since On me already lists a thread message that waits on the user (#3666). Its Open, Unread, Drafts and Resolved filters are gone: open threads come first, each saying New or Draft, then resolved ones under Resolved, as Done items stand under On me. With nothing on the user but an unread reply, the mark opens Threads. `lf-sample`'s `showThread` drops its `status: "resolved"` option. Behaviour that changed for users: the open-thread count moves from the row to the Threads tab; Threads by pointer is the mark then its tab; the mark is out of sight while a view or stance stands. Tests open Threads through one helper (`dev/leaf_dev/browser.py`, `open_threads`), and read the open count through the runtime's `threadCounts`, now on the check API. The user chose this design on 25 October from three candidates: today's row, the two marks tidied with the ✕ before them, and the one mark. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # browser/runtime/chrome.css # browser/runtime/floating-panel.js # browser/styles/floating-panel.css # dist/kernel/kernel.json # dist/kernel/leaf.js
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # dist/kernel/kernel.json
leaf-agent
previously approved these changes
Oct 25, 2026
# Conflicts: # dist/kernel/kernel.json
leaf-agent
reviewed
Oct 25, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
[P2] The Threads comparison driver no longer works on the merge base.
stills, bench-latency, thread snapshots and verify-site run one checkout's driver against another's runtime, where the pointer's route to Threads differs, so they open it with g T, which both share. Three tests left on the old Threads mark: the reading-place test now expects the On view, the gallery journey drops the Threads mark's name, and the sample-visibility test focuses the child's Close where its thread stays open. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 25, 2026
# Conflicts: # dist/kernel/kernel.json # dist/kernel/runtime/check-api.js
leaf-agent
previously approved these changes
Oct 25, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 25, 2026
This was referenced Oct 26, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 26, 2026
The pointer route introduced by #4144 deliberately keeps focus on the Threads tab. The keyboard test still expected that route to focus the list, so it timed out before reaching its search and paging assertions. It now enters through `g T`, preserving the focus assertion and the checks that `d`/`u` scroll the list without scrolling the document and `/` searches thread passages. The original test failed on current main at its focus assertion. The corrected test and the adjacent pointer-search, search-Escape and Go-to toggle tests pass (4 tests). This changes test setup only and preserves #4144's tab behavior. Ruff was unavailable locally; formatting and lint remain for CI. Closes #4161 — automated triage Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 26, 2026
The embedded sample test still clicked Threads' Resolved filter after #4144 deliberately replaced filters with open threads followed by a Resolved section. It now seeds an open and a resolved thread, opens the resolved thread from that section, and checks that search finds each. The narrow Full view's Close geometry and working exit remain covered; product behavior is unchanged. The named browser test failed on current main at the removed filter and passes with this update (`uv run pytest tests/browser/test_render_floating_panel.py::test_a_sample_shows_its_threads_in_its_panel -q -n0`). Closes #4162 — automated triage Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 26, 2026
The shared Threads driver treated only an open view as occupying the panel's final seat. After #4144, Draw mode occupies that seat too, so the driver waited for an On me mark that could not appear. It now presses the current exit before opening Threads. The obligation-list test likewise closes its open view through Close, retaining its keyboard activation and empty-card assertion. Both reported cases failed locally before the change with the missing-mark timeout and pass after it. Six selected browser cases pass, covering all three rewrite-resume variants, queue closing, thread-resolution undo and unread-thread navigation. Ruff 0.16.1 checks, formatting and Python compilation pass. This preserves #4144's single-seat interface and the pending drawing draft; no runtime behavior changes. Closes #4164 — automated triage Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 26, 2026
#4144 removed filter-dependent suppression of thread news, so an unread reply now keeps `New` beside any owed action. The tests still expected the suppressed status. Update the row-layout case to expect `New · My turn to answer`. The board-reply case now expects `New` before opening the reply and an empty status after reading it, preserving the check that moving a card owes neither participant a turn. Its delivery receipt, saved move, and later agent acknowledgement checks remain in place. No product behavior changes. Validation: both reported cases reproduced their exact failures on main; the updated cases and the neighboring obligation case pass through their later assertions. Python compilation and `git diff --check` pass. Local Ruff checks could not run because the prepared environment has no `ruff` executable; PR CI supplies the formatting gate. Closes #4163 — automated triage Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 26, 2026
main's #4144 ends the panel's row in one seat and makes Threads a tab of the On view, without its filters. The branch keeps its On view on top of that: the tabs are On me, On <agent> and Threads, with no Plan tab, since the plan's progress heads On <agent>; each list's chooser stands after the tabs. Threads' Unread filter, which the branch fixed, is gone with the filters; the count of unread threads, now the On me mark's dot, still counts open threads only (`isNews`). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 26, 2026
Main replaced stills' open_threads helper with the shared go_to_threads when Threads became a tab of the On view (#4144); the merge left the branch's ship-threads state naming the removed helper, so stills and probe failed to import. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 26, 2026
…aid New The branch drops the visible New from unread rows in Threads (the dot marks them, and assistive tech still hears New); #4144's header comment and the feature gallery's Threads tour still said each row says New. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 27, 2026
The Leaf panel's row no longer has a Threads control (#4144); Threads opens from the On me mark's tab. Co-Authored-By: Claude Opus 5.5 <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 27, 2026
… words (#3856) On a phone, the back gesture closed nothing Leaf opened: a finger that opened the page menu, the Threads view, Draw mode or a selection had only the panel's ✕ or a tap elsewhere to leave it, and back left the page instead. Now back takes the step Escape would. In an editor whose words the user changed, it closes the editor but keeps those words. The platform turns the back gesture into a close request (HTML, "Close requests and close watchers"; CloseWatcher ships in Chrome 126 and Firefox 149, desktop and Android). `keyboard/close-requests.js` holds one CloseWatcher while Escape has a step to take, read in the repaint frame beside the touch controls, and its close takes that step through the dispatcher (`answerCloseRequest`). With nothing to take the page holds none, so back goes back in history as before. A real Escape keydown the dispatcher answers is canceled, which the spec says ends the close request before any watcher hears it, so a key still takes one step. Native modals and popovers keep their own watchers, and where one opens over the page's watcher while Escape still has a step of Leaf's to take inside it, the watcher is made again above it, so back takes that step before the layer closes, as Escape does. Safari lacks CloseWatcher and keeps today's behaviour. **Back never throws away unsent words.** In an open `lf-draft` editor or a message rewrite, Escape's step is Discard, which nothing undoes. On Android the first back hides the keyboard and the next would discard, so a stray edge swipe would lose the edit. A command row whose `run` throws away unsent words now declares `keep` (`keyboard/bindings.js`), which a close request runs in place of `run`: - `lf-draft`: an unchanged editor closes as on Discard. A changed one closes and leaves its words in the draft store. A notice says "Edit kept", and the closed box's toolbar stays in view saying "unsaved edit" beside Edit, where focus lands. Edit, Resume writing (a row in the panel's menu under a finger) or a reload opens the words again. - A message rewrite: the editor closes keeping its draft. A notice says "Edit kept", and the message's head says "unsaved edit", as it already does for words a reload or a refusal kept. Focus lands on the message's Edit control, not the reply box, whose caret would raise a phone's keyboard and cover the notice. Opening the rewrite or Resume writing finds the words. Both signs' tooltips say "The edit is kept; open it to save or discard" (the rewrite's said "save or cancel"). Escape and the Discard control still discard. A press away from an open draft saves it, as main does since #4270; back, which may be an accidental edge swipe, keeps the words unsaved instead. **A call Max may reverse: back keeps a changed edit and closes the editor.** Rejected: - Back taking no step in a changed editor, which an earlier version of this PR shipped. Chrome and Firefox let a watcher rebuilt after each close catch every back, so this held the user in the editor with only Save, Discard or a tap elsewhere to leave, and nothing on screen said so. An independent review measured 10 of 10 backs caught in a changed draft and in a changed rewrite, and 12 of 12 in plain HTML on Chromium 153, Chrome 155 and Firefox 155. - Back saving the words, as Mod+Enter does, which sends the agent a turn the user didn't ask for. `lf-draft.js` and `message-edit.js` rejected keeping words for Escape because a closed box gave no sign of holding them. Back now gives that sign beside the control that reopens them. The notice is short enough for the panel's seat at 390px; the sign beside the edit control says where to reopen the words. The rule is stated where it is owned: the row field in `bindings.js`, the close path's decision in `close-requests.js`'s header, the owners' headers, the Escape section of `keyboard/AGENTS.md`, and the row reference package authors read in `skills/leaf/references/module-input.md`. The command log names the step a close request ran: "keep" where a row's `keep` ran, not the row's own "Discard" (`answerCloseRequest`). **Every browser test now checks that back keeps words.** Android's back reaches the page only as a close watcher's `close`, which `tests/input_work_watch.js` now treats as an input. `tests/words_watch.js` counts that close as putting typed words away only where the page's storage still holds them, bare or as a JSON string, as Leaf's draft store keeps them. Escape may discard; back may not. So a widget whose Escape discards and which declares no `keep` fails the suite on back. The rule reads storage, not the event's trust, since a script's `close()` or `requestClose()` also fires a trusted close. Evidence, `uv run leaf-dev probe release-notes --touch --viewport 390x844 --journey .tmp/back-journey.py`, which taps the menu, sends a back close request, taps Threads and sends two more: - before: menu stayed open after back; the Threads view stayed open after two backs. - after: the first back closed the menu, the second the Threads view. Tests, in tests/browser/navigation/test_key_scopes.py: - `test_a_back_gesture_takes_the_step_escape_would` (390x844, touch) and `test_escape_takes_one_step_where_a_back_gesture_would_take_it` (a real Escape closes the view and leaves the selection beside it for the next back). Both fail with the painter unwired. - `test_a_back_gesture_never_throws_away_unsent_words[draft|rewrite]`: back closes an unchanged editor. Back on a changed editor closes it, shows "Edit kept" and the "unsaved edit" sign, logs "keep", lands on the Edit control and doesn't go back in history. Reopening finds the words, and Escape then discards. With the runtime that held the user in the editor, both cases fail where the editor should close. With the runtime where back discards (18b1a78), both fail and the words watch reports "typed words left the screen without a key or press". - `test_a_back_gesture_takes_a_step_inside_a_modal_before_the_modal`: with Threads open, a modal whose button declares an Escape command opens; back runs the command and leaves the modal open, the next back closes the modal, the next the view. With the watcher kept from before the modal, the first back closed the modal. In tests/browser/test_render_words_watch.py, `test_words_a_close_request_puts_away_only_words_it_keeps[close-keeps|close-discards]`: a plain page stores its words on input, and a CloseWatcher closes the box, keeping or removing them. With the watch that counted every close, the close-discards case fails (no finding); now both pass. A test-held CloseWatcher, added as an init script so it stands before the page's watchers, takes the close requests the page holds no watcher for. It counts backs that reach history. Ran: test_key_scopes.py, drafts/test_draft_editing.py, drafts/test_sending.py, threads/test_rewrites.py and test_render_words_watch.py (215 passed), the rewrite tests in test_render_threads.py, `pnpm run test:runtime` (559 passed), `node --test tests/watch_owner.test.mjs`, `pnpm run check:browser`. Screenshots at 390x844 touch and 1200x700 show the notice whole, the kept sign beside Edit in a draft and on a rewrite's head, and focus on the rewrite's Edit control after back. After merging main: the two back-gesture walk tests open Threads by the On me mark's tab (`open_threads`), since the panel's row no longer has a Threads control (#4144). `pnpm run test:runtime`, `pnpm run check`, and the back, close-request and words-watch tests pass. `test_a_press_away_from_an_open_draft_saves_it` fails the same way on main (the panel field's placeholder reads "Away c"), so it is not this change's. Not verified: a real Android device (the close request was driven by Chrome's uncanceled-Escape route, which the spec defines as the same request); Firefox's CloseWatcher in a probe; Draw mode and page search by back (both are Escape steps, so they follow, but no test drives them). How far back reaches: HTML lets a page hold one close watcher without user activation, and this design holds at most one at a time, rebuilt after each close. The review above measured Chrome and Firefox catching every back such a rebuilt watcher stands for. A ladder of steps therefore unwinds one back at a time, and back goes to history once nothing Escape would take remains, with nothing holding the user on the page. Also a call Max may reverse: the watcher is held in exported pages too, for widget Escape steps. Part of #4027. **On landing, update** #4027: drop "Android's back gesture closes nothing (the Escape ladder could answer it)" and "an `lf-draft` has no close that keeps the edit". > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 28, 2026
The Threads pointer helper could act on the panel's previous stance after Exit Draw mode had already cleared the mode flag. The retained Exit button becomes On me in the repaint frame: selecting it before that frame and activating it afterward opens the queue, leaving the helper waiting for an On me mark that is now Close. If the frame lands before target selection instead, the helper waits for the vanished Exit. These match the two timeout boundaries recorded in #4229. Wait for queued rendering before choosing the pointer route. The wait resolves the document containing the controls, including embedded pages, and leaves asynchronous preparation independent. This preserves #4144's single-seat interface and #4169's pointer navigation. A controlled-clock browser probe confirmed the retained Exit → On me transition and the queue opened by activating that same node afterward. Six focused cases pass, covering both early-thread variants, Draw-mode chrome, drawing drafts, resolution undo and an embedded page; the two reported cases also pass with 6× CPU throttling. Ruff checks, formatting and Python compilation pass. The original tests passed in 18 concurrent copies before the change too, so those passes alone are not evidence of recovery; the controlled transition establishes the race. <details><summary>Controlled reproduction</summary> On a ready served page, install Playwright's clock before navigation, enter Draw mode and wait for rendering. Pause the clock, then click Exit Draw mode. The document's mode flag is absent, but `.lf-fp-exit` still exists. Keep its element handle, resume the clock and wait for rendering: that same node now has `.lf-fp-on-user`. Clicking the retained handle opens `data-open="queue"` and removes `.lf-fp-on-user`. The helper previously chose its exit branch without waiting for this queued repaint. </details> Closes #4229 — automated triage 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 Leaf panel's row used to end in an On me mark, a Threads mark, and a seat kept empty for the ✕ (#3651). That left a gap at the row's end and cut the status words short. Now the row ends in one seat holding one button. At rest it is the On me mark, with its count and a dot while a thread holds an unread reply. While a view, stance or search is open, it is the way out (Close, Exit Draw mode, Close search…), in exactly the mark's place. The press that opens a view leaves the user on what closes it, and nothing needs room kept. A draft with no way out standing still lets the field reach the row's end (#4105).
Threads is now a tab of the On view (On me · On ‹agent› · Threads · Plan), since On me already lists a thread message that waits on the user (#3666). Its Open/Unread/Drafts/Resolved filters are gone. Open threads come first, each saying New or Draft, then resolved ones under a Resolved heading, as Done items stand under On me. With nothing on the user but an unread reply, the mark opens Threads directly.
g Tandg Mare unchanged.The user chose this design from three candidates on a Leaf exploration page: today's row, the two marks tidied with the ✕ before them, and this one.
What users lose: the open-thread count moves from the row to the Threads tab; Threads by pointer is the mark, then its tab; the On me count is out of sight while a view or stance stands.
Navigating the diff:
browser/runtime/floating-panel.js: the seat (quick,seatHeld, the one button inpaintNow),onTabs/onTab,threadsViewandpressMark. The header records the decision and the rejected alternatives.browser/styles/floating-panel.css: the seat's fixed width; the exit seat and the second mark's rules are removed.lf-sample'sshowThreaddropsstatus: "resolved", which only chose a filter.dev/leaf_dev/browser.py,open_threads, re-exported bytests/render_harness.py); tools that run one checkout's driver against another's runtime (stills,bench-latency, thread snapshots,verify-site) usego_to_threads(g T), which both runtimes share. Tests read the open count through the runtime'sthreadCounts, now on the check API. About 70 test files move to the new selectors; tests whose subject was a filter or the second mark were rewritten for the new behaviour, none deleted.docs/how-it-works.html,docs/threads.html, the two developer galleries andlive-samples.md.Checked:
pnpm run test:runtime,pnpm run check:browser, ruff and pre-commit, and about 40 selected browser tests (opening Threads, the Resolved section, unread news, focus and rings, Draw-mode exit, the drafted field reaching the row's end). A probe onreview-a-planshowed the seat's position and width unchanged at rest, in On me, in Threads, after Close and in Draw mode.