Keep the image on screen when its tool call joins a group

A `Read` that returns an image is a row of one call, and the moment the
session makes its next call the two become a group -- which is a different
composable in a different part of the tree, so the old subtree goes and
everything it remembered goes with it. The full-screen viewer was inside
that subtree, so somebody looking at a screenshot was thrown back to the
transcript because the session carried on working. A page of history
landing does the same thing to the same row.

What is open is a property of the screen rather than of whichever row
happened to draw the thumbnail, so it is held there now and drawn beside
the other two dialogs. Nothing that happens to rows can reach it.

The cost is one fetch when it opens, since the thumbnail's decoded bitmap
belongs to a row this no longer goes through. Paid deliberately rather than
plumbed around: it is one request for a picture somebody asked to see, and
the viewer draws the same two empty states the thumbnail does -- still
coming, and never coming -- which it previously could not have, since it
only ever opened on a bitmap already in hand.

`/tools n gap` now puts a screenshot on its first call, so the case is
reproducible rather than argued about: that command already existed to make
a run *grow* while somebody watches, and the image is what made growing
matter. Checked on the emulator with `/tools 3 30` -- opened the image on
the lone call, and it was still open a minute later with the row by then
inside a group of three, and back returned to the transcript rather than
leaving the app.
This commit is contained in:
iris committed 2026-08-31 22:41:04 -04:00
1 parent ed88bdb31f
commit bfaf5e6f38
4 files changed
+146 -42

No files matched your search

+8
View File
@@ -259,6 +259,14 @@ first if a remote spawn ever mangles an argument.
card that remembered for itself forgets the moment the lazy list stops
composing it, so a note opened and scrolled past would shut behind the
reader.
- **The full-screen image lives on the screen, not in the row that drew the
thumbnail** (`SessionImageViewer`). A `Read` whose result is an image is a
row of one call until the next call arrives and makes it a group -- a
different composable in a different part of the tree, so the old subtree
and everything it remembered goes, the open dialog included. Somebody
looking at a screenshot was thrown back to the transcript because the
session made another tool call. `/tools n gap` puts an image on its first
call so this is reproducible: open it, wait a gap, watch the row regroup.
- **All transcript text is selectable, from one `SelectionContainer` around
the whole list** (`TranscriptList.kt`). Not per row: a transcript is one
body of text to a reader, so a selection has to be able to run from a