Keep the running tool call outside its group

A run of adjacent calls is drawn as one collapsed card, which hid the one
thing worth seeing without opening anything: the command the session is
running right now. It is a row of its own while it runs and folds back into
the run when it ends.

Grouping stays a display decision, so the pieces a running call cuts a run
into are keyed there. The first piece keeps the run's name -- that name is
what survives a page of history landing in front of it -- and later pieces
take their own first call's id behind it, since the call a run was named
after can itself be the one running.

The echo rig's /tools gap now runs between a call's start and its end rather
than between one call and the next, which is where a real session's time goes
and what makes the running state observable at all.

Checked with ktfmtFormat, compileDebugKotlin, testDebugUnitTest (new
ToolRowsTest) and lintDebug, cargo fmt/clippy/test, and on the emulator
against the sandbox: "Called 2 tools" with the live Bash card beneath it.
This commit is contained in:
iris-ai committed 2026-09-15 01:13:03 -04:00
1 parent b9b777acaf
commit 036eb375aa
5 files changed
+172 -45

No files matched your search

+8
View File
@@ -1098,6 +1098,14 @@ dev-updater (Kotlin 2.4.x, CMP 1.11.x, JDK 21).
4. **Session screen** — the core:
- The transcript rendered from the event stream: markdown, inline images,
tool cards, question cards.
- **A run of adjacent tool calls is one collapsed card, except for the
call still running** (2026-09-15). What the session is doing right now
is the one thing worth seeing without opening anything, and a heading
counting it hides it; the call folds back into its run the moment it
ends, which is the moment it stops being what is happening. Grouping is
a display decision (`groupToolRuns`) and a cut run's pieces are keyed
there — the first piece keeps the run's name, since that name is what
survives a page of history landing in front of it.
- **Anything that is a note *about* the conversation rather than a turn in
it is closed by default** — a tool call, a peer message, a memory note.
Open-ness is the screen's, never the card's: a card that remembered for