Repository navigation
Wait for the engine's hover before a capture, and take each demo frame once the server's reading lands - #5356
Merged
Merged
Conversation
…-inspector's pointer off the stage
leaf-agent
approved these changes
Nov 4, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
…how the agent's step in demo frame 3 (#5387) Follow-ups to #5356 from its independent review. **A native drag's drop.** `settle` reads where the mouse rests from what each frame records. A native drag sends no `pointerup`, so the record kept the button held from the press and `settle` skipped its hover wait. The record now also takes `dragend`, which every engine sends where the drag drops, with no button held. `pointercancel` would not do: measured on 2026-11-04 it read (0, 0) in Chromium and the button still held in Firefox, and WebKit sent none. After a Playwright `drag_to` in each engine, the record now holds the drop point with no button, and the hover there reads as caught up. **record-demo's title wait.** A "title generated" row whose title the server did not write (`written: false`) left the thread untitled, yet passed the wait; it now fails it. The wait's deadline is now derived as `thread_titles.RETRY_FOR + inference.TIMEOUT` instead of a typed 180 s. **record-demo's frame 3.** The agent now says what it is doing (`cmd_start`, "answering the backfill question") before frame 3, so the frame shows the comment "On it" with the agent's step in the panel, where it showed an empty status line. Two runs of this code drew all eight frames, both README stills and the card identically. The model happened to word the title the same way both times. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 5, 2026
… on Web Awesome views and gallery frames (#5438) In Firefox, `leaf-dev stills` and `probe` could no longer capture `screenshot-pixels`. Since #5393 put the shot's views in a Web Awesome radio group, `settle`'s hover wait either hung or timed out there. Both failures came from #5356's hover check, which this fixes. **The hang.** The hover check read where the mouse had last moved in each of the page's frames, to tell whether the pointer rested inside a child frame. On the gallery page, with 19 frames, reading an `about:blank` frame never returned in Firefox. The check no longer visits frames. A mouse inside a child frame shows in the top document as a hovered `iframe`, so that is what the check now reads, and the per-frame timestamps are gone. **The timeout.** The check followed both the hover chain and the element under the pointer down through open shadow roots. In Firefox those disagree inside a Web Awesome radio button: the host is hovered, but the slot under the pointer isn't. So the hover never counted as caught up. The check now compares the two in the document's own tree, where a shadow host stands for everything its shadow root draws. It no longer sees a stale hover that stays inside one host, which no known state needs. ### Evidence - **Bursts of 8 captures 250 ms apart.** In each of Chromium, Firefox and WebKit, every one of these states drew one image: `screenshot-pixels`, `screenshot-options`, `image-preview`, `film-inspector`, `activity-feed`, `plan-capture` (button held), `diff-file-reply` (pointer in a frame) and `dynamic-request-preview`. `retained-quote` also drew one image in Chromium and WebKit. In Firefox it fails before capture, and it fails the same way with main's `browser.py`. - **The check's own cases, in every engine.** A container whose button scrolled out from under the pointer reads as behind in 12 of 12 readings, until the engine moves the hover. A mouse resting in an iframe reads as caught up. After a native drag, the record holds the drop point. > _This was written by Claude Code on behalf of max-sixty_
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.
A 10-shot sweep of every stills state after #5278 and #5305 found captures that read differently from run to run on the same code. This fixes the causes that live in developer tooling. The causes behind
image-previewandscreenshot-pixelsare unregistered work in the runtime and the default package, and go separately.The hover after a scroll. When a state's driver presses a control and then scrolls, the pointer ends up over whatever scrolled under it. The engine keeps the pressed control hovered until it hit-tests again, on a timer of its own. On this Mac Firefox took about 100 ms, WebKit 20–120 ms, and Chromium about a frame, though under load sometimes longer than the rest of
settle. A capture taken first drew the old hover.settlenow waits until the hover ends at the deepest element under the pointer, then settles again, since the page may answer thepointeroverthe engine sends. So thatsettleknows where the pointer rests, eachtabrecords where a mouse last was in each frame and which buttons it held. A held button keeps the hover where the press began, and a pointer that last moved in a child frame is out of the top document's sight, sosettleleaves both to the engine.settlewaits rather than moving the pointer to where it already is. Such a move sendspointermovein every engine. The merge film answerspointermoveby closing the details its Inspect button opened, so a move turned Chromium's steadyfilm-inspectorcapture, details shown, into one without them.film-inspector. After pressing Inspect, the driver now moves the pointer away before scrolling the film into place. The scroll used to leave the pointer over the stage, which inspects whatever apointermovelands on. WebKit sends one by itself about 100 ms after a scroll, so its capture lost the details.record-demo. The demo'sleaf waitends the moment the comment arrives, so frame 3 read "Ready" or "Away" depending on how far it had got. The agent now takes the comment, acknowledges it and waits again before frame 3, which shows the comment Delivered and the agent at work. Before frame 3 the command also waits for the page server's request for the thread's title to end, so frames 4–5, both README stills and the link card show the model's title rather than "Generating thread name…". The title is still worded afresh each run. Every frame waits until the page has applied the server's current reading, read throughPageClient.state()in place of record-demo's own fetch. No README asset is republished here.Evidence
Each burst is 8 captures 250 ms apart through
browser.screenshot. On this change, with the runtime part applied, each of these states drew one image per burst in Chromium, Firefox and WebKit. On main:film-inspectoractivity-feedscreenshot-optionsplan-capture,plan-capture-drag(button held)A one-capture Chromium sweep of all 201 states with an input, on main and on this change:
settlewaited for the hover in 14 states, and every one of those captures matches main's. 196 captures match; of the rest,page-aboutandshare-linkalso differ between two runs of main, andimage-previewandscreenshot-pixelsare the runtime part's.Two
record-demoruns on this change differ only in the title's wording.Changed behavior
film-inspectorshows the details card in WebKit too; Chromium's and Firefox's captures are unchanged.