Skip to content

test: reproduce hidden to-do text after On me navigation - #3620

Closed
leaf-agent wants to merge 1 commit into
mainfrom
repro/issue-3618
Closed

leaf-agent wants to merge 1 commit into
mainfrom
repro/issue-3618

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

This PR preserves a failing browser reproduction for #3618. After m reaches a page-subject to-do and after Show reaches an element-subject to-do, both targets receive focus but neither to-do title is visible. The focused test fails on current main with to-do words at page and element: False, False.

The queue walk currently arrives at the subject, while the title and Done button live in the On me card. A repair needs a readable presentation at the arrival that also gives a touch user a way to finish the to-do; #3617 discusses that presentation choice. This PR deliberately contains no runtime change and is expected to keep CI red until the repair lands.

Automated triage for #3618

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The test reproduces the reported failure: the PR test check reaches both to-do subjects, then fails because neither title is visible (False, False). The PR explicitly holds merging until the subject presentation and touch-accessible Done action are resolved in #3618 and #3617. The red check and that stated hold withhold a landing verdict on this head.

max-sixty added a commit that referenced this pull request Oct 25, 2026
A to-do the agent opens on the user now shows its words where the user
meets it. Its subject carries the margin's On me mark, named by the
to-do's title. Wherever `m`, Show, a click or Tab puts the user on it,
the floating panel's empty field reads "To-do · <title>" and the row's
end offers Done as a check, so a finger ends it there instead of going
back into On me. A to-do on a thread shows its title and a Done at the
top of the thread, in a margin or page card and in the panel's thread
view. This is presentation A from the triage of #3617 and #3618, which
Max picked.

Closes #3617
Closes #3618

Supersedes #3620: its reproduction test is rewritten here to assert the
fixed behavior.

## How it works

The browser already received each user to-do as an obligation record
(`source.kind: "todo"`). `obligationPlace` threw away its place, so
nothing on the page knew where it stood, and the queue walk carried its
own path for to-dos (`page` and `widget` stops, its own page head, its
own rule for which to-do `x` ends).

- `obligations/place.js` now places a to-do at its subject: the element
or widget it names, or the page's head for a page to-do
(`subjectPlace`). A to-do has a node and no source, since no element
takes its answer. The page head is the first `h1`, else the first
heading, else the first block of `main`; the walk used `main` itself,
which would have put the user "on" a page to-do anywhere on a page with
no heading.
- With a place, a to-do gets what a widget obligation gets with no code
of its own: the margin's On me entry, the location ring,
`obligationHolding`, and arrival through the obligation view's
`arriveAtRecord`. The walk's `page` stop and its to-do location rule are
gone. One non-obligation stop remains, `subject`, for an update handed
back to the user and for an On <agent> card's to-do, both arrived at
where their subject stands.
- `obligationsIn` still counts only widgets' obligations: a to-do has no
source, so `lf-tally`, `lf-tabs` and `work.js` count what a region's
widgets ask, as `module-reading.md` already says. The triage expected
regions to count to-dos too; I left them out because `work.js` reads
each member as a widget and a tally's "to answer" means a widget's
answer.
- The walk's `todo` scope is now a stance
(`keyboard/touch-controls.js`): its `x` row is the scope's `exit`, which
the panel's row offers at its end, and the scope's new `says` gives the
field "To-do · <title>". An exit row can name its `icon`; the to-do's is
a check, and every other stance keeps its ✕. The exit seat has a fixed
width, so a worded "Done" would have moved the counts. The scope now
stands outside Draw and Design mode in the keyboard stack, so a mode
entered while on a to-do keeps its own ✕ and words; nothing else binds
`x`.
- Two to-dos on one element are one stop of the walk, as two on one
thread already were. The user there is on the first, which `x` and the
row's Done end, and then on the second.
- A widget's digits follow the widget obligation the user is in, never a
to-do: `obligationContext` asks only widgets' obligations, so a to-do
standing inside an `lf-ask`, open or ended, leaves the question's number
keys working.
- The thread head's Done is worded rather than a check, because a thread
head's check is Resolve. It ends the to-do through `queueActions.done`,
so the line goes in the turn it is pressed.

## Behavior changes beyond the to-do

- `obligationHolding` breaks a tie between two obligations at one place
in favor of the first the inventory lists (widgets' obligations come
before to-dos), so a to-do on a widget never takes the widget's own
question's ring and digits.
- The walk's "which item am I on" now takes the innermost obligation *on
the list*. Before, an answered inner obligation hid an open outer one:
after ending a to-do on `#step`, the user standing there was on nothing
rather than on the open to-do of the section around it. The same now
holds for a widget: inside an answered question within an open proposal,
`m` steps off the proposal instead of arriving at it.
- A to-do's subject is an obligation the user can be in, so `z` (align
current item) inside a section with a to-do aligns the section, as it
does inside an `lf-ask`.
- A to-do that ended still has its place, so On me's Done card can still
Show it. Its subject therefore still counts as an obligation the user is
in, for `z` and for the location ring when focus is on the subject
itself.
- Show on the second of two to-dos on one element lands where the first
is named, since the field names the first to-do standing there.
- A margin marker's accessible name now includes a lone item's own words
when its subject doesn't already say them (`markerName`), which is how
the to-do's title reaches a screen reader. Widget markers, whose words
are their subject's name, read as before.

## Tests

- `pnpm run test:runtime`: 546 passed, and `pnpm run check:browser`
matches the committed bundles, including a new `obligation-place` case
for to-do placement, the page head, the widget tie and region
membership.
- `tests/browser/navigation/test_on_panel.py`: #3620's test, rewritten
as `test_a_todo_on_you_says_its_words_where_you_land_on_it` (margin
marks named by title, then the field words and row Done after `Shift+m`
and after Show), and
`test_a_finger_ends_a_todo_on_you_where_show_lands`, which replaces the
finger test whose docstring said the panel's row offers no step. The
first also enters Draw mode on the to-do and checks the row offers the
mode's exit. `test_two_todos_on_one_element_are_one_stop_ended_in_turn`
covers the shared element; it fails with the stop dedupe removed. All
pass, as do the other to-do, walk, tally and completed-obligation cases
in the file.
-
`tests/browser/threads/test_agent_replies.py::test_a_thread_heads_with_the_task_it_holds_on_me`:
the thread's line and Done, gone before the server answers.
- `tests/browser/margin/test_entries.py` marker label and selection
cases pass.

`skills/leaf/references/conversation-loop.md` now says where a to-do's
press lands and what the user reads there, so the title must name the
action on its own.

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

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty

Copy link
Copy Markdown
Owner

Superseded by #3880, which merged with this reproduction rewritten to assert the fixed behavior: after Shift+m and after Show, the to-do's title shows in the panel's field and the row offers Done. Closing.

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

@max-sixty max-sixty closed this Oct 25, 2026
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