Skip to content

test: expect no press at a touchscreen's panel field end, as #6687 chose - #6717

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-6716
Nov 22, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-6716

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_a_coarse_pointer_keeps_useful_status_without_keyboard_hints has failed on main since #6687. That change made a touchscreen show no press at the floating panel field's end, because the maintainer judged that a word alone there reads as status, and the panel's menu and lists already reach each press. The test still expected a notice on a coarse pointer to read Saved · Next On Me. The page now shows Saved, as #6687 intended, so this PR changes the assertion to the notice's words alone and checks that no .lf-compose-press is drawn. #6687's own test_on_a_touchscreen_hiding_annotations_offers_no_press makes the same check. No product code changes.

The test fails on b54a16fc4 (current main) with the placeholder reading Saved and then the panel's status, and it passes on this branch.

The same CI run, 44977598913, had four other failures. All four were seated-thread tests that #6713 fixed, and #6713 merged after that run's commit.

Refs #6716 — automated triage

#6687 stopped showing a press at the floating panel field's end on a
touchscreen, but test_a_coarse_pointer_keeps_useful_status_without_keyboard_hints
still expected the notice to read 'Saved · Next On Me' there. It now
expects the notice's words alone and no press.

Refs #6716
@leaf-agent
leaf-agent merged commit fac4154 into main Nov 22, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6716 branch November 22, 2026 04:55
leaf-agent added a commit that referenced this pull request Nov 22, 2026
…-fix (#6721)

`test_every_idiom_in_the_catalog_stands_in_a_corpus_source` has failed
on main since #6715. That change moved the terminal-session idiom from
the `reading` package into Leaf's own registry as `pre.lf-terminal`, and
the test checks every idiom in that registry. No example had ever held
the idiom: #6542 added it to `reading`, which this test doesn't read.
The fix-review example (`examples/review-a-fix.html`) says its
regression test "fails on each without the fix" but showed no run. It
now shows that run as a terminal session: output captured from the fix's
own regression test, `test_a_draft_s_image_closes_back_to_the_draft`,
run at #2882's commit with its runtime files set back to their parent's
(2 failed) and then restored (2 passed). So the page carries the
evidence for its claim and the idiom has a corpus source.

The test fails on `b54a16fc4` with `no example holds pre.lf-terminal`
and passes on this branch. `leaf page check` on the example's page
directory reports no findings. The render check couldn't launch Chrome
in the triage sandbox, so this PR's corpus render tests are the first
browser draw of the new figure. The figure sits below the recordings, so
it shouldn't change the page's first screen, but the site previews
haven't been regenerated.

The other failure in [run
44982643983](https://github.com/max-sixty/leaf/actions/runs/44982643983),
`test_a_coarse_pointer_keeps_useful_status_without_keyboard_hints`, was
fixed by #6717, which merged after that run's commit.

Refs #6719 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Nov 23, 2026
…6710)

The served state named where work stands in thirteen enumerations: a
delivery stage, a failure condition and its operation, a to-do's state,
a plan step's, an obligation's status, a thread's attention, the page's
activity kind and seven counts. `waiting` meant the user's turn on the
page and the agent's in a thread. Every obligation record, every
update's delivery, every to-do, every plan step, each thread and the
page now say it in the same fields: `next_actor`, `state` (`waiting`,
`running`, `blocked`, `done`), the `reason` a state leaves out, and how
a done one ended (`outcome`). This answers the entry "Make tasks and
work in progress clear" in `notes/TODO.md`.

This is the first of two pull requests, split at Max's request. Here a
to-do keeps its own served list and takes the new fields; #5979, on top
of this one, makes a to-do an obligation record and deletes that list.

## Where to look

- `src/leaf/standing.py` is the contract: the vocabulary, which record
speaks for a place, and what a job that outlives a turn is (whatever
holds an item's start other than the turn that wrote it).
- `src/leaf/activity.py` is the one producer of `running` and `blocked`,
for each delivery, each update's record, each to-do and the page. The
page reads the agent's side of all of it beside `presence` (here, away,
gone, closed).
- `src/leaf/served_state/state.schema.json` loses `Stage`, `Attention`,
a workflow's `condition` and `at_work`, `Obligation.status`,
`Activity.kind` and a plan step's `owner`, and gains `WorkState`,
`WorkReason` and `Outcome`.
- In the browser, `thread/workflow.js` words every standing and
`activity-words.js` the page's.

## A thread the user resolves

Two rules, both from a week of Max's own use: on the 13 pages he used
that week, 63 threads were resolved over a message the agent had not
answered, 50 of them within four seconds of sending. By my reading 39
ask for work or an answer and 24 close the exchange.

- The request stays owed (`events.owed_turns`). The user's resolve takes
a thread off their list and settles nothing the agent owes in it: the
message keeps its record and its place on the agent's list and holds the
Stop hook. The agent's own resolve still answers for a thread. This
stands beside #6106, under which either side's resolve ends the
questions the agent asked there.
- The thread stays closed until someone reopens it (`thread.post_reply`,
a reply's `unannounced`). What the agent says in a thread the user
resolved goes into it without reopening it, the status line announces
none of it (`announces` in `thread/model.js`, which `isNews` reads too),
and the reply's record says so (`stays-closed`), since the user's
resolve reaches the agent only where it retires a question the agent
asked. `leaf thread reopen` is the agent's choice to bring the thread
back, with the `unresolve` event the user's Reopen writes. `threads.md`
gives the goal and no rule: the user closed the thread, so it returns
only for news they would want to stop and read, such as that the agent
could not do what they asked. A question to the user there reopens it by
itself. A Codex turn's final message prints its agent nothing, so the
turn's handling has it post such news by command. Max picked both
halves: the answer leaves the thread closed, and bringing it back is the
agent's call (root `AGENTS.md`, "Leaf's role").

What follows: when this lands, each session still holding a page is
asked to answer the old messages its user resolved this way, among them
`/gpk` and `/dispatch` commands. A logged user `resolve` takes a new
meaning, a `reply` gains a field and an `unresolve` may be the agent's,
so the page protocol moves from 53 to 54; the plan-outline work in #6707
also takes 54, so whichever lands second moves to 55.

## What users see differently

The research note's scenarios S1–S15, built as real logs with 62
checkpoints, ran on `main` and here; their builders have left the tree
since and are at d986f9c. The words on every surface are identical at
40. At 11 the live words change: the 5 where the panel and the thread
contradict each other about the same work, an update the agent started
whose turn then ended with nothing watching (the panel now asks for a
nudge), a dialog open in the agent's own window (the thread says Waiting
in the terminal), and the 4 where the user resolved a thread before the
agent answered. At 11 only the Done list changes: at 10 a request
answered with a promise no longer reads Answered while its to-do is
open, and at 1 the request the user resolved is listed as Answered once
the agent answers it in the closed thread. A to-do whose start stopped
or went quiet keeps the line it last said under Stopped or Gone quiet,
and the receipt word Up next is gone.

## A preview fix that rides along

A pointer moved onto a control whose face redraws within the preview's
200 ms dwell got no preview until it left and came back: the
`pointerover` the browser sends for the new node under the resting
pointer cancelled the dwell, whatever had arrived (`preview.js`). The
dwell now ends only when another target arrives under the pointer, or
the pointer carries a press. This pull request's `test` job met it in
the feature gallery's journey, which the change edits. On Linux a margin
entry's centre lies on the edge of its icon's stroke, and the innermost
node there flips between the icon's `svg` and its `path` as the entry
repaints. The journey failed in 5 of 13 Linux runs of this branch and in
none of 15 of `main` and #6762. Six traced copies of the step in the
Linux job, [on this
branch](https://github.com/max-sixty/leaf/actions/runs/45268635289) and
[on `main`](https://github.com/max-sixty/leaf/actions/runs/45268643151),
showed the dwell armed on the `svg` and cleared 6 and 9 ms later in the
two that failed; they did not show why the `svg` comes first more often
on this branch. [With the
fix](https://github.com/max-sixty/leaf/actions/runs/45273513465) all six
show the preview, four of them through a redraw that cancelled it
before.
`test_a_target_redrawn_under_the_pointer_that_came_to_it_still_previews`
holds the fix in Chromium and Firefox and fails in both without it.

## What it costs

- The public package API changes: an obligation record has `state`,
`reason`, `outcome` and `answered` in place of `status`, and a thread's
`attention` is a record or a to-do. `lf-deck`, `lf-tabs` and the feature
gallery are updated.
- A to-do in `leaf page state` says where it stands in the new fields,
and `conversation-loop.md` teaches that reading.
- The row record moves to format 54 with the protocol, so a page served
by an older Leaf and one served by this do not list each other.
- 133 files, +4,989 −2,732, and the code is no smaller. Python and
JavaScript outside tests gain 125 lines of code, of which #5979 removes
76, and 92 decision points, 56 of them in `activity.py` and
`activity-words.js`, which decide and word the liveness cases above.
`canonical_activity` goes from 278 lines and 61 decision points to 298
and 82. Tests are +2,189 −1,212, and the new eval case is 709 lines.
What shrinks is the contract: across the stack the schema's enumerations
for where work stands go from 12, with 43 values, to 6 with 22.

## Checks

- Evals, Claude Code against `main`'s instructions, three samples a case
on the 22 cases whose tags cover the changed passages: 55 of 66 pass on
the stack's text and 54 of 66 on `main`'s, and no case differs by more
than one sample. `resolved-request-stays-owed`, new here, passes 10 of
10. After Max's call that the agent decides when a resolved thread comes
back, that case ran again, five samples a variant: given a request it
cannot carry out, 5 of 5 agents reopen the thread, both where the
delivery shows it resolved and where only the reply's record does,
against 0 of 5 under the rule before, where only a question reopened it;
an answer that delivers what was asked leaves it closed 5 of 5 in each.
On Codex, 5 of 5 turns post such a request by command, against 0 of 5
with the rule only in `harness-codex.md`, and 5 of 5 leave an ordinary
answer to the final message. The suite read the stack's final wording;
the wording of the to-do reading that only this pull request carries has
no score of its own.
- The Claude Code agent journey, which the change to
`hooks/claude-code.ts` calls for, passes every step. Its `withdrawn`
step changed: a resolve that changes nothing the agent owes reaches no
hook here, so the step takes the comment back.
- `tests/model`, `dev/tests/model`, `tests/smoke`, the runtime's Node
tests and `pnpm run check` pass here. [A manual
dispatch](https://github.com/max-sixty/leaf/actions/runs/44976806053) of
every product test, on Linux and macOS, ran on the unsplit branch as it
stood before the closed-thread rule was widened. 25 tests failed, 2
because of this change, and both are fixed: one passes under the rule as
it now stands, and the other, the Undo row's age, assumed the user's
resolve leaves nothing owed, so its fixture now has the agent answer
first. The other 23 fail without this change: in `main`'s nightly run or
another branch's full run on 21 November (9), on `main` until #6713 and
#6717 (5), on `main` today, run there by name (7), or on macOS only (2).
[A second
dispatch](https://github.com/max-sixty/leaf/actions/runs/44996782669),
of this branch beside [`main`'s
own](https://github.com/max-sixty/leaf/actions/runs/44989336653), failed
no test on Linux that `main`'s run passed. On macOS it failed six that
`main`'s run passed, and none of the six fails in six runs by name on
this tree on a Mac; `main`'s macOS job failed four that this branch's
passed.
- `test_an_exact_workflow_reports_stale_work_beside_a_live_page_claim`,
a journey test this change edits, has failed on `main` since #6796,
whose checks never ran it: its helper now opens threads in the panel,
and the test goes on to read a card. Here it chooses cards again first.

Max asked for this as one of the long-stuck design questions. No person
has read it. Codex reviewed the model and the first resolve rule, the
review bot the unsplit pull request and this one, and fresh agents the
21 November merge with `main`, the closed-thread rule and the agent's
reopen; their findings are fixed.

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

1 participant