Skip to content

Hold every tab of the corpus to the finger floor at phone width - #3902

Merged
max-sixty merged 8 commits into
mainfrom
grind/e-phone-aim
Oct 27, 2026
Merged

max-sixty merged 8 commits into
mainfrom
grind/e-phone-aim

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Hold every tab of the corpus to the finger floor at phone width

The corpus's aim sweep read only the first tab at 1200px, so a control that a page's own CSS shrank below the 44px --aim-floor at 390px, or that stood in a later tab, escaped it. Three examples did (#3875), and the feature gallery's panel presets, which this change fixes the same way (wrapped rows keep the buttons' reach clear of the row above).

What changed

  • Sweep. test_the_layer_holds_its_whole_page_rules_on_the_corpus resizes to 390px last, then opens every tab and every tab inside it once under touch emulation and reads the aims of each (short_aim_findings_in_every_tab). One corpus page, no new page opens. Findings name the tab they stood in.
  • Reading. aims.js skips controls inside hidden panels (stale boxes, not laid out) and no longer treats a tab strip's aria-hidden paging edge as a control standing over the tab scrolled beneath it; both read as 0x0 tabs once a strip scrolled. The exemption holds only for an aria-hidden box inside a control that contains the covered one (the tablist holding its tab), so a neighbouring button's decorative aria-hidden icon still counts as an overlap. Findings also name the owning element's id.
  • File editor. Retry and the conflict menu were 44x32 under touch: their press spans the one-line header, which was too short. The status slot is now max(1lh, --aim-floor - 2 * head padding), so the header grows to the floor under a coarse pointer only. A new browser test opens the editor at 390px under touch, fails a save, then conflicts it, and reads the aims of each state. It fails with 44x32 lf-file-editor-retry on the old slot.
  • Feature gallery #bg-panel-presets: 110x34, 64x34, 81x34 buttons; fixed with the Give a finger its floor on three examples' own controls at phone width #3875 gap.
  • Playground presets (packages/playground/widgets.css): lf-playground, which landed after this branch was written, wraps its preset buttons with an 8px gap, so the sweep found two at 34px (data-explorer, notification-playground). Its row gap now keeps the same reach room.

The sweep passes on top of #3875, which fixed code-comparison, data-explorer and github-discoveries and has landed.

Survey (every shipped example, 390x844 touch, every tab)

Owner Controls State
example CSS: code-comparison, data-explorer, github-discoveries 2 + 1 + 8 fixed in #3875
example CSS: feature-gallery presets 3 fixed here
playground widget, wrapped presets 2 fixed here
file-editor widget, Retry and conflict 2 fixed here (only in failure/conflict states)
tab strip paging edge reading 0x0 3 examples + corpus checker artifact, fixed in aims.js
trace image-scale, repo-feed in hidden panels stale boxes checker artifact, fixed in aims.js

No theme-owned undersized controls remain.

Cost

The corpus journey test went from 37 s (resized, sweep off) to 73 s with the sweep on (about 150 tab openings, about 25 s). Measured on a busy shared machine with uv run pytest tests/journeys/test_render_gate.py -k holds_its_whole_page_rules --run-main -n 0.

On CI's Linux runner the cost is larger: the test's call took 499 s on this PR's run (test job), against 158 s in the 2026-10-26 nightly without the sweep, so the sweep adds about five to six minutes to whichever job runs it.

An authored-page check

Not added (needs precision and recall evidence first). Of the 16 undersized controls this found, 14 were example CSS visible at rest in some tab (an authored-page check at 390px under touch would have flagged them), and 2 were widget states (file-editor failure and conflict) that no at-rest page check sees. No precision data.

Ran

  • tests/browser/test_render_files.py (7 passed)
  • tests/journeys/test_render_gate.py -k holds_its_whole_page_rules --run-main (passed; fails naming the three gallery presets with the gallery fix removed)
  • pre-commit on the changed files

Not run: the rest of the suite, a Firefox or WebKit reading.

Opening tabs by script raised a ResizeObserver "undelivered notifications" window error once or twice per sweep, on different tabs (review-a-fix, rust-sort) between runs. As navigate does, the sweep sets a first sighting aside, opens that tab afresh (away to a sibling and back), and reports the tab if the notice recurs. A recurring notice fails the gate; none recurred in the last run. I did not chase the cause of the first sightings.

Part of #4023.

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

max-sixty and others added 2 commits October 24, 2026 21:49
The examples' own CSS left controls under a finger's 44px floor at
390px, where the corpus check (`short_aim_findings`, read at 1200px)
never looks:

- `github-discoveries` sets its feed chips to `min-block-size: 42px`
  below 560px, which outranks the theme's floor; it now folds the floor
  in with `max(42px, var(--aim-floor))`, as surfaces.css asks of a rule
  that states its own minimum.
- `code-comparison`'s toolbar and `data-explorer`'s filter actions wrap
  `.lf-btn` rows with an 8px or 6px gap. Under a finger each button's
  reach stands 5px past its 34px face, so the rows' reaches overlapped
  and the aim sweep counted each button at its 34px face. Their rows now
  keep `2 * var(--lf-reach-room)` between them, which is 0 under a mouse.

Evidence: the aim sweep (`tests/page_scripts/aims.js`, `flooredAims`
and `offeredAims`) run by `uv run leaf-dev probe <example> --touch
--viewport 390x844 --js …` found 8 short chips on github-discoveries, 2
short buttons on code-comparison and 3 on data-explorer before, and none
on any of the three after.

No test: the check that would hold this is the aim sweep at a phone's
width over every example, which doesn't exist yet; on main it would
also report a tab under `lf-tabs`' edge press (dynamic-widgets) and the
file editor's Retry at 32px (developer/file-editor).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The corpus's aim sweep read only the first tab at 1200px, so a control that a
page's own CSS shrank below the 44px `--aim-floor` at 390px, or that stood in
a later tab, escaped it: three examples did (#3875), and the feature gallery's
panel presets, which this change fixes the same way.

The corpus gate now resizes to 390px last and opens every tab, and every tab
inside it, once under touch emulation, reading the aims of each. It adds about
25 s to the corpus journey test (73 s against 37 s measured on the same
machine, with the gallery fixed). The sweep skips controls inside `hidden`
panels, whose boxes are stale rather than laid out, and no longer counts a
tab strip's aria-hidden paging edge as a control standing over the tab
scrolled beneath it; both had made tabs read as 0x0 once a strip scrolled.

The file editor's Retry and conflict controls were 32px tall under touch: their
press spans the one-line header, which was too short. The status slot is now as
tall as the floor leaves after the header's padding, under a coarse pointer
only (`--aim-floor` is 24px otherwise). A browser test opens the editor at
390px under touch, fails a save and then conflicts it, and reads the aims of
each state; it fails with 44x32 on the previous slot.

Includes #3875's commit so the sweep passes; drop it from this branch once that
lands.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] In tests/page_scripts/aims.js, the new early return in reachedBy hides genuine button overlaps.

[P2] Apply the exemption to the covering control, rather than its decorative child. With two 44×44 buttons at left offsets 0 and 40px, putting a full-size <span aria-hidden="true"> inside the second makes flooredAims("button") return no findings. Removing only aria-hidden reports the first button as 0x0 ... under span. I reproduced both in Chromium: the overlap still takes the first button's edge presses, but this early return hides it. Walking to the covering control first preserves the paging-edge exemption without exempting ordinary icon buttons.

    // A covering control hidden from the accessibility tree can be an alternate
    // pointer route, as a tab strip's paging edge is. Its decorative children alone
    // do not exempt a visible control from the overlap check.
    for (let at = pressed(x, y); at; at = at.parentNode || at.host) {
      if (at === el) return false;
      if (at.nodeType !== 1 || !at.matches(PRESS)) continue;
      return !closestAcross(at, '[aria-hidden="true"]') && !overlay(el, at);

The tab sweep set aside every ResizeObserver notice, so a real resize loop on
opening a tab would have passed. Like `navigate`, it now treats a first sighting
as the platform's notice, opens the tab afresh (away to a sibling and back), and
reports the tab if the notice comes again.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
max-sixty added a commit that referenced this pull request Oct 25, 2026
The backlog is now GitHub issues labelled `backlog`. Every item under
Now, Next and Etc in `TODO.md` became one issue, so a pull request that
says `Closes #N` links itself to its item, and a session finds untaken
work with a query instead of reading a file that has no claim signal.
#4000 landed first, so none of the new issues started a triage run (all
82 `tend-triage` runs were skipped).

**Query.**

```bash
gh issue list --search "label:backlog label:now -label:waits-on-user -linked:pr"
```

then `label:next` and `label:etc`. `-linked:pr` leaves out issues a pull
request already links with a closing keyword.

**What moved where.**

- 82 issues from #4007 to #4089 (#4067 is another session's), one per
bullet. Each is labelled `backlog` and its priority: 13 `now`, 29
`next`, 40 `etc`. Now and Next items also carry a theme mapped from
their `###` heading: `ux` (User experience; User continuity and mobile
access), `agent-experience` (Agent and author experience; The agent's
text interface), `layout` (Layout; Layout stability; Queues),
`review-tools` (Before/after comparison; Recorded interaction review)
and `dev-velocity`. Etc's two headings, Product and harness ideas and
Implementation candidates, sort kinds rather than subjects, so those
items carry no theme.
- 14 items also carry `waits-on-user`, the "Waits on the user" marking
from #3891 (`todo-review`), and their bodies take that branch's wording,
including its rewrite of the held-news item as "Keep a held-news count
whole as it grows" (#3459 landed the "+N" route). `TODO.md` says what
the label means, and the query above leaves those items out.
- After the migration, #3891's author asked for three more edits from
the grind PRs that touch these items: #4039 is retitled "Decide whether
Pixels should soften redrawn-shadow fringes" (#3838), #4039 and #4048
(#3840) also carry `waits-on-user`, and #4098, "Keep a window preference
from cramping a dashboard into a workspace", is the item #3913 puts in
place of #4033.
- Each title is the bullet's bold outcome. For the bullets whose bold
text is a label ("Multiplayer:", "MCP Apps:"), the title adds the
bullet's first clause.
- Each body is the bullet's text with its hard wraps joined (GitHub
renders a single newline as a line break), relative links made absolute,
and `notes/` paths linked. A footer gives the bullet's `TODO.md`
permalink, its heading, its position within its priority, the old `TODO
#N` id for the six that had one, and the theme section's introduction
where there was one. #4014's mention of the reply-widgets item now links
#4089.
- `TODO.md` keeps "Biggest current challenges" unchanged. Its priority
explanation now says the items live in issues, what the labels mean, and
how to query them.
- `/developing-leaf` gains "Take a backlog item": pick an unclaimed
issue that isn't waiting on the user, and open the PR early with `Closes
#N`. It points at `TODO.md` for the query, so the rule and the query
each have one home.
- Every reference to a current `TODO.md` item now names its issue:
`AGENTS.md`'s repository map, `/developing-leaf`, the thread snapshot
skips, `journey.py`, `thread_snapshots.py`, `llm.py`, `test_tabs.py`,
the Worker, two eval comments and five notes.
- #3891's two note edits come along (`notes/browser-support.md`'s
recheck rule, `notes/user-feedback-responsiveness.md`'s retired tone
lever), since #3891 will drop its `TODO.md` changes.

**Order.** Each issue's footer records its old position ("item 6 of 13
in Now"). I didn't keep an ordered index in `TODO.md`: it would be a
second list of the backlog that every new issue has to be added to by
hand, and it would drift from the labels. The priority label is the
ordering that stays current.

**Duplicates.** None of the 15 open issues duplicated an item, so every
item is a new issue.

**Mapping.** The old-item-to-issue table, with open PRs whose titles
match an item, is below; the same table is at
`~/.tmp/leaf.agent-afd0a8c0d63089ed9/backlog-mapping.md`.

<details><summary>82 items</summary>

| Issue | Priority | Old position | Old id | Title | Possible PRs |
|---|---|---|---|---|---|
| [#4007](#4007) | now › User
experience | 1 (TODO.md line 43) | | Make complete reading journeys feel
coherent | #3860, #3865 |
| [#4008](#4008) | now › User
experience | 2 (TODO.md line 47) | | Keep the Thread hierarchy clear | |
| [#4009](#4009) | now › User
experience | 3 (TODO.md line 49) | | Keep a long Thread's current status
visible | |
| [#4010](#4010) | now › User
experience | 4 (TODO.md line 53) | | Test annotation placement in
context (waits-on-user) | |
| [#4011](#4011) | now › User
experience | 5 (TODO.md line 57) | | Make the next move and its result
apparent | #3879 |
| [#4012](#4012) | now › User
experience | 6 (TODO.md line 62) | TODO #28 | Finish the floating panel
(waits-on-user) | |
| [#4013](#4013) | now › User
experience | 7 (TODO.md line 69) | | Keep a held-news count whole as it
grows (waits-on-user) | |
| [#4014](#4014) | now › User
experience | 8 (TODO.md line 80) | | Stop moving live content between
parents | |
| [#4015](#4015) | now › Agent
and author experience | 9 (TODO.md line 94) | | Wake idle Codex desktop
chats without user messages | |
| [#4016](#4016) | now › Agent
and author experience | 10 (TODO.md line 99) | | Consider a reminder
when revising decided content (waits-on-user) | |
| [#4017](#4017) | now › Agent
and author experience | 11 (TODO.md line 104) | TODO #20 | Act on the
plain HTML comparison | |
| [#4018](#4018) | now › Agent
and author experience | 12 (TODO.md line 118) | | Keep delegated work in
the panel's status on Codex and Pi | #3854 |
| [#4019](#4019) | now › Agent
and author experience | 13 (TODO.md line 123) | TODO #24 | Measure time
to an initial reviewable page and the value of review | |
| [#4020](#4020) | next | 1
(TODO.md line 149) | | Add a host-owned widget LLM allowance
(waits-on-user) | |
| [#4021](#4021) | next › User
continuity and mobile access | 2 (TODO.md line 159) | | Bring back a
rewrite Escape discarded | #3862 |
| [#4022](#4022) | next › User
continuity and mobile access | 3 (TODO.md line 163) | | Decide when a
page merits a separate phone composition (waits-on-user) | |
| [#4023](#4023) | next › User
continuity and mobile access | 4 (TODO.md line 169) | | Improve
maintained examples through a phone-quality queue | #3869, #3899, #3902
|
| [#4024](#4024) | next › User
continuity and mobile access | 5 (TODO.md line 175) | | Decide whether
Back may restore a leaf.page page whole (waits-on-user) | |
| [#4025](#4025) | next › User
continuity and mobile access | 6 (TODO.md line 182) | | Consider
automatic Leaf recovery on resume | |
| [#4026](#4026) | next › User
continuity and mobile access | 7 (TODO.md line 185) | | Verify the
native phone reading journey | |
| [#4027](#4027) | next › User
continuity and mobile access | 8 (TODO.md line 189) | | Finish what a
phone user still cannot reach | #3856, #3868, #3874, #3875 |
| [#4028](#4028) | next › User
continuity and mobile access | 9 (TODO.md line 199) | | Reconsider
thread navigation (waits-on-user) | |
| [#4029](#4029) | next › Layout
| 10 (TODO.md line 224) | | Show returning threads without moving the
current reading | #3883 |
| [#4030](#4030) | next › Layout
| 11 (TODO.md line 229) | | Let a page restyle Leaf's chrome on purpose
(waits-on-user) | |
| [#4031](#4031) | next › Layout
| 12 (TODO.md line 235) | | Let a block be a workspace | |
| [#4032](#4032) | next › Layout
| 13 (TODO.md line 245) | | Show each floating surface across the
content it can hold | |
| [#4033](#4033) | next › Layout
| 14 (TODO.md line 275) | | Test the Layouts on agents | #3913 |
| [#4098](#4098) | next › Layout
| 14, added by #3913 in #4033's place | | Keep a window preference from
cramping a dashboard into a workspace | |
| [#4034](#4034) | next › Layout
| 15 (TODO.md line 285) | | Layout values that wait for a task:
list-detail on a phone, canvas regions, slides | |
| [#4035](#4035) | next › Layout
| 16 (TODO.md line 288) | | Decide whether a too-narrow table fails a
page at the fixed widths (waits-on-user) | |
| [#4036](#4036) | next › Layout
stability | 17 (TODO.md line 298) | | Keep what a live revision adds
above the reader from moving it | |
| [#4037](#4037) | next › Layout
stability | 18 (TODO.md line 304) | | Keep the merge film's controls
still as it steps | |
| [#4038](#4038) | next › Queues
| 19 (TODO.md line 314) | | Keep the open item's group named on a phone
| #3853 |
| [#4039](#4039) | next ›
Before/after comparison | 20 (TODO.md line 323) | TODO #29 | Decide
whether Pixels should soften redrawn-shadow fringes (waits-on-user; was
"Explain the faint amber halo in Pixels") | #3838 |
| [#4040](#4040) | next ›
Recorded interaction review | 21 (TODO.md line 333) | | Explore DOM
selection in the imported timeline | |
| [#4041](#4041) | next › The
agent's text interface | 22 (TODO.md line 343) | | Decide the Leaf-owned
defects the bad-pages eval left open (waits-on-user) | |
| [#4042](#4042) | next › The
agent's text interface | 23 (TODO.md line 350) | | Read the full render
gate after handover | #3888 |
| [#4043](#4043) | next › The
agent's text interface | 24 (TODO.md line 366) | | Consider loading a
page once per render check (waits-on-user) | |
| [#4044](#4044) | next › The
agent's text interface | 25 (TODO.md line 372) | | Derive the waiting
status from the page's open obligation | |
| [#4045](#4045) | next ›
Development velocity | 26 (TODO.md line 380) | | Require `test` on
`main` again (waits-on-user) | |
| [#4046](#4046) | next ›
Development velocity | 27 (TODO.md line 386) | | Resume the thread
appearance gate (waits-on-user) | |
| [#4047](#4047) | next ›
Development velocity | 28 (TODO.md line 394) | | Guard thread appearance
on CI again | #3896 |
| [#4048](#4048) | next ›
Development velocity | 29 (TODO.md line 404) | | Keep the agent
journey's samples (waits-on-user) | #3840 |
| [#4049](#4049) | etc › Product
and harness ideas | 1 (TODO.md line 420) | | Consider Redo and a Changes
panel | |
| [#4050](#4050) | etc › Product
and harness ideas | 2 (TODO.md line 433) | | Link filenames to their
repository context | |
| [#4051](#4051) | etc › Product
and harness ideas | 3 (TODO.md line 438) | | Revisit the Claude desktop
app opening a page's file over the live page | |
| [#4052](#4052) | etc › Product
and harness ideas | 4 (TODO.md line 448) | | Decide the site's structure
before release | |
| [#4053](#4053) | etc › Product
and harness ideas | 5 (TODO.md line 451) | | Assess whether automatic
measurement freshness is useful | |
| [#4054](#4054) | etc › Product
and harness ideas | 6 (TODO.md line 457) | | Revisit where an abandoned
comment's words come back | |
| [#4055](#4055) | etc › Product
and harness ideas | 7 (TODO.md line 462) | | Revisit a pin's icons if
they read unclearly | |
| [#4056](#4056) | etc › Product
and harness ideas | 8 (TODO.md line 466) | | Revisit the reaction
tokens' meanings or glyphs if they confuse | |
| [#4057](#4057) | etc › Product
and harness ideas | 9 (TODO.md line 471) | TODO #30 | Try a feed of
ready-to-approve actions | |
| [#4058](#4058) | etc › Product
and harness ideas | 10 (TODO.md line 477) | | Explore independent jobs |
|
| [#4059](#4059) | etc › Product
and harness ideas | 11 (TODO.md line 480) | | Tell the agent when to ask
before ending its own to-do | |
| [#4060](#4060) | etc › Product
and harness ideas | 12 (TODO.md line 485) | | Let the user edit items in
the On view | |
| [#4061](#4061) | etc › Product
and harness ideas | 13 (TODO.md line 489) | | Multiplayer: let several
users share a page, each recorded as themselves | |
| [#4062](#4062) | etc › Product
and harness ideas | 14 (TODO.md line 495) | | Show which pane has focus,
and move between panes by key | |
| [#4063](#4063) | etc › Product
and harness ideas | 15 (TODO.md line 508) | | Expand everything waiting
with a keypress | |
| [#4064](#4064) | etc › Product
and harness ideas | 16 (TODO.md line 514) | | Let a user add, remove and
edit table rows | |
| [#4065](#4065) | etc › Product
and harness ideas | 17 (TODO.md line 519) | TODO #16 | Named widget
interfaces: let a typed reference name the interface its target
implements | |
| [#4066](#4066) | etc › Product
and harness ideas | 18 (TODO.md line 523) | | Visual review beside Leaf:
coordinate a real browser target through the harness | |
| [#4068](#4068) | etc › Product
and harness ideas | 19 (TODO.md line 526) | | Other harnesses: add a
blocking `leaf wait` route when another harness needs it | |
| [#4069](#4069) | etc › Product
and harness ideas | 20 (TODO.md line 528) | | Consider Leaf running the
agent session | |
| [#4070](#4070) | etc › Product
and harness ideas | 21 (TODO.md line 533) | | Decide whether an exported
page carries its threads | |
| [#4071](#4071) | etc › Product
and harness ideas | 22 (TODO.md line 540) | | Character bindings: let
users disable them | |
| [#4072](#4072) | etc › Product
and harness ideas | 23 (TODO.md line 541) | | Replacement diffs and
visual masks for repeated reviews | |
| [#4073](#4073) | etc › Product
and harness ideas | 24 (TODO.md line 543) | | Motion evidence: define
video, caption and transcript handling | |
| [#4074](#4074) | etc › Product
and harness ideas | 25 (TODO.md line 545) | | Revisit long-thread
folding after using summaries | |
| [#4075](#4075) | etc ›
Implementation candidates | 26 (TODO.md line 551) | | Remove the
early-key hold once startup is fast on slower machines too | |
| [#4076](#4076) | etc ›
Implementation candidates | 27 (TODO.md line 578) | | Draw the margin's
annotations once per thread pass | #3864 |
| [#4077](#4077) | etc ›
Implementation candidates | 28 (TODO.md line 587) | | Read moves exactly
where the before/after pair is a browser's capture | |
| [#4078](#4078) | etc ›
Implementation candidates | 29 (TODO.md line 597) | | Reduce
plugin-update downloads by cleaning Git history | |
| [#4079](#4079) | etc ›
Implementation candidates | 30 (TODO.md line 605) | | Set
interaction-trace privacy before sharing pages | |
| [#4080](#4080) | etc ›
Implementation candidates | 31 (TODO.md line 610) | | Make a leaf.page
dispatch survive its container | |
| [#4081](#4081) | etc ›
Implementation candidates | 32 (TODO.md line 616) | | Start each
release's containers on its own image | |
| [#4082](#4082) | etc ›
Implementation candidates | 33 (TODO.md line 629) | | Push page updates
instead of polling | |
| [#4083](#4083) | etc ›
Implementation candidates | 34 (TODO.md line 670) | | Claude Code tool
observation: a cheap hook for sessions holding pages | |
| [#4084](#4084) | etc ›
Implementation candidates | 35 (TODO.md line 672) | | Measure Leaf's
hook cost for sessions holding pages | #3876 |
| [#4085](#4085) | etc ›
Implementation candidates | 36 (TODO.md line 677) | | Invoker commands:
test `command` and `commandfor` once Leaf's Chromium floor allows | |
| [#4086](#4086) | etc ›
Implementation candidates | 37 (TODO.md line 681) | | MCP Apps: rebuild
inline hosting as a direct resource | |
| [#4087](#4087) | etc ›
Implementation candidates | 38 (TODO.md line 692) | | Release labels:
prefer an exact tag when Leaf adopts named releases | |
| [#4088](#4088) | etc ›
Implementation candidates | 39 (TODO.md line 693) | | Diff controls:
author-configurable wrapping and per-file review tracking | |
| [#4089](#4089) | etc ›
Implementation candidates | 40 (TODO.md line 695) | | Show a reply's
widgets in every view of it | |

</details>

**Not migrated cleanly.**

- Each section introduction (Layout, Layout stability, Queues, Recorded
interaction review) is copied into every issue of its section, since a
label can't carry it.
- Eval fixtures that quote a past session mentioning `TODO.md`
(`assessment-surfaces-pending-decisions`,
`record-asks-hold-their-premise`, `options-*`) are recorded inputs and
stay as they were. Two eval provenance comments and one line of
`notes/agent-usability-evals.md` name items that left `TODO.md` before
this change, so they have no issue to point at.
- The fold-button entry #3891 corrected is in neither `TODO.md`, and
#3928 fixed it, so it has no issue.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Resolves tests/browser/test_render_files.py by keeping both new tests: this
branch's finger-floor test for the file editor's status controls and main's
classic-scrollbar containment test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty
max-sixty marked this pull request as ready for review October 27, 2026 05:19
max-sixty and others added 4 commits October 26, 2026 22:26
Brings in #3875, which landed, so its example changes leave this branch's diff.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The corpus's phone sweep found lf-playground's preset buttons (data-explorer,
notification-playground) at 34px under a finger: lf-playground, which landed
after this branch, wraps them with an 8px gap, so each row's reach overlapped
the row above. The row gap now keeps 2 * --lf-reach-room, as the feature
gallery's presets do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review found that any aria-hidden box under a press exempted the overlap, so a
neighbouring button's decorative icon hid a real overlap. The exemption now
holds only where the covering control contains the one it covers, as a tab
strip's paging edge lies in the tablist over its own tab. Checked with leaf-dev
probe: alert-review's paging edge stays exempt at 390px, and two overlapping
buttons are reported whether or not the second holds an aria-hidden child.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty
max-sixty merged commit 8d2815d into main Oct 27, 2026
4 checks passed
@max-sixty
max-sixty deleted the grind/e-phone-aim branch October 27, 2026 07:00
max-sixty added a commit that referenced this pull request Oct 27, 2026
…es only in view (#4489)

The phone-width aim sweep from #3902 re-measured the whole corpus after
every tab it opened, and excused the tab strip's paging edge through an
`aria-hidden` special case. This makes the sweep measure each control
once and replaces the special case with the general rule it stood for.

## Cost

`short_aim_findings_in_every_tab` read every control in the document and
every shadow root after each of the corpus's 100 tab openings.
`flooredAims` also ran `aim()` (three `getComputedStyle` calls and
several point probes) on each control before it checked whether the
control sat in a `hidden` panel. Now:

- The sweep reads the whole page once, then after each opening reads
only what that opening shows: the tab's panel and the runtime's chrome
(`body > .lf-chrome`), which holds the margin entries for what the panel
contains. `flooredAims` takes the roots to read.
- `flooredAims` checks `[hidden]`, `visibility` and `pointer-events`
before it measures.
- `aim_selectors()` is parsed once per sweep, not once per reading.

Measured locally, full corpus at 390x844 under touch, sweep only (shift
watch off, as in the journey module):

| | whole sweep | time in `flooredAims` |
| --- | --- | --- |
| main | 63.9 s | 21.9 s |
| this branch | 43.8 s | 0.5 s |

What's left is opening the tabs: `rendered()` after each one takes about
0.43 s, and this change doesn't touch it. CI's runner hasn't timed this
yet.

**Coverage.** To check that coverage didn't change, I ran three variants
with every reading reported, not only the short ones: main's loop with
main's `aims.js`, main's loop with this `aims.js`, and this loop with
this `aims.js`. All three gave the same 373 distinct readings (size,
control, cover, owner). Reading only the panel misses the margin entries
the chrome draws for a newly opened tab (10 readings), which is why the
chrome is read too. One thing is no longer re-read: the outer tab strips
in each scroll position later openings leave them in. The paging-edge
rule below exempts those positions anyway.

## The overlap rule

The tab strip's paging edge is an `aria-hidden` span inside the tablist
(`[data-lf-offer]`), and it covers a tab scrolled beneath it. #3902
excused an `aria-hidden` box only when the control it belonged to
contained the covered control. That condition describes exactly one
widget.

The general rule is that a part of a control outside its scroller's view
is reached by scrolling, just as a part outside the window is reached by
scrolling the page. The checker already applied that rule to the window,
through `shown`. `viewOf(el)` extends it to every scroller holding the
control, the root included. A scroller's view is its scrollport minus
its `scroll-padding` on each side it can still scroll toward. The
`scroll-padding` is how Leaf already declares the band that sticky edges
and headers cover: the strip's paging edge covers exactly its
`scroll-padding-inline`, and the root's covers the head room and a page
tab strip. The checker probes an edge of a face only where that side of
the face lies wholly in view. In the corpus, `#showTab` lands the open
tab 0.19 px into the edge's band, and the edge takes the press there.

Since a view is never larger than the window, the rule only removes
probes. It can drop a finding but never add one, `offeredAims` included.

Checked on a synthetic page with both versions:

- Tabs under a paging edge with `aria-hidden`: main and this branch both
report nothing.
- The same edge without `aria-hidden`: main reports `0x0 button under
span` twice; this branch reports nothing.
- Two side-by-side buttons where one button's `aria-hidden` icon covers
the other's edge (the review case from #3902): both report `0x0 button
under .icon`.

## Resize notices

The sweep had its own copy of `navigate`'s rule for ResizeObserver
notices: a first sighting is the platform's, and one that recurs on a
confirming attempt is a fault. That rule is now
`render_harness.confirming_resize_notices(page, attempt, again=None)`,
and both use it. One behaviour change: a recurring notice during the
sweep is now reported through the browser fixture as a `resize-loop`
finding with `confirmation: recurred`, as `navigate` reports one, not as
a line in the sweep's own assertion. The test still fails.

`test_file_editor_status_controls_take_a_finger_on_a_phone` now reads
only the file editor. With the editor's slot fix from #3902 reverted, it
still fails with `44x32 lf-file-editor-retry`.

## Ran

- The two `test_page_navigation_*_resize_notice*` tests,
`test_file_editor_status_controls_take_a_finger_on_a_phone` and
`test_the_add_field_previews_the_option_it_will_make`: passed.
- The corpus sweep comparison above (a scratch test, not committed).
- The journey's two aim readings (first tab at 1200px, then every tab at
390px) on the corpus, twice, with ResizeObserver notices left strict, in
a scratch test: no findings and no stray notices, 43 s per sweep.
- `pre-commit` on the changed files, `pnpm run check`.

Not run: `tests/journeys/test_render_gate.py` itself. The PR's `test`
job doesn't select it, because `--changed-since` picks later-tier tests
by edits to their own file, and this change leaves that file alone. The
next daily run will run it.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 5, 2026
At 390x844 under a finger, `data-explorer`'s first screen now holds both
filters, the result count, all four columns of the result table and
Build query. Before, the count stood at 878px, under the floating panel,
and the table scrolled sideways with Risk and Owner past its frame's
edge. This is the last live item of the phone-quality queue. Of the four
others, three already pass on current main and one is `lf-tabs`' own
phone design. They are listed below with the measurements behind each
verdict.

This changes desktop too: the row buttons' words are shorter at every
width. `data-explorer` has no catalog still, since it is a link in
`docs/examples.html` rather than a card, so no still shows this change.

This PR also moves the asset pin to max-sixty/leaf-assets@9c3dd34381b8:
`wt refresh-previews` recaptured all 19 catalog stills, and the README's
image URLs follow the pin. None of those differences comes from the
change above. They are look changes landed since the pin last moved on
31 October (#4875). `dynamic-widgets` differs most, in 9% of its pixels,
and the four largest show the same layouts with today's control faces.
No demo image changed. The capture ran on this branch's base, 22accdd.

## What changed

`examples/data-explorer.html`:

- **At every width**, the buttons read "Move up", "Move down" and
"Remove", and each `.query-row` is `role="group"` with
`aria-label="Filter N"`, renumbered as rows move. A button's accessible
name is its visible text, and the group says which filter it acts on.
- **At every width**, the result table drops its `min-width: 30rem`.
- **At 42rem or narrower**, a filter row is flex items sized to their
content. Each select is as wide as its longest option, the fields' side
padding is `--sp-2` (`--wa-form-control-padding-inline`), and Value
(`.query-value`, basis 5rem) takes the rest. So Field, Operator and
Value share one line down to a 360px window, and Value wraps onto its
own line below that. The three buttons take the next line.
- **At 42rem or narrower**, the table is `table-layout: auto`, because
equal columns split words below about a 355px window ("Checko|ut").

`tests/journeys/test_render_widgets.py`: the data explorer journey now
reaches each button through its group by name, and asserts the group's
number follows the row when it moves. It fails with the group role
removed, and with the label following the filter's id instead of its
place.

## Evidence

Stills are under
`/Users/maximilian/.tmp/leaf.agent-a1ac83feeb90a4603/phone-examples/`:

| state | before | after |
| --- | --- | --- |
| 390x844 touch, at rest | `data-explorer-390-before.png` |
`data-explorer-390-after.png` |
| same, dark | `data-explorer-390-dark-before.png` |
`data-explorer-390-dark-after.png` |
| 390x844, after typing 80 into filter 2's value by touch |
`data-explorer-390-before-typing.png` |
`data-explorer-390-after-typing.png` |
| 360x740 and 320x568 touch | not captured |
`data-explorer-360-after.png`, `data-explorer-320-after.png` |
| 320x568 touch, all six releases | not captured |
`data-explorer-320-six-rows-after.png` |
| 1120x700 | `data-explorer-1120-before.png` |
`data-explorer-1120-after.png` |
| 1280x800 | `data-explorer-1280-before.png` |
`data-explorer-1280-after.png` |
| 1440x900 | `data-explorer-1440-before.png` |
`data-explorer-1440-after.png` |
| 844x390 (`playground-short-window`) |
`data-explorer-844x390-before.png` | `data-explorer-844x390-after.png` |

The pairs come from `uv run leaf-dev stills --authored --state
data-explorer` with `--viewport phone` (with and without `--scheme
dark`), `--viewport 1120x700`, `--viewport desktop`, and `--state
playground-short-window`. The measurements come from `leaf-dev probe
data-explorer --viewport phone` (or `--viewport WxH --touch`) with a
journey that taps the value field, fills it and swipes the page with CDP
touch events:

| at 390x844, touch | main | this branch |
| --- | --- | --- |
| "2 releases shown" top | 878px (panel at 782) | 551px |
| table frame client / scroll width | 336 / 480 | 336 / 336 |
| Risk and Owner headers | right edges 377, 436 (frame ends 363) | 254,
313 |
| Build query top | below the fold | 717px |
| after filling 80 by touch | count at 861, off screen | count at 551,
on screen, no scroll |

**Names.** The accessibility tree at every width reads `group "Filter
2"` holding `button "Move up"`, `button "Move down"` and `button
"Remove"`.

**Table.** With the default rows and with all six releases, no word
splits across lines at 320, 340, 355, 360, 390 or 430px in Chromium, nor
at 320, 340 or 390px in Firefox. The frame overflows only at 320px with
no filters, by 1px (limit 4 and 6 in Chromium, limit 6 in Firefox). The
cost of auto layout is that column edges move when the result set
changes. At 390x844, Owner's left edge moves 14px when filter 2's value
goes from 40 to 80, and it spans 18px across the seven result sets read
(15px at 320x568, 17px at 360x740, 20px at 430x932, in Chromium).

**Fields.** Each select holds its longest option ("is above", 62px of
text) at 320, 340, 355, 360, 390 and 430px (inner room 91, 101, 64, 66,
76, 89px).

**Reach.** With a third filter added, the corpus sweep's own aim reader
(`aims.js` `flooredAims` with the selector list from `shadow.css`) finds
no control under the 44px floor at 390x844 or 360x740. At 320x568 it
reports two buttons scrolled under the playground's sticky controls
after Add filter moves focus, and main's page reports two as well.

**Desktop.** The buttons' words change at every width. Where a row wraps
depends on the windows below, read on both arms with `probe --base
--authored`:

| window | row height, main → here | count top, main → here | frame
client / scroll, main → here |
| --- | --- | --- | --- |
| 700x900 | 100 → 100 | 511 → 511 | 646 / 646 → 646 / 646 |
| 800x900 | 100 → 100 | 350 → 350 | 478 / 480 → 478 / 478 |
| 844x390 | 100 → 100 | 358 → 358 | 507 / 507 → 507 / 507 |
| 1000x800 | 100 → 100 | 350 → 350 | 611 / 611 → 611 / 611 |
| 1280x800 | 100 → 62 | 350 → 274 | 798 / 798 → 798 / 798 |
| 1440x900 | 62 → 62 | 274 → 274 | 905 / 905 → 905 / 905 |

So at 1280x800 the shorter buttons fit beside the fields, and the rows
are 38px shorter each. At 800x900 the removed minimum stops a 2px
sideways scroll on main. At 1120x700 the rows keep their shape and only
the words change.

## The rest of the queue, re-measured on main at 390x844 by touch

- **`alert-review`**, no change. The side list becomes a 2357px strip of
14 tabs in a 364px row, which is `lf-tabs`' recorded phone design for a
queue (`packages/default/styles/tabs.css`, "A list beside its panels"):
the open item stays one row down however long the queue. By touch, a
swipe scrolls the strip (scrollLeft 0 → 342 → 1993), each group label
sticks at the row's start, tapping the last tab opens it whole in view,
and Next on me returns to the first open item. Still:
`alert-review-390-unchanged.png`.
- **`code-comparison`**, no change. #4638 moved its controls from the
playground's sticky rail into the preview two days after the issue's
survey. Only the 38px header and 53px tab strip stick now, and the
controls scroll away with the page. Reader A scrolls sideways (312 /
819) because "compact · scroll" is the treatment the page compares.
Still: `code-comparison-390-unchanged.png`.
- **`dynamic-widgets`**, no change. All four `lf-text-document` tab
strips are 340 / 340 with both disclosures open, and nothing on the page
scrolls sideways. Still: `dynamic-widgets-390-unchanged.png`.
- **`github-discoveries`**, no change. No `pre` is 811px wide now. Six
code listings inside the collapsed "Source & details" scroll inside
their own 276px box (widest 590px), and the page doesn't scroll
sideways. A finger swipe on the AX listing scrolls it 212px with no page
scroll. Still: `github-discoveries-390-unchanged.png`.

The issue's second paragraph, touch controls under 32px, was settled in
#3902, whose corpus sweep holds every tab to the 44px floor at 390px.

## What ran

- `uv run pytest -n 2
"tests/journeys/test_render_widgets.py::test_structured_data_explorer_keeps_one_aggregate_query_configuration"
"tests/journeys/test_render_export.py::test_playground_examples_keep_their_offline_interaction_mode[data-explorer]"`:
2 passed. These are the only tests that read the page's selectors and
button names.
-
`tests/journeys/test_render_gate.py::test_page_fixture_renders[data-explorer]`
fails only on "closed surfaces: g opened no go-to". The gate, the phone
resize, scroll and typed-box journeys pass. The same failure appears
with this branch's base (22accdd) version of `data-explorer.html`, and
on `heat-loss`, which this branch doesn't touch, so this branch doesn't
cause it.
- `uv run pre-commit run --files examples/data-explorer.html
tests/journeys/test_render_widgets.py`

## Not verified

- WebKit and a real phone. Chromium and Firefox ran under emulation.
- A voice-control tool: the name fix was checked in the accessibility
tree.
- The whole corpus aim sweep
(`test_the_layer_holds_its_whole_page_rules_on_the_corpus`,
`--run-main`). Its reader ran on this page alone at three widths.
- The other 15 refreshed stills by eye: I read their pixel differences
and looked at the four largest.

## Calls Max may reverse

- `table-layout: auto` on a phone, which takes the column movement
above, up to 20px, in exchange for whole words below 355px. The
alternative keeps equal columns, which hold still and split words below
about 355px.
- The asset pin moves in this PR although its stills are unrelated to
the change. Dropping that commit leaves the stills as they were on 31
October.
- `code-comparison`'s "Comparison viewport" slider changes nothing
visible at a phone for most of its range, because the stage is 314px:
400 and 520 both draw 314px candidates, and only 280 and 300 differ.
Hiding it on a phone would hide a value the instruction still submits,
so I left it and noted it as a follow-up.

Closes #4023

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
max-sixty added a commit that referenced this pull request Nov 10, 2026
Tend's PR review now checks each change against the open backlog and
gets the description to close what the change settles. Where the change
leaves nothing of a `backlog` issue to do, by finishing what remains,
removing its premise or recording a decision against what it asks, the
description says `Closes #N`. Where it does part, the description says
`Part of #N` and what is left, so the review of the last part can tell
that part finishes the issue. On Tend's own pull request the review
edits the description. On someone else's it asks in the review, and the
ask goes in an approval rather than holding one back. The rule is a new
section of `running-tend`, **Issues a change finishes**, after **Review
threshold**.

## Why

Leaf's backlog triage of 2026-11-04 found seven merged pull requests
that did an open backlog issue's work without closing it. Four said
`Part of #N`: #3879, #3902, #3856 and #3868. Three named no issue:
#4487, #4124 and #5039. Nothing asked those three to look, since
`/developing-leaf` asks for `Closes #N` only of a session that starts
from a backlog item. Tend's nightly sweep reads a seventh of the open
issues each night, long after the diff has left the reader's context,
and, by the triage's count, it commented on none of them in ten nights.
The review is the step every change passes with its diff in hand.

The replay below sorts the seven more finely than the triage did. #4011,
#4036 and #4013 were settled by #3879, #4124 and #5039. #3902 did half
of #4023, whose five composition defects stayed open. #3856, #3868 and
#4487 each did one item of #4027, which is still open. For those four
the right description is `Part of #N` with what is left. A `Closes #N`
would have been wrong.

## Replay

Each case gets the rule as this branch ships it, together with
`running-tend`'s **Review threshold** section, which it competes with.
It also gets the PR's title, author, description and diff, capped at 80k
characters with vendored files left out, and every `backlog` issue open
when the PR merged, as it read then. That list is rebuilt from the
issues' creation and close times, label events and body edit history,
plus their comments up to the merge. Each case runs once through a
headless `claude -p` on `claude-opus-5-5` (the review's model), with no
tools, in a scratch home. The JSON verdict is graded against an expected
answer fixed before the run.

| PR | What it did | Expected | Result |
| --- | --- | --- | --- |
| #3879 | the play-through #4011 asked for | close #4011, or part with
its open decision left | pass: part, the decision and the home-page test
left |
| #3902 | #4023's touch-target half | part of #4023 | pass (also part of
#4027) |
| #3856 | #4027's Android back item | part of #4027 | pass |
| #3868 | #4027's Draw mode item | part of #4027 | pass |
| #4487 | #4027's lf-draft back item | part of #4027 | pass |
| #4124 | recorded the call that settled #4036 | close #4036 | **miss**:
read #4036 and judged the call unrelated |
| #5039 | one held-news count, #4013 | close #4013 | pass (also part of
#4012) |
| #5331 | removed #4060's premise | close #4060 | pass |
| #4643, #4718, #4847, #5020, #5252 | nothing in the backlog | nothing |
5 pass |
| #5441, #5446, #5454 | rightly a part of an open issue | that part | 3
pass |
| #4212 | rightly said `Closes #4037` | close #4037 | pass |

That is 6 of the 7 triage cases, the premise case, and 9 of 9 controls.
No run closed or named an issue it shouldn't have. #5020 is a hard
negative: it changes held-news notices, which #4013 is about, and the
run left #4013 alone. #4124's miss held in all three wordings tried. The
triage itself only inferred that the 2026-10-25 call in
`reading-place.js` covers #4036's case.

The clause for a removed premise or a recorded decision goes beyond the
two cases Max named. It is there because the triage closed several
issues as obsolete after a landed change removed their premise. Without
the clause, the #5331 run read #4060 and declined: "It only makes one
sentence of the issue's background out of date". With it, the run closed
#4060.

Two grades were corrected after the first run, each on evidence from the
record. #5252 says `Part of #5194`, but #5194 was labelled `backlog`
only on 2026-11-05, after #5252 merged. #5039 left a count that gains a
digit outgrowing its room, as its own `thread-card.js` comment says, and
#5288 fixed that on 2026-11-04, so `Part of #4013` naming that is also
right at merge time. The final wording closed #4013 anyway.

```sh
uv run python .tmp/replay/replay.py --jobs 4
uv run python .tmp/replay/replay.py --only 5331,4124 --rule-file .tmp/replay/arm-finishes-only.md --runs runs-finishes-only --results results-finishes-only.json
```

The final wording's 17 runs cost $6.75. All runs together cost $19.64,
across three wordings and the two-run ablation. The script, cases,
prompts, answers and results are in `.tmp/replay/` of the worktree that
wrote this PR, not committed. The last run used this text before one
sentence was split in two.

## Decisions Max may reverse

- **Where the rule lives.** It lives in `running-tend`, which only Tend
loads. `/developing-leaf`'s `Closes #N` under **Take a backlog item**
stays as it is. That rule claims an item early: the closing keyword is
what makes `TODO.md`'s `-linked:pr` query skip it. The review then
corrects a claim the change only partly fulfils to `Part of #N`.
Repeating the search in the author's skill would make every Leaf session
pay for a check the review already makes on every PR.
- **How it acts on others' pull requests.** The review asks and doesn't
edit, since the author owns the description and Leaf sessions rewrite it
whole from a file. The ask doesn't withhold approval. `tend-review` runs
on `opened`, `synchronize`, `ready_for_review` and `reopened`, not on
`edited`, so a held approval would wait for the next push. The review
approves with the ask as its body.
- **Scope.** Only issues labelled `backlog`. CI failure reports and
cause issues close by their own routes.

## Not verified

- **Use inside a full review.** The replay gives the section on its own,
with the backlog inline. It shows that the rule, once applied, picks the
right issue. It doesn't show whether a whole Tend review, with the
bundled review skill in context, remembers to apply it. Tend's next
reviews will show that.
- **What-is-left lists.** The replay leaves out the earlier PRs that
name each issue, which the rule tells the review to read. So its lists
repeat items that earlier parts had done. #5454's ask lists #4027 items
that #3856 and #3868 had finished.
- **Repeat runs.** Each case ran once.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude Opus 5.5 <[email protected]>
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