Repository navigation
Keep Resolve and Reopen live, and press every bundled control with its answer held - #4608
Merged
Merged
Conversation
A resolve or reopen marked its thread as settling until the server answered. While it was set, the card's and panel's settle button wore a busy or disabled face for one round trip, a second press was dropped, and replies and edits on the thread were refused. That is the flicker #4516 and #4561 removed from the playground, Done, reaction chips and suggestions, and browser/AGENTS.md says a delivery status is not a gesture's result. The settling mark goes, and with it the thread's `offers` (which only combined `resolved` with it), the busy and disabled faces on both buttons, the drop in `settleThread`, and `pendingForParent`. A press while one is in flight now sends the opposite settlement after it, as the ledger orders them; a reply or edit sends as usual, and a reply reopens the thread as the server already does. `settleThread` waits on its own attempt rather than any settlement of the thread, so a second press doesn't read as the first one still travelling. Behavior changes, with their tests: - Pressing Reopen while the resolve travels sends `unresolve` after `resolve`, instead of nothing (`test_a_settlement_in_flight_leaves_its_opposite_live`, replacing the test that the control stopped being busy once a poll accounted it). - Packages read `thread.resolved` rather than `thread.offers` (module-annotations.md).
…ck --render Four bundled widgets kept their own record of a send in flight: the control under the pointer flickered to a busy cursor or a disabled face for one round trip, and a second press was swallowed. Each was found by hand. `test_pressed_controls.py` now presses every control in every bundled package's worked examples, and the margin entries Leaf draws for them, with the event POST held. A control whose press sends a gesture must keep the cursor and the available, idle face it had before the press, and where the same control stays under the pointer, a second press must send again. Restoring `aria-busy` or an in-flight guard on the playground's submit, or the pre-#4561 lf-suggestion, fails it. The check runs only in the suite, so `page check` and `package check` pay nothing for it. It serves the examples through `widget_quality.served_examples`, split out of `_page_findings`. That path had crashed since #4551: `start_throwaway_page` took the selection tuple but was handed the composed layer, so `package check --render` raised TypeError for every package. It now selects the package as `page init` would, by its installed or bundled name, or else by path.
…es out of throwaway pages The worked examples show no `multiple` group, so the sweep never pressed lf-options' Done; a states page adds one, and reverting #4561's lf-options now fails it. Each package's sweep must press something, except the ones whose examples show no control, so a sweep that loses its controls fails. A throwaway page no longer takes the machine's default theme, so `package check --render` reads the same everywhere.
# Conflicts: # browser/runtime/floating-panel.js # dist/kernel/kernel.json # dist/kernel/leaf.js # dist/kernel/runtime/bundle-data.js
# Conflicts: # browser/runtime/floating-panel.js # dist/kernel/kernel.json # dist/kernel/leaf.js # dist/kernel/runtime/bundle-data.js
leaf-agent
approved these changes
Oct 28, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 29, 2026
…ge (#4660) #4608 added a suite test that presses every bundled widget's controls with the server's answer held. This extends the same check to Leaf's own controls that send a reader's gestures, which stand in the floating panel: On me's answers and to-do Done, and in each thread's view its Resolve or Reopen and its reactions. **The panel sweep.** `tests/journeys/test_pressed_controls.py` (nightly) opens On me, then each thread the Threads view lists, on every corpus page served with its log, and presses every control in the view with the event POST held. Each control must keep its cursor and its available, idle face while its gesture travels, and a second press on the same control must send again. The test also fails if On me lists an item and nothing was pressed, or if any thread's sweep didn't check a Resolve or Reopen, so it can't pass by reaching nothing. All 44 corpus pages pass in about 80 s on four workers. A thread's card in the margin isn't swept: its Resolve and reactions remove the control they were pressed on, so there's no face left to compare. **The shared sweep.** `press_each_control` in `browser/widgets/test_pressed_controls.py` now takes an open page and a selector for the elements whose controls count. It presses the controls a press revealed first, such as a reaction palette's buttons after its trigger. It passes over a control the pointer can't reach. When nothing is left, it presses Escape and calls the caller's `restore`, which reopens a thread's view that a control such as Show on page took away. An earlier version that pressed every control on the whole page reached thread controls only by luck: two runs of one page pressed 39 and 11 controls, and several pages never reached Reopen. Opening each view by its own route makes the reach the same on every run. The package test takes about 8% longer than before. **Bug-back controls.** Each of these broken versions made a sweep fail: - the panel's Resolve/Reopen showing `aria-busy`, or ignoring a second press; - lf-options' Done showing busy, or ignoring a second press; - the playground's submit showing busy, or ignoring a second press; - lf-suggestion's Undo standing disabled after Accept. **Two failures on main fixed:** - `test_a_pressed_control_keeps_its_face_and_takes_the_next_press[reading]` has failed since #4637 added `reading`, a package with no widgets. The test now expects no presses from a package with no own tags, and two packages drop off its hand-kept list. - `test_an_older_settlement_cannot_repaint_over_a_newer_decision` has failed since #4561, which made lf-suggestion name its decision through the dispatch's `says`. The runtime now announces "Accepted suggested change" when Accept is pressed, so the live region still holds it after the other tab's reject arrives. The test read the live region for the old behavior, where the widget announced in its send's continuation. It now checks what protects the user: once the late accept is answered, the suggestion still shows the reject. It also drops a fixed 100 ms wait. > _This was written by Claude Code on behalf of max-sixty_
This was referenced Oct 29, 2026
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.
#4516 and #4561 made the playground's submit, Done, reaction chips and the suggestion's controls stay live while their gesture travels. This finishes the job for Resolve and Reopen, and adds a suite test that presses every bundled control with the server's answer held, so the next widget that keeps its own "sending" state fails before review.
Resolve and Reopen stay live. A resolve or reopen marked its thread as settling until the server answered. While it was set, the card's and panel's settle button wore a busy or disabled face for one round trip, a second press was dropped, and replies and edits on the thread were refused. The settling mark goes, with the thread's
offers(which only combinedresolvedwith it), the busy and disabled faces, the drop insettleThreadandpendingForParent. A press while one is in flight sends the opposite settlement after it, as the pending ledger orders them; a reply or edit sends as usual, and a reply reopens the thread as the server already does.settleThreadnow waits on its own attempt rather than any settlement of the thread.Every bundled control is pressed with its answer held.
tests/browser/widgets/test_pressed_controls.pypresses each control in each bundled package's worked examples, and the margin entries Leaf draws for them, with the event POST held. A control whose press sends a gesture must keep the cursor and the available, idle face it had before the press, and where the same control stays under the pointer, a second press must send again. A small states page adds amultiplegroup, since no worked example shows Done. Restoringaria-busyor an in-flight guard on the playground's submit, or the pre-#4561lf-suggestionorlf-options, fails it. It runs only in the suite, sopage checkandpackage checkpay nothing for it; each package takes at most about 3.5 s.package check --renderworks again. Since #4551,start_throwaway_pagewas handed the composed layer where it expected the selection, so the check raisedTypeErrorfor every package. It now selects the package aspage initwould, by its installed or bundled name or else by path, with no theme, so the reading is the same on every machine. The sweep serves examples throughwidget_quality.served_examples, split out of_page_findings.Behavior changes, with their tests:
unresolveafterresolve, instead of nothing (test_a_settlement_in_flight_leaves_its_opposite_live, replacing the test that the control stopped being busy once a poll accounted it).thread.resolvedrather thanthread.offers(module-annotations.md).With the render check working, the nightly
test_bundled_widgets_meet_the_widget_quality_checksreports first-box findings forlf-worktree(#4475),lf-timeline(#4476) andlf-dial;test_a_widget_first_paints_the_box_it_presents[diff-*]already fails on main (#4349).