Skip to content

Make a window one value: tab, State and tab_options take a Window - #5274

Merged
max-sixty merged 3 commits into
mainfrom
agent-aaaa21af8644c9d32
Nov 4, 2026
Merged

max-sixty merged 3 commits into
mainfrom
agent-aaaa21af8644c9d32

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

#5268 named every window once in WINDOWS, but tab() still took a size and a touch flag, so each caller split a Window back into its parts, and State and tab_options carried the same pair. Now a window is one value: tab(browser, window, scheme) takes a Window, a state names its own window, and --viewport gives one.

The default 1440×900 window is the named entry macbook ("a 1440px by 900px MacBook content viewport"). desktop stays eval's 1280×800, and laptop would clash with middle ("a 900px by 700px laptop window") and with the render gate, which calls its 1280×720 window "the fixed laptop window". tab, and stills and probe for a state that names no window, open macbook unless told another; leaf-dev journey and bench-latency read its size. The unnamed DESKTOP and PHONE constants are gone. Since eval --viewport offers every named window, eval --viewport macbook now works too.

chosen_window, beside tab_options, replaces the option wrapper and State.window(): --viewport replaces a state's window, and --touch or --no-touch sets the pointer of whichever window the tab opens in.

One behavior changed: a size --viewport spells, such as 600x900, now has a mouse even over a state that names a finger, as a named --viewport window already overrode a state's pointer. Pass --touch for a finger at that size.

The eval's scripted comment and the user agent's decision keep the first selected window's size under a mouse (Run.journey_window), as before. The scripted comment selects with mouse events, and a coarse pointer changes how the composer keeps a selection.

Checks

  • Every state keeps its size and pointer: all 249 states compared with main's STATES, and the named windows' sizes, pointers and descriptions are unchanged.
  • Stills of failed-widget (its own 1600×900), margin-gallery (phone, finger), breakout-captions-scrolled (phone size, mouse) and plan-panel, by default, at --viewport phone and at --viewport 600x900 --touch: all 16 base.png/head.png captures are pixel-identical to main's tooling.
  • leaf-dev probe reports [390, 844, coarse] for --state margin-gallery, [390, 844, fine] for --viewport phone --no-touch, and [1440, 900, fine] by default.
  • dev/tests/model/test_stills.py covers each way a run chooses a window, and the eval tests near the changed code pass.

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

#5268 named every window once in `WINDOWS`, but `tab()` still took a size and a
touch flag, so each caller split a `Window` back into its parts, and `State` and
`tab_options` carried the same pair. Now `tab(browser, window, scheme)` takes a
`Window`, a state names its own `window`, and `--viewport` gives one.

The default 1440x900 window is the named entry `macbook` ("a 1440px by 900px
MacBook screen"), since eval's `desktop` is 1280x800 and the render gate already
calls its 1280x720 fixed window a laptop. `tab`, stills and probe open it unless
told another, and `leaf-dev journey` and `bench-latency` read its size. The
unnamed `DESKTOP` and `PHONE` constants are gone.

`chosen_window` beside `tab_options` replaces the option wrapper and
`State.window()`: `--viewport` replaces a state's window, and `--touch` or
`--no-touch` sets the pointer of whichever window the tab opens in. One
behavior changed: a size `--viewport` spells, such as 600x900, now has a mouse
over a state that names a finger, as a named `--viewport` window already
overrode the state's pointer. Pass `--touch` for a finger at that size.

Every state keeps its size and pointer (all 249 compared with main), and stills
of failed-widget, margin-gallery, breakout-captions-scrolled and plan-panel,
by default, at `--viewport phone` and at `--viewport 600x900 --touch`, are
pixel-identical to main's tooling.

The eval's comment and decision journeys keep the first selected window's size
under a mouse (`Run.journey_window`), as before: the scripted comment selects
with mouse events, and a coarse pointer changes how the composer keeps a
selection.
@max-sixty
max-sixty merged commit 957d186 into main Nov 4, 2026
4 checks passed
@max-sixty
max-sixty deleted the agent-aaaa21af8644c9d32 branch November 4, 2026 02:00
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