Skip to content

End a progress step with its turn, and drop the progress disclosure - #6508

Merged
max-sixty merged 3 commits into
mainfrom
progress-summaries
Nov 19, 2026
Merged

max-sixty merged 3 commits into
mainfrom
progress-summaries

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A progress step (an ephemeral reply) stood as a thread's dim working line until the agent next spoke there, so a turn that ended on a step left it standing indefinitely: 18 of the 26 open threads ending on a step on this machine owed nothing. Now the server says what ended each step (completed_by): the agent's next message in the thread, or the end of the turn that wrote it, unless a message of the user's before the step still waits on an answer. That exception keeps a line fork's line, whose turn closes in seconds, and keeps owed work on today's rule, as Max chose. The "Show N progress messages" disclosure is gone, as he asked, with the pending-progress machinery behind it.

Before After
Thread card: an answer, then a dim 'Recording your pick on the page' line after the turn ended The same thread card ending on the answer

To weigh: a step the user wrote after isn't ended by the agent's next step, only by its next reply, so a new step below the user's message never moves it or gets held out of sight (main avoided the same move in #3358). A failure receipt now ends the step before it. A step leaving mid-thread, by a message or by its turn, holds news as a message's fold does.

Tests: model, runtime and the 35 affected browser and journey tests pass. Two journeys fail on main's runtime too: test_an_open_card_takes_news_without_moving_its_controls, and intermittently the shift-watch teardown of test_a_reply_sent_after_progress_stands_below_it.

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

A thread's progress step (an ephemeral reply) stood as a dim working line until
the agent next spoke in the thread, so a turn that ended on a step left it
standing indefinitely: on 2026-11-18, 26 open threads across 9 pages ended on a
step, 18 of them owing nothing. Each run of steps also carried "Show N progress
messages", which the user asked to remove entirely.

Now the server says what ended each step (`completed_by`,
`served_state.thread.progress_ends`):

- The agent's next message in the thread supersedes a step: another step, an
  answer, or a failure receipt. A step the user wrote after waits instead for
  the agent's next message that is more than a step, so a new step below the
  user's message leaves the one above it standing rather than moving the
  user's message or holding the new step out of sight (main avoided the same
  move in #3358). Between two of the user's messages a thread holds at most one
  step.
- The end of the turn that wrote a step ends it (`completed_by: null`), unless
  a message of the user's said before it still waits on an answer. That
  exception keeps the line a line fork writes for the session, whose line turn
  closes in seconds, and keeps owed work on the rule before, as the user chose.
  Whether a turn runs is `activity.turn_runs`: an agent turn while it runs, the
  main thread's current turn until its end is seen or while the harness says it
  is busy.

The browser draws a step only as its face, never as a MessageView a fold holds:
summary ranges, held news and the transcript lose their pending-progress
machinery (`withPendingProgress`, the progress disclosure, `progressOpen`,
`currentLocationTouches`). Summaries and summary hints no longer count
progress. A step leaving mid-thread, by a message or by its turn, now holds news
as a message's fold does, and a held reading keeps a step as it was drawn: ended
where the drawn reading ended it, standing where only its turn has ended since.

The user chose this over keeping ended steps behind a disclosure.

Behavior that changed in tests:

- A failure receipt now ends the step before it
  (`test_a_harness_failure_receipt_does_not_read_as_an_answer`,
  `test_a_streaming_answer_hides_the_working_message_and_its_progress`).
- `test_progress_disclosure_keeps_its_words_visible_beside_margin_paging`,
  `test_progress_the_user_spoke_after_keeps_its_steps_and_its_place` and the
  run-height test are deleted with the disclosure;
  `test_a_thread_shows_only_the_agent_s_newest_step_where_it_was_said` replaces
  them.
- A second session's step after an answer ends at once; the proactive-step case
  now follows a user follow-up.
- The feature gallery's progress thread gains the follow-up its last step
  answers, so that step still stands on a page no session serves.

Inherited, failing on main's runtime too:
`tests/journeys/margin/test_card_placement.py::test_an_open_card_takes_news_without_moving_its_controls`
and the shift-watch teardown of
`tests/journeys/threads/test_agent_replies.py::test_a_reply_sent_after_progress_stands_below_it`.
leaf-agent
leaf-agent previously approved these changes Nov 19, 2026
The site build closes every example, and `leaf page close` refuses a page
with an acknowledged update still owed an answer. The follow-up the previous
commit seeded to keep the gallery's last step standing was such an update, so
`leaf-dev site build` failed. A page nobody works on can't show a standing
step under the new rule without work it owes, so the gallery's progress thread
now shows only its answer with the checks it ended gone; the follow-up and the
step on it are deleted. The working line keeps a stills state on a live
session (`plan-card-held-step`) and its browser tests.
@max-sixty
max-sixty merged commit f7f9e21 into main Nov 19, 2026
5 checks passed
@max-sixty
max-sixty deleted the progress-summaries branch November 19, 2026 09:43
leaf-agent added a commit that referenced this pull request Nov 19, 2026
…ening as a step (#6526)

Both cases of
`test_a_website_turn_posts_its_answer_when_the_move_is_settled_first`
(`tests/journeys/test_website_server.py`) failed on main because two
merged changes moved, on purpose, the behavior the test asserted. The
test now expects what each change meant to do. No product code changes.

- **Focus after Send (#6472).** A Send now leaves the user on the thread
it went into, not in the box it came from (`landSent`,
`thread/landing.js`). The test expected the panel's reply box to be
focused. It now expects the thread's view to be focused, the same change
#6472 made to its sibling tests in `test_sending.py` and
`test_card_reply.py`. The user then writes on in the reply through
`write`, which focuses the box, so the rest of the journey is unchanged.
- **The opening as a step (#6508).** The hosted turn posts its opening
as a progress message (`AppServerReplyStream.open`,
`src/leaf/codex.py`). Since #6508, the transcript draws a progress step
only as the thread's working face (`.lf-thread-working`) and never as an
`.lf-msg`. Once the focus assertion was fixed, this test stopped at its
next check, which looked for the opening in
`.lf-msg[data-lf-author=agent]`. The served state still carries the step
with no `completed_by` while the turn runs, so the step stands as
intended. The test now reads it from the face, as #6508's own updates to
`tests/journeys/threads/test_agent_replies.py` do.

The issue's bisect named only #6472, because the focus assertion failed
first. With that assertion fixed, `git bisect run` over `[here]` from
`d8e0f446f` (#6472) to `dd38dcb16` names `f7f9e2170` (#6508) for the
second failure.

Verification: both cases fail on `origin/main` (`78d3c5758`) without
this change and pass with it. `ruff` passes. No other assertion in the
test changed.

Closes #6518 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Nov 20, 2026
…nd picker export nothing calls (#6585)

These comments named code that is gone, and two pieces of code had no
caller. Nothing here changes behavior.

**Comments that named removed code**
- `src/leaf/render-checks/` (`framing.js`, `open-roots.js`, `words.js`,
`widgets.js`) named `OPEN_ROOTS`, but the export is `openRoots`. Two of
them also compared it with `UNMARKABLE_ITEMS`, which 90f9374 removed.
- `browser/runtime/version.js` said repeated comparisons of a revision
share its document fetch. In fact only `prepareActivation` reads that
cache, and `loadBase` calls `authoredDocument` directly.
- `browser/runtime/annotation-overlay/thread-preview.js` said a run's
earlier progress steps fold. #6508 removed that fold; only a closed
checkpoint's turns fold now.
- `dev/leaf_dev/website.py` and `leaf-dev site verify --wait` explained
their waits by a container image rollout, which #6550 removed. Now each
session object starts the deployed image, so the waits cover the edge
still serving another release and a lost activation connection. This
matches `verify.py`'s header, which #6550 already rewrote.

**Code with no caller**
- The Playwright timeline's `zoomBy` took a `fit` range that no caller
passes: lf-trace's two zoom commands pass a factor, and the wheel passes
a factor and an anchor. Its `zoom` getter had no reader.
- `createTargetPicker` returned `openTargetPicker`, which nothing
outside the module reads. Its own `s` command still runs it.

`pnpm run check:framework` and `pnpm run test:runtime` pass (1073), and
`ruff check` is clean on the two dev files. No test is added, since
nothing here changes behavior.

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