Repository navigation
fix: navigate panel tests through the current exit control - #4169
Merged
Merged
Conversation
This was referenced Oct 26, 2026
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 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