Skip to content

Name every window once, beside tab, and read its pointer from it - #5268

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

max-sixty merged 3 commits into
mainfrom
agent-a5425cafff8828705

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

eval's presets, page_defects.yaml's widths and pins.py's VIEWPORTS were three tables of named windows, and arrangement_eval.py and pane_readings.py decided a window's pointer by testing name == "phone". WINDOWS in dev/leaf_dev/browser.py, beside tab, now names every window once, each with its size, whether a finger drives it, and its description. eval --viewport, the page-defect judge and pins read it by name, and every capture, reading and judge instruction takes a window's pointer from its touch flag. --viewport in stills and probe (tab_options) also takes a window's name, which brings its pointer, so --viewport phone replaces --viewport 390x844 --touch; --touch and --no-touch still override it.

Every window keeps its size and pointer:

  • eval generates the same Promptfoo configuration as main, byte for byte, for the whole catalogue (268 tests under both harnesses and all four conditions) at each of 12 selections of windows, from the default alone to all four presets together. What reaches the author and the judges at run time is the same too: the window preference, the report's listing, each comparison's saved widths, and the judge's "Use --mobile for phone".
  • pins reads its 26 cases at desktop (1280×800) and phone (390×844, touch), and its report names the same windows.

Behavior changes:

  • The page-defect judge's three windows keep their sizes and pointers, but their names and descriptions are now the shared ones. Its 1600×1000 window is large rather than wide, and it reads "a large 1600px by 1000px desktop content viewport" rather than "a fullscreen desktop window". The phone reads "a 390px by 844px phone window" rather than "a phone held upright, with touch"; the judge's instructions still say "Use --mobile for phone". The 900×700 window reads "a 900px by 700px laptop window beside other work". The judge labels each defect with these names, which its output schema now takes from the same list. Its grades weren't rerun, so this change doesn't show they are unchanged. One description per window can't keep both this judge's words and the eval author's, and the author's request is the one only fresh authoring runs could re-measure.
  • eval --viewport also offers middle (900×700), the page-defect judge's window, whose description now gives its size as the others do, for an author's request.

thread_snapshots.Case still declares its own windows, since a change to thread snapshots is still under discussion.

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

eval's presets, page_defects.yaml's widths and pins' VIEWPORTS were three tables
of named windows, and two readers decided a window's pointer by its name being
"phone". WINDOWS in leaf_dev/browser.py names each window with its size, touch and
description; eval, the page-defect judge, pins and tab_options' --viewport read it.
Every window keeps its size and pointer; the page-defect judge's windows take the
shared names and descriptions.
leaf-agent
leaf-agent previously approved these changes Nov 4, 2026
…y what --touch overrides

The defect schema still listed wide, so the judge saw a window named large but had
to label a defect there wide. The schema now reads the widths list through a YAML
anchor. --touch's help said a page was otherwise off, which a state's own pointer
contradicts.
@max-sixty
max-sixty merged commit 730b902 into main Nov 4, 2026
4 checks passed
@max-sixty
max-sixty deleted the agent-a5425cafff8828705 branch November 4, 2026 00:52
max-sixty added a commit that referenced this pull request Nov 4, 2026
)

#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_
max-sixty added a commit that referenced this pull request Nov 5, 2026
A re-measurement on 2026-11-05 found 0 of 10 dashboard/write-up authors on main
cramping a dashboard into a workspace, and none with the older guidance under
today's runtime, so the note no longer calls it the likeliest next target. It also
says --viewport desktop opens 1280x800 since #5268.
max-sixty added a commit that referenced this pull request Nov 8, 2026
…losed issues' citations at their work (#5714)

Two changes from the issue triage. The maintainer chose on 8 Nov to land
them.

## A page's trace keeps no password (#4079)

A page's local trace records every typed value, key, paste and selection
for debugging. The maintainer chose on 2026-11-04 to keep that raw
capture. The alternatives were recording only the structural fields
leaf.page's Worker keeps, or recording nothing unless the user turns it
on. So the `TODO(privacy)` note in `interaction_log.py` becomes a record
of that choice.

A password field is the one thing left out. The trace still shows that
the user typed there, and drops the key, code, data, clipboard, value
and selection of each event on it. A field the trace has seen as a
password field stays one, so switching it to a text field to show the
password no longer records what was typed. An independent review had
found that leak in Chromium, Firefox and WebKit. A field inside a closed
shadow root is seen only as its host, which capture at the document
can't change, and `interaction-log.js` says so.

`test_browser_trace_leaves_out_a_password_fields_characters` types into
a password field, toggles it to text, types again and selects the text.
It checks that the trace records the typing and selecting, and none of
the characters.

## What cited the closed issues

The triage closed #4036, #4017, #4781, #4009, #4048 and #4098, so text
that pointed at them now says where their work went:

- The tab test's comment gives the reason a revision above the reader
moves it (a page read from its top keeps its top, `reading-place.js`)
rather than #4036.
- `notes/browser-support.md` moves the Firefox rule rewrite to #5194,
with #4781's other follow-ups.
- `notes/agent-usability-evals.md` says #4017's brief gave way to
`TODO.md`'s first challenge. It also says #4098's workspace failure no
longer reproduces: 0 of 10 dashboard and write-up authors on main
cramped one into a workspace (2026-11-05). And `--viewport desktop`
opens 1280×800 since #5268.
- `notes/threads.md` drops its "Current status" plan, which went with
#4009.
- `leaf-dev journey`'s sample store no longer calls itself a stopgap
until #4048: CI's samples stay in `publish-site`'s run logs.

Nothing changes outside the trace's handling of password fields.

Closes #4079

> _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