Skip to content

Take record-demo's, refresh-previews', pins' and arrival captures through browser.screenshot - #5305

Merged
max-sixty merged 2 commits into
mainfrom
agent-a0a1364dd696256d1
Nov 4, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-a0a1364dd696256d1

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

record-demo and refresh-previews took their frames with Playwright's caret="hide", which reaches fields in the document and open shadow roots only, so it never hid the composer's caret, drawn inside the text field's closed root: a README GIF frame or catalog preview with the composer focused drew the caret or not depending on where its blink stood. They, leaf-dev pins and the arrangement eval's arrival captures now take each capture through browser.screenshot, the function stills and probe use since #5278, which draws every caret steadily in Chromium. screenshot returns the PNG rather than writing it to a path, so a caller that composes frames, as record-demo's GIF and refresh-previews' JPEGs do, takes it the same way as one that saves a file.

These captures drop animations="disabled". Each opens its tab with tab's reduced motion, under which the theme's guard (state.css) and the runtime (motion.js, motionPlays) play no motion, and no catalog page runs motion of its own at rest, so the option finished nothing: main's frames and this change's differ only in the caret.

record-demo waited for the floating panel to say "Moved to During" after its board move. Since #4323 a widget's gesture raises no notice (notifications.js), so on main the command timed out there. Its last frame now waits for the page to apply the server's reading of the move, which it already waited for after the frame.

A republish changes what the images show in one way: in Chromium a focused field's caret is drawn in every capture, where it was drawn in about half of them. That covers the README GIF's composer and thread reply frames, the README's two stills and the site's link card, whose reply field has focus, and any catalog preview whose field has focus.

Checked under taskpolicy -b, each capture taken 8 times 250 ms apart:

  • record-demo's composer frame and thread reply frame: on main the caret came and went within each burst (5 of 8 captures drew it in both); here all 8 drew it, and each burst was one image. The run completes and writes the GIF and its three stills.
  • refresh-previews of review-a-plan and triage-board with the composer focused, main's capture call and this one in the same run: main's drew 2 images of each page, differing only in a 1 by 17 px caret; this one drew 1, identical to main's capture with the caret.
  • leaf-dev pins and an arrangement-eval arrival capture through the new path; dev/tests/model/test_stills.py.

Thread snapshots, eval_ui_review.py and widget_format_eval.py keep their own captures while the user decides what becomes of them.

This was written by Claude Code on behalf of max-sixty

…ough browser.screenshot

record-demo and refresh-previews took their frames with Playwright's `caret="hide"`, which reaches fields in the document and open shadow roots only, so it never hid the composer's caret, drawn inside the text field's closed root: a README GIF frame or catalog preview with the composer focused drew the caret or not depending on where its blink stood. They, `leaf-dev pins` and the arrangement eval's arrival captures now take each capture through `browser.screenshot`, the function stills and probe use since #5278, which draws every caret steadily in Chromium. `screenshot` returns the PNG rather than writing it to a path, so a caller that composes frames, as record-demo's GIF and refresh-previews' JPEGs do, takes it the same way as one that saves a file.

These captures drop `animations="disabled"`. Each opens its tab with `tab`'s reduced motion, under which the theme's guard (`state.css`) and the runtime (`motion.js`, `motionPlays`) play no motion, and no catalog page runs motion of its own at rest, so the option finished nothing: main's frames and this change's differ only in the caret.

record-demo waited for the floating panel to say "Moved to During" after its board move. Since #4323 a widget's gesture raises no notice (`notifications.js`), so on main the command timed out there. Its last frame now waits for the page to apply the server's reading of the move, which it already waited for after the frame.

A republish changes what the images show in one way: in Chromium a focused field's caret is drawn in every capture, where it was drawn in about half of them. That covers the README GIF's composer and thread reply frames, the README's two stills and the site's link card, whose reply field has focus, and any catalog preview whose field has focus.

Checked under `taskpolicy -b`, each capture taken 8 times 250 ms apart:

- record-demo's composer frame and thread reply frame: on main the caret came and went within each burst (5 of 8 captures drew it in both); here all 8 drew it, and each burst was one image. The run completes and writes the GIF and its three stills.
- refresh-previews of review-a-plan and triage-board with the composer focused, main's capture call and this one in the same run: main's drew 2 images of each page, differing only in a 1 by 17 px caret; this one drew 1, identical to main's capture with the caret.
- `leaf-dev pins` and an arrangement-eval arrival capture through the new path; `dev/tests/model/test_stills.py`.

Thread snapshots, `eval_ui_review.py` and `widget_format_eval.py` keep their own captures while the user decides what becomes of them.

> _This was written by Claude Code on behalf of max-sixty_
@max-sixty
max-sixty merged commit 8cd0082 into main Nov 4, 2026
4 checks passed
@max-sixty
max-sixty deleted the agent-a0a1364dd696256d1 branch November 4, 2026 07:07
max-sixty added a commit that referenced this pull request Nov 4, 2026
…e once the server's reading lands (#5356)

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-preview` and `screenshot-pixels` are 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. `settle` now waits until the hover ends at the deepest element
under the pointer, then settles again, since the page may answer the
`pointerover` the engine sends. So that `settle` knows where the pointer
rests, each `tab` records 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, so `settle` leaves both to the engine.

`settle` waits rather than moving the pointer to where it already is.
Such a move sends `pointermove` in every engine. The merge film answers
`pointermove` by closing the details its Inspect button opened, so a
move turned Chromium's steady `film-inspector` capture, 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 a
`pointermove` lands on. WebKit sends one by itself about 100 ms after a
scroll, so its capture lost the details.

**`record-demo`.** The demo's `leaf wait` ends 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 through
`PageClient.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:

| state | distinct images of 8 on main (Chromium, Firefox, WebKit) |
|---|---|
| `film-inspector` | 1, 1, 2 (WebKit's details close after the first) |
| `activity-feed` | 1, 2, 1 |
| `screenshot-options` | 1, 1, 1 in this run; Firefox varied in the
earlier sweep |
| `plan-capture`, `plan-capture-drag` (button held) | 1, 1, 1 |

A one-capture Chromium sweep of all 201 states with an input, on main
and on this change: `settle` waited for the hover in 14 states, and
every one of those captures matches main's. 196 captures match; of the
rest, `page-about` and `share-link` also differ between two runs of
main, and `image-preview` and `screenshot-pixels` are the runtime
part's.

Two `record-demo` runs on this change differ only in the title's
wording.

### Changed behavior

- A state's capture shows the hover where the pointer rests, in every
engine.
- `film-inspector` shows the details card in WebKit too; Chromium's and
Firefox's captures are unchanged.
- record-demo's frame 3 shows the comment Delivered and the agent at
work, where it showed "Ready" or "Away".

> _This was written by Claude Code on behalf of max-sixty_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants