Skip to content

Agent: List the files a turn changed under its reply - #1590

Open
matthewrball wants to merge 12 commits into
ux/turn-permissionfrom
ux/turn-changes
Open

matthewrball wants to merge 12 commits into
ux/turn-permissionfrom
ux/turn-changes

Conversation

@matthewrball

@matthewrball matthewrball commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

  • When a turn that edited files is over, its reply carries a card: "2 files changed" with the lines added and removed.
  • Each file has its own row: the name, its folder, and its own "+6 −2".
  • Click a file to see the diff of what the turn did to it. Click again to fold it.
  • A turn that changed nothing gets no card. While a turn is still running there is no card yet.
  • An edit that failed, or that you denied, is not counted.

Files changed card, light

Files changed card, dark

A file opened in the card, light

A file opened in the card, dark

Live run: a step waiting for permission, light

Live run: a step waiting for permission, dark

Live run: finished turn with its files card, light

Live run: finished turn with its files card, dark

The first row is a headless render with fixture rows. The second is a signed-in run of this branch (the whole stack) in a debug build.

Notes

  • The card stays under the turn's last real reply. An empty streamed message no longer takes its place.
  • File rows are tab stops with Enter and Space, a focus ring, and their names in the accessibility tree.
  • A turn's reply and card follow the turn's first step, whichever activity group the later steps are in (Turns::turn_of).
  • Part 4 of 4, stacked on Agent: Show on a step that it waits for permission, and what you said #1589.
  • The card adds up the turn's edit and write calls from the diffs their steps already derive. It is built once per turn and dropped only when one of that turn's steps changes, so nothing is recomputed per frame or while a reply streams.
  • It sits on the last thing Maple says after the turn's last step. A turn that ends without a reply has no card; its steps still show each change.
  • It counts what the calls asked for, like the steps do. It does not read the files, so a change made by a shell command is not listed.
  • Several edits to one file are one row, and its diff lists them in order.
  • File rows open by click only. Application Vim does not step into the card yet; say if it should.
  • New string, in English, Spanish, German and Korean: "N files changed", with plural forms.
  • Tests: a_turns_changes_add_up_by_file, a_turn_that_only_ran_commands_changed_nothing, a_turns_reply_is_what_maple_says_after_its_last_step, a_finished_turn_lists_what_it_changed_under_its_reply (the card appears when the run ends and the reply's row grows to hold it and an opened file).
  • Checked on macOS with Rust 1.98: just ci-lint and cargo test -p maple-agent-app --locked pass on each of the four branches, and just ci-extra at the top of the stack (Agent: List the files a turn changed under its reply #1590). Partial verification: just ci-test was not run to the end here; on this Mac it fails 65 store and external-agent tests in crates/maple-agent, which this stack does not touch.

With a turn's steps folded, what Maple changed was only visible by
opening them and reading each edit.

Once a turn is over, its reply carries a card: how many files changed,
each file with the lines added and removed, and the diff on a click.
It adds up the turn's edits and writes that went through, from the
diffs their steps already derive, and is built once per turn.
# Conflicts:
#	apps/maple-agent/app/src/ui/chat/transcript.rs
#	apps/maple-agent/app/src/ui/chat/turn.rs
The card added up the lines kept for display, which stop at a cap, so
a large write was undercounted. It now counts from each call's whole
input, as the steps do.
# Conflicts:
#	apps/maple-agent/app/src/ui/chat/turn.rs
Loading a paged row's whole input left the card with the counts of
the cut one, and a queued message ended a turn without the reply's
row being measured for its new card.

Both now drop the cached card and measure the row again. The card
also asks only its edit and write steps for their derived rows, so a
turn of commands derives nothing to learn it changed no file.
# Conflicts:
#	apps/maple-agent/app/src/ui/chat/transcript.rs
@matthewrball
matthewrball marked this pull request as ready for review November 12, 2026 15:14
Brings in master, independent activity chunks and the Korean catalog. A turn's reply and its files-changed card follow the turn's first step, whichever chunk the later steps are in; adds the Korean files-changed string.
…iles from the keyboard

An empty streamed message took the reply's place and drew nothing, so the card vanished. A file row had no tab stop, key handler or focus ring, and its name was not in the accessibility tree.

This branch has not been deployed

No deployments
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