Skip to content

Let a finger read a margin entry's label and status, and say why a dead reply link goes nowhere - #3341

Merged
max-sixty merged 3 commits into
mainfrom
agent-a85dec80ed66b563a
Oct 20, 2026
Merged

max-sixty merged 3 commits into
mainfrom
agent-a85dec80ed66b563a

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

TODO.md listed information a phone user could reach only by hovering. This gives the items outside Leaf's panel a touch route through the mechanism Leaf already had, press-and-hold to read a control's word (held-word.js), and leaves the panel's items for its phone design.

Margin entries. Every margin entry now wears HOLDS_WORD (presentContributionEntry), so a finger holding a marker reads its label and status, such as Thread · My turn to answer or Sent · 2m ago, and the release still presses it. Before, only a reaction offered in the margin did. The label also gains a line for whatever else the entry's title says, such as an agent's work on it ("Working · Checking the browser connection"), painted from the same reading as the title. Under a coarse pointer the label tries above the entry, then beside it, before below, since a finger covers what lies below; a held entry holds its row in packing, so a row arriving during the hold doesn't move the label.

held-word.js. The browser's own click after a held release is now swallowed wherever it lands. Before, only a click landing on a holder was, so a margin disclosure that opened something under the finger took that click too.

Dead reply links. A reply's link to a section the shown version lacks refused its press silently, and only its title said why. The press now raises that reason as an error (errors.js), as a refused Approve version does.

What else the list named. A reaction's word was already held-word's own case, the agent's failed save is a held error, and the diff's line "+" marks a line number a finger can already tap to comment. TODO.md now lists only the panel's items: a thread view's lost passage, the compare state, a disabled menu row, and On me's Approve version with its "Press z".

Verified with leaf-dev probe under --touch at 390px (hold reads the label above, a tap presses once on base and branch alike) and in Firefox with a mouse hold. Playwright's Firefox touch emulation delivers no pointer events for a held press, so a finger hold wasn't driven there. New tests in tests/browser/margin/test_entries.py and tests/browser/navigation/test_threads.py each fail with their fix removed.

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

max-sixty and others added 3 commits October 20, 2026 08:01
…nk goes nowhere

A margin entry's label and status (Thread, Sent, Stalled update, with its
age) show to a resting pointer and the keyboard, so a phone user could not
read them. Only a reaction offered in the margin wore `HOLDS_WORD`, the
press-and-hold route `held-word.js` gives a control whose word is its
tooltip; theme.css and the label placement already painted any held margin
entry. `presentContributionEntry` now puts `HOLDS_WORD` on every margin
entry, so a held press reads its label and the release still presses it,
and the reaction offer no longer adds the class itself. Under a coarse
pointer the label goes above the entry first, since a finger covers what
lies below it.

A reply's link to a section the shown version lacks refused its press
silently, and only its title said why. The press now raises that reason as
an error (errors.js), as a refused Approve version does, so a tap, a click
and Enter all say it.

The rest of TODO's hover-only list is either reachable now or in Leaf's
panel. A reaction's word is held-word's own case, the agent's failed save
is a held error, and the diff's line "+" marks a line number a finger can
already tap to comment. The panel's items (a gone passage in a thread view,
the compare state, a disabled menu row, On me's Approve version and its
"Press z") wait on the panel's phone design, and TODO.md now lists only
those.

Tests: a finger holding a status and an action margin entry at 390px reads
each label above the entry, and the release presses only the action (fails
without the class). A tap on a reply's link to a missing section puts its
reason in the panel's field (fails without the raise).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review of the previous commit found three gaps once every margin entry
holds its word:

- A tap's release presses the entry, and the browser's own click after it
  was swallowed only when it landed on a holder. A disclosure that opens
  something under the finger then took that click too. held-word.js now
  swallows the next pointer click after a release wherever it lands; the
  next press resets it.
- The held label said the entry's label and context, but its title also
  carries a distinct title and an agent's work on it ("Working · Checking
  the browser connection"). The label now has a line for that, painted
  from the same reading as the title.
- Packing seats a held row first only for hover and focus, and a touch
  hold has neither, so a row arriving beside it could push the label under
  the finger. A held word now holds its row. Under a coarse pointer the
  label tries above, then beside, before below.

The held-entry test now also checks the title's line, that one tap
presses once with nothing beneath it pressed, and that an arriving row
leaves the label where it is; each fails with its fix removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 97cccf4 into main Oct 20, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a85dec80ed66b563a branch October 20, 2026 15:35
max-sixty added a commit that referenced this pull request Oct 21, 2026
…3451)

On a phone, a tap on a margin entry no longer leaves its label up over
the margin. Press-and-hold (#3341) is the way to read a label there, and
the label goes when the finger lifts. With a mouse, and from the
keyboard on any device, labels show as before.

This is Max's decision #30 on the overnight report (option A, "Show
hover labels only with a real pointer").

A phone browser leaves the entry a finger last pressed both hovered and
focused until the next tap elsewhere. The label reveal answered to both:
`:hover`, and `[data-lf-focus]`, which marks any focus, a tap's
included. Gating only the hover part on `(hover: hover)` still left the
label up after a tap in Chromium under touch, because the tap had also
focused the entry. So on a device without real hover (`(hover: none)`),
focus reveals the label only where the keyboard placed it
(`:focus-visible`). Tab and the Left/Right route between a target's
entries both match it.

- `theme.css`: the hover reveal sits under `@media (hover: hover)`, and
under `(hover: none)` a focus that isn't `:focus-visible` hides the
label unless a press holds it. The held and focused reveals share one
rule.
- `margin-layout.js`: the label's placement reads the same rule, from
`hoveringPointer` in `pointer.js`, so it doesn't place or count a label
the theme hides.
- `test_a_finger_holding_a_margin_entry_reads_its_label_above_it` now
asserts that a tap leaves the label hidden and that the label hides when
the hold ends. Against the base runtime, the tap assertion fails.

Checked with `leaf-dev probe` on a page with a status entry and an
action entry, base against this branch:

| Arm | Base | This branch |
| --- | --- | --- |
| Touch, Chromium and Firefox: tap each entry | label shown | label
hidden |
| Touch, both: Tab, then Left/Right | shown | shown |
| Mouse, Chromium and Firefox: hover, click, pointer leaves, click
elsewhere, Tab | shown, shown, shown, hidden, shown | same |

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

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 25, 2026
…s it unfolds

Tapping a folded reaction pin at 390 px unfolded it 11 px lower than the seat it
was pressed in, and `test_a_pin_unfolds_from_the_seat_it_was_pressed_in` failed on
macOS, here and in CI; Linux CI passed it.

Cause: #3341 made every margin entry, the pin's toggle among them, a hold-to-read
control (`HOLDS_WORD`). held-word.js presses such a control at the finger's
release by dispatching its click, but a finger's press is focused only by the
browser's compatibility mouse events after the release. The margin layout pass the
unfold queued could run in between, with the row neither hovered nor focused, so
margin-layout.js did not count it as held and seated it afresh, below a neighbour.

Now the release focuses the control first, ringless (`focusVisible: false`, which
Chromium, Firefox and WebKit honour), as a pointer's press does before its click.
The pin is held through the layout its press queues. A tap still leaves no ring and
no label. held-word.js joins focus.js's `focus()` owners in the placements lint
rule, since it stands in for the browser's own press, which focus.js already reads
as a press.

Behavior changed: a control pressed by a finger's release is focused at the
release rather than a moment later.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 25, 2026
#3939)

Adds a nightly macOS run of every test tier, and fixes every test that
failed in its first run or in the Linux nightly beside it: 89 tests in
[run
40156291557](https://github.com/max-sixty/leaf/actions/runs/40156291557),
60 of them only on macOS.

## The macOS nightly

`ci.yaml` gains a `test-macos` job: every tier on `macos-15`, `-n 2` on
its three cores, in the daily schedule and a dispatch. It belongs to
`ci`, so a failure turns that run red and reaches tend through the
existing `workflow_run` trigger, with no tend configuration change.
GitHub doesn't bill hosted runners for public repositories; the job
holds one of the account's macOS slots for about three hours. The test
step names `shell: bash`, without which a step runs without `pipefail`
and piping pytest through `tee` reported the first run's failures as a
green job. The setup action's Ubuntu mirror step now runs only on Linux.

`tests/AGENTS.md` counts `test-macos` among what tend repairs and leaves
only failures no CI run shows to local sessions. It drops the
instruction to confirm a macOS-only failure at normal priority because
`taskpolicy -b` slows headless Chrome: a test that fails on a slower
host depends on timing, and the fix is to the test. `running-tend` tells
the session fixing a red run, which has only a Linux runner, to verify a
macOS-only fix by dispatching `ci` on its branch.

## The fixes, by cause

Product fixes:

- A drafted margin card rose against the window's foot and never came
back as the draft shrank (#3524). It now holds the top it opened at and
drops back.
- A tapped pin reseated 11px lower as it unfolded, because the
hold-to-read toggle was pressed before the browser focused it (#3341).
- A page's first thread card could cover its passage, because the
placement that makes room was dropped while Floating UI loaded (since
#1526).
- A heading's "Copy link to section" stayed at the heading's far end
after the window narrowed and widened, since every engine keeps its last
`position-try` fallback (#3836). It now picks its place from the current
width.
- Putting the response bar away moved focus off the button the press had
just focused, so the next `e` found nothing (#3756).
- A trace's image-tools status shared a class with the image's loading
notice, whose rules hid it (#3707).
- WebKit scrolled the outer page 1,386px when a sample editor took focus
(#3634).
- In draw mode a press left the previous press's release timer pending,
so a fast second click reached the page.
- Hint refreshes read the geometry of every target inside a closed
disclosure, forcing layout of skipped content.
- A sidebar page's sticky track clipped focus rings (#3918). A stuck
track body now keeps the ring's room inside its edges, so its blocks
stand 5px in from each side.
- Tab revealed a block's Copy flush with its scroller, cutting its ring
(#3916).
- The hidden "my change" word inside a choose group took a cell's
padding and read as clipped content (exposed by #3837's check).
- Visual review case buttons kept their wide padding after the first
breakpoint crossing, a Chromium restyle bug avoided by making the case
list a plain container.
- A held shot's scrolling stage didn't declare that it holds its height
(#3703/#3704).
- When the log refused a reply, the floating panel's head moved down
69px and the restored draft pushed its controls up 21px (#3400). Through
a refusal the panel now holds its head and the field its height, on the
holds a press already takes; the refused turn's room goes at the user's
next turn.
- A reply box's ↑ (edit your last message) appeared only after an
unrelated repaint once its last message became editable (#3855). Every
message draw, by any thread reader, now recomputes that row's keys.
- A trace's images took the page's scroll anchor, so a lane change in
the timeline scrolled the page 62px under an arrow key; they no longer
anchor scroll. The trace overview wrote its window's new start before
reading its size, so for one layout the window ran past its strip and
Chromium scrolled the page up to 838px; it now reads before it writes.
The image tools' status keeps its line when its text clears.
- Web Awesome's radio group moves focus on an arrow with a bare
`focus()`, which Leaf's ring scroll margin turned into a page scroll.
The vendored bundle is patched (`build/vendor.mjs`) so both calls pass
`preventScroll`.
- A Leaf page inside an iframe took focus from the page around it when
it finished arriving. Its arrival recovery now runs only at top level or
in a frame that holds focus.
- The margin rail's one Tab stop stayed on whichever row last held it,
so a resize could leave it below a row the user sees first. It is now
the highest row in view; a focused row keeps it.
- A resize that moved a sidebar page's track into the page, with neither
place made by the reader, took the track's place over the page's:
live-progress jumped 1861px (#3918). On a tie the page's own place wins.
- The whole-page rule read a shut disclosure whose children are all
generated as showing what it holds (#3908); it now skips only `.lf-ui`
apparatus.
- The gallery revealed its stamped frame at the centre, carrying the
pressed button 45px; it now scrolls only as far as needed.

Test fixes:

- The Codex fixture copies the running interpreter as `codex`; on a
framework Python, as on the runner, the copy fails its code signature
and macOS kills it at launch. That broke 39 tests. The copy is now
re-signed ad hoc, and the fixture no longer leaks `PYTHONHOME` into the
command it runs.
- The plain-HTTP copy test missed Chromium's lower-cased host; the
event-door refusal test read its answer after the server's reset; the
stale-keys sweep raced the browser entering fullscreen; the words watch
didn't credit a blur from a press elsewhere.
- Several tests read state before it settled (a shown gesture's arm, a
side list's smooth scroll, a sample's focus returning, a held reply's
menu), and now wait for it. Assertions predating #3830, #3916, #3670,
#3673 and #3217 now read the current behavior.
- Three waits fixed their own deadline instead of the suite's, among
them the async-probe test's 500ms.
- The command hub's record now sticks in view, so the Atlas journey
opens its news before reading each row; the region-capture journey drags
over the unreadable image it means to fail on (#3861 draws only the
element that alone paints the crop).
- The touch-capture removal test, which fails intermittently on main,
now reads the shelf right after the tap and names the elements the tap
reached, so its next failure says whether the tap missed or the image
came back.
- The feature-gallery scroll pass allows a third of its steps to write
the contents' `aria-current`, as gestures already do, since the count
depends on where sections fall under the platform's fonts.

The branch also merges the four open `grind/f-main-tests-*` pull
requests, whose fixes cover five more of the run's tests: #3871, #3882,
#3887 and #3906. This pull request lands them.

Each fix was reproduced failing and then passing by node id, on this Mac
or, for a Linux- or runner-only failure, against a run's log, except
where its commit says otherwise. Dispatched full runs on this branch
([40156291557](https://github.com/max-sixty/leaf/actions/runs/40156291557),
[40186545420](https://github.com/max-sixty/leaf/actions/runs/40186545420),
[40196342887](https://github.com/max-sixty/leaf/actions/runs/40196342887))
check both platforms; the second took the macOS job from 86 failures to
38, most of the rest fixed since. A few macOS-only failures pass on
every local attempt (two reading-place tests, a scroll repaint, Back
from a thread, opening a line under the last, the Android composer's
Return, margin-entry order, a card paging on, a turn arriving out of
view) and have no fix here; once this lands, the macOS nightly reports
them to tend.

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[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