Skip to content

Show a phone user the panel's words that only a hover could read - #5454

Merged
max-sixty merged 3 commits into
mainfrom
grind/g-phone-reach
Nov 5, 2026
Merged

max-sixty merged 3 commits into
mainfrom
grind/g-phone-reach

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

A phone user can now read what the floating panel said only in tooltips: why a thread has no place on the page, each version's note, each neighbouring page's whole account, and which agent resolved a thread. Versions also opens at the version the page shows. Part of #4027.

What was unreachable. A journey tapped through the panel's views at 390×844 under a coarse pointer on six pages, and read every element whose title holds words its visible text doesn't, or whose words are cut. A second read did the same for the page itself on 31 catalog, developer and docs pages. Four sets of panel words had no route for a finger:

  • A thread's missing passage. The quote's title alone said "This passage is no longer in the version shown". The view drew the quote and no Show on page, with nothing saying why.
  • A version's note. Versions cut it to one line, whole on hover. The note is the only place a version says what changed, and across 2,245 distinct notes in page logs on this machine the median is 92 characters, where a phone's row shows at most about 40.
  • All pages' rows. The title and the agent's line were cut, and where the session works, which tells two pages of one title apart, was only in the row's title.
  • Who resolved a thread. Only Reopen's name said so.

What changed.

  • quoteReading gives a thread's quote one status word: Not in the latest version, Not found, Earlier data or Changed. The first is true on every version the thread is read from, including an earlier one where the passage still stands, which Not in this version wasn't. The word now leads the quote, so its three-line clamp can't cut it, which it did to Changed and Earlier data on a long quote. The quote has no title, and the four titles quoteReading computed for found passages, which nothing drew, are gone.
  • Under (pointer: coarse), (hover: none) a panel row's words stand whole at rest (floating-panel.css): a menu row's, such as Undo naming its gesture; a version's note on the lines under its name; and in All pages the title, the agent's line and the rest of the account (rest, live-leaves.js). A mouse keeps the cut words and their titles, as chosen on 15 October: at 1280×800 All pages draws the same, and Versions differs only by a passing notice's fade.
  • The panel's field says "Resolved by Codex" for a thread the agent resolved, on every pointer. On an earlier version the field shares its line with the version chip, and a long name such as Claude Code cuts to "Resolved …"; Reopen's name still says it whole. This change accepts that cut.
  • Versions opens at the version the page shows (at on the view, focusView in floating-panel.js). That row comes into view by either route, and a key lands on it rather than on the first row. Reopened from an older version, a long list used to open at the top with Showing out of sight: on base past about 14 versions, and with this change's taller phone rows past about 7 (inferred, not measured), where about 30% of the local pages the review counted have more versions.
  • keyboard/AGENTS.md, "Touch routes", states the rule for words: a title can't be the only place a state's reason or the rest of a cut word is said, though a row may keep one for a mouse.
  • skills/leaf/references/threads.md says a detached thread's quote is marked as not in the latest version.
  • leaf-dev stills gains detached-thread and all-pages. plan-versions-touch now stamps a long note first, since the fixtures' own notes ("Earlier draft") never reach the cut.

Already reachable, unchanged.

  • The compare state: the field says "5 changes since v2" and Compare wears its pressed contour.
  • A disabled menu row's reason: no row carries one. Resume writing, Restore discarded edit and Restore selection are disabled with no title, and the command reference says why a command is unavailable when pressed.
  • On me's answers keep their two lines. Show, by tap, lands on the option's card with its whole words in view.
  • Copy link's grant is on About. A mode's or search's row holds one ✕, and the On me count returns when it ends.
  • Clipped diagrams: none at 390 wide. All 31 pages have a scrollWidth of 390. Each lf-diagram wider than its box scrolled to its end under a synthesized touch swipe: pr-flow-diagram 589 in 292, security-proposed-states 937 in 342, request-path 749 in 342, layers-flow 490 in 342. Other drawings scale to fit.

What's left of #4027:

Finish what a phone user still cannot reach. lf-trace says some things only in titles: the input badge's selector, call times and that key-down times aren't recorded, and what Review pace does. A version's cut note and All pages' account also have no keyboard route on a desktop, where focus paints nothing.

Calls Max may reverse.

  • The words Not in the latest version and Not found, and the status leading the quote, which also moves Changed and Earlier data.
  • A key opening Versions lands on the version shown, not the first row, so its ring is in view. test_versions_travel_opens_in_the_panel and test_versions_rests_the_page_s_keys_and_takes_a_version_s_number now say so; both open on the tab's v1. On base, the first Enter after g V from an older version opened the latest version; now Enter on the shown row only closes the panel.
  • Whole words at rest under a finger rather than the held press held-word.js gives other controls. A hold is undiscoverable on a row and needs a measurement of whether the words are cut; this costs taller rows on a phone, which the pairs below show.
  • "Resolved by Codex" shows on desktop too.

Evidence. Still pairs are in /Users/maximilian/.tmp/leaf.agent-a50b95e230784033f/phone-reach/ (version-note, detached-quote, all-pages, resolved-by, versions-reopen, and wide-diagram before and after its swipe). The first three come from uv run leaf-dev stills --state plan-versions-touch --state detached-thread --state all-pages --viewport phone, at 390×844 under a finger, and resolved-by from leaf-dev probe --viewport phone --base. versions-reopen shows 13 versions reopened at v2 by tap, with the scroll removed (before) and kept (after). detached-quote-earlier-version.png shows the gallery's detached thread read at v1, saying Not in the latest version.

With the source at base and the tests at head, the five tests holding these words fail, and with the new scroll line removed both cases of test_versions_opens_at_the_version_the_page_shows fail (test_a_finger_reads_a_version_s_note_whole, test_a_finger_reads_a_neighbouring_page_s_whole_account, test_a_thread_whose_words_are_gone_keeps_its_quotation_in_the_panel, test_a_removed_subject_keeps_its_thread_open_and_detached, test_news_in_an_open_thread_moves_none_of_its_controls), and test_versions_travel_opens_in_the_panel passes as the control.

Ran. 62 test functions that read the quote, its status, a version's note, All pages' rows, or how Versions opens and where its keys land; pnpm run test:runtime (810); pnpm run check; the Versions state in Firefox and WebKit, whose note wraps whole in both. Two of those tests were already red on main and are repaired here, since they read this quote: .lf-fp-quote no longer exists, and test_quotes_cross_preserving_containers_and_remain_attached still expected the quotation marks #5430 removed. This also removes the .lf-fp-page > .lf-external-mark rules, which matched nothing, since that mark is a[data-lf-external]::after.

Not verified. A real phone; emulation only, and no iOS run. The title read covered each page's open tab, since a closed tab's panel has no box. The new All pages test uses a real neighbour, but its stills use a rewritten state, since a stills server has no neighbour. test_on_a_phone_turning_on_s_tabs_moves_nothing flakes on this tree (2 of 3 runs) and on base (3 of 3), under load, independent of this change.

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

max-sixty and others added 2 commits November 5, 2026 01:11
A finger never reads a title, and four things in the floating panel were said
only there: why a thread has no place on the page, a version's note past the
row's end (real notes have a median of 92 characters, where a phone's row shows
at most about 40), a neighbouring page's whole account in All pages, and which
agent resolved a thread.

A thread's quote now leads with one status word from `quoteReading`, so its
clamp can't cut it. Under a pointer that can't hover, a panel row's words stand
whole at rest, and a mouse keeps its cut words and titles. The field says who
resolved a thread. "Touch routes" states the rule for words, and `leaf-dev
stills` gains `detached-thread` and `all-pages`, with `plan-versions-touch`
stamping a long note.

Repairs two tests that were already red on main because they read a selector
and quotation marks this surface no longer has, and removes CSS rules for an
external mark that is a pseudo-element.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ions at the one shown

On an earlier version a detached thread's passage can still stand, so its quote's
status now reads "Not in the latest version", which is true wherever the thread is
read from; "Not in this version" was false there.

Versions reopened from an older version opened at the top, with the shown row out
of sight once the list outgrew the panel: on base past about 14 versions, and nearer
7 with the phone's taller rows. The view now declares the row it opens at (`at`),
which comes into view by tap or key, and a key lands on it rather than on the first
row, so its ring is in view. The two Versions tests that opened on a tab's v1 now
expect focus there; `test_versions_opens_at_the_version_the_page_shows` covers both
routes, and fails with the scroll removed.

"Touch routes" now says a title can't be the only place a reason or cut words are
said, since a row keeps its title for a mouse. threads.md says a detached quote is
marked as not in the latest version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty
max-sixty marked this pull request as ready for review November 5, 2026 10:33
leaf-agent
leaf-agent previously approved these changes Nov 5, 2026
The quote's status leads both, and where a place follows it the place's own
separator joins them in the status's face: "Changed · design · heading ·
Rollout". The title #5447 kept for a detached quote goes, as this branch's
status word says it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty
max-sixty merged commit fead36f into main Nov 5, 2026
4 checks passed
@max-sixty
max-sixty deleted the grind/g-phone-reach branch November 5, 2026 11:38
max-sixty added a commit that referenced this pull request Nov 5, 2026
…where they stand above them (#5517)

A thread's head in the floating panel set its place, such as `design ·
heading · t`, behind the same rule as the quoted words. So a thread on a
whole paragraph drew its place, `§ paragraph · Retries are capped at
three.`, as if it were a quotation, and a long quote gave part of its
three lines to the place. Since #5454, a status word such as Not found
also led the words inside the rule.

Now only the quoted words stand behind the rule. Leaf's words about them
form a label above it, in the status face and with no rule: first the
status word, set in Leaf's italic (`voice.js`) as a message head's
"Queued for Claude" is, then where the words stand. That is the thread's
place where it has one. Otherwise it is the headings over the words,
outermost first, or the page's title where no heading stands over them.
A thread with no quoted words draws the label alone.

Quoted words always carry a label, so a status word arriving while the
thread is open, as when the agent rewrites the passage a comment is on,
takes a line the head already holds. If it added a line, the
bottom-anchored view would grow upward under Back, Show on page, Resolve
and Close. A thread whose label is its place carries the headings as the
head's title.

## What changes on screen

- `design · heading · t` sits above a rule holding only `Rollout`.
- `§ paragraph · Retries are capped at three.` is a label with no rule.
- `Release plan › Rollout › Canary hosts` sits above a rule holding `Two
hosts`. On a page with no heading over the words, the page's title takes
that line.
- When those words leave the page, an italic `Not found` takes the
label's line.
- A long quote keeps all three of its lines for its words.

## How the headings are read

`partTrail` (`thread/placement.js`) starts from `partOver`, the part of
the page a node stands in, which On me already groups by. It then climbs
to the heading of a higher rank over each heading in its container, so a
flow of h2s stands under the h1 before them rather than under the h2
before it. The higher-ranked heading is recorded once per outline read,
so a trail costs its length times `partOver`.

## Also in this change

The head, not the quote, carries `data-lf-detached`, since a thread on a
place has no quote to carry it.

## Tests

Tests that read a head's place, status or detachment now read the head
(`.lf-thread-quote-head`) or its label (`.lf-quote-label`). Tests that
read the words still read `.lf-thread-quote`.
`test_a_thread_s_head_names_the_headings_over_its_words` covers the
trail, the page-title fallback and the title on a place's head.
`test_news_in_an_open_thread_moves_none_of_its_controls`, which the
first version of this change broke, passes. So do the edited tests, the
tests that use the changed helpers, the tests that read the head without
being changed, `pnpm run test:runtime` and the browser type check.
`test_design_mode_reads_each_shape_of_control_into_the_anchor_its_routes_carry`
fails locally on this branch at its head before this push too, on a "×"
in a section's label that this change doesn't produce. CI's `test` job
passed on the first push.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent added a commit that referenced this pull request Nov 5, 2026
…n the page is read (#5569)

A page whose x-shadow widget stages bare text into its shadow root is
supposed to be refused before it presents: the readable fallback shows,
the notice says the page has a problem, and the agent gets one error
naming the widget (#2594). That refusal only fired because some walk of
the page's words met the root first, and before #5371 the margin's
points (`placePoints`) read the whole page on every document pass. #5371
made that read lazy, which was the point: a pass where every point still
stands reads nothing. Now a page with no comment to find again presents
without reading itself at all, so the module's bare text is never
refused, the page presents, and the console stays silent. That is why
`test_a_module_that_stages_bare_text_is_refused_in_its_own_name` timed
out waiting for the error.

This change makes the check explicit. Just before the page marks itself
upgraded, startup asks every declared shadow root the page reading would
cross into (`refuseBareText` in `passages.js`, called from `leaf.js`).
That is the moment the refusal's contract already names. Like the
reading's walk, it crosses into each root it admits and on into the
stages inside that one, so a malformed widget nested in another widget's
root is refused too. It skips hosts inside Leaf's own surfaces, as
`readPage` does. #5371's lazy reading stays as it is. The added startup
work is one look at each stage's direct children.

**Verification**
- Restoring the eager `pageText()` in `placePoints` makes the test pass
on main, which confirms the cause.
- With this change the test fails on main and passes on this branch.
- A runtime case in `tests/runtime/passage-boundaries.test.mjs` stages
bare text inside another stage's root; it fails with a sweep of the
body's stages alone and passes with this change.
- `tests/browser/projection/test_widget_actions.py` and
`tests/browser/test_shadow_stage.py` pass (17 tests), as do `pnpm run
test:runtime` (822), `pnpm run check:browser` and the pre-commit hooks.

The issue's other test,
`test_a_comment_on_a_closed_tab_s_document_never_reads_as_earlier_data`,
is already fixed on main. #5371 added it with the `.lf-fp-quote`
locator, while #5454 renamed that quote's class to `.lf-thread-quote`
and updated the test. It failed through run
[42010431285](https://github.com/max-sixty/leaf/actions/runs/42010431285),
has passed in every `ci` push run since
[42029761182](https://github.com/max-sixty/leaf/actions/runs/42029761182),
and passes locally.

Closes #5487 — automated triage

---------

Co-authored-by: leaf-agent <[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