Repository navigation
Press the panel's controls with their answer held, on every corpus page - #4660
Merged
Merged
Conversation
The press check in browser/widgets/test_pressed_controls.py covered each bundled package's widgets. Leaf's own controls that send a reader's gestures 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. A new nightly test, journeys/test_pressed_controls.py, opens On me and then every thread the Threads view lists on each corpus page, served with its log, and presses every control in the view with the event POST held. It asserts the sweep pressed something wherever On me lists an item, and checked a settlement on every thread. All 44 corpus pages pass, in about 80 s on four workers. The sweep is shared with the package test. It now takes an open page and a selector for the elements whose controls count, presses the controls a press revealed first (a palette's reactions after its trigger), passes over a control the pointer can't reach, and once nothing is left presses Escape and calls the caller's restore, which reopens the thread's view a control such as Show on page took away. The package test's run time is within 10% of before. A thread's card in the margin is not swept: its Resolve and reactions take away the control they were pressed on, so there is no face to compare. Each control was confirmed by a failing run: the panel's settle wearing aria-busy or ignoring a second press while its gesture travels, and in the package test, lf-options' Done and the playground's submit doing either, and lf-suggestion's Undo standing disabled after Accept. The package test also stops expecting controls from a package with no widgets, which fixes its `[reading]` case on main since #4637.
test_an_older_settlement_cannot_repaint_over_a_newer_decision has failed on main since #4561. That change made lf-suggestion name its decision through the dispatch's `says`, so the runtime announces "Accepted suggested change" when the user presses Accept, and 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. The guarantee is the paint: once the late accept is answered, the suggestion still shows the reject. The test now waits for the round trip and reads `data-lf-state` and the hidden new text once, and drops its fixed 100 ms wait.
leaf-agent
approved these changes
Oct 29, 2026
This was referenced Oct 29, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 29, 2026
The undo-settlement test treated retained live-region text as evidence that an older Accept response repainted the suggestion. #4561 moved that announcement into the shared dispatch path, independent of whether the accepted decision still stands. The test now waits for delivery and rendering to complete, then checks the suggestion's state, authored old text and absent Undo offer after releasing the stale response. No runtime behavior changes. #4660 already made the corresponding correction for the newer-Reject case. The remaining undo case reproduced the reported announcement failure before this change; both affected cases pass afterward. Ruff lint, formatting and Python compilation pass. Review and CI follow-up use the queued workflows with `await_ci: false`. Closes #4677 — 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.
#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_controlinbrowser/widgets/test_pressed_controls.pynow 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'srestore, 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:
aria-busy, or ignoring a second press;Two failures on main fixed:
test_a_pressed_control_keeps_its_face_and_takes_the_next_press[reading]has failed since Split Leaf's reading look into a bundled theme a page can decline #4637 addedreading, 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_decisionhas failed since Keep pressed controls live while their gesture travels #4561, which made lf-suggestion name its decision through the dispatch'ssays. 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.