Make a command a thing the app knows, and hold it until it can run

Typing "/" now suggests what this app understands -- `/compact` and
`/rename <name>` -- with a line each about what they do, and anything
else beginning with a slash is passed to whatever runs the session,
because a dialect's own vocabulary grows without this list.

None of them are messages, and that is the substance of the change. A
line written into a running turn is read by the *model*, so a command
sent mid-turn either does nothing or arrives as text somebody has to
puzzle over. They now wait for the turn to end. The waiting is done once
for every provider, in the pump that already watches every event for the
boundary, rather than in each driver where a new provider could get it
wrong by leaving it out.

Waiting is a state, so it is on screen: the command sits at the reader's
end of the conversation in blue, with a spinner and "waiting for this
turn to end", and becomes an ordinary blue row when it goes. Blue
because these are about the session rather than about the task -- the
same blue a compaction already used, which is now one colour with one
name rather than two.

Renaming from the settings screen sends exactly this, so it waits and
draws the same way. The name itself is not held: it is this server's own
datum, so the list and the header change at once and only telling the
session waits.

Echo grew the same split, which is where the bug in it showed: its
commands are its messages, so running one announced a `MessageTaken` as
well, and the same line drew twice -- once blue, once purple. A command
owes no announcement; the manager has already recorded that it was sent.

Watched rather than reasoned about: `/compact` during a 25 second turn
held with its bubble up, went out when the turn ended, and the
compaction that followed reported what it recovered.
This commit is contained in:
iris committed 2026-08-29 17:10:21 -04:00
1 parent bebaae7a94
commit 749b2db287
13 files changed
+678 -93

No files matched your search

@@ -110,15 +110,15 @@ val failedColor: Color
@Composable get() = MaterialTheme.colorScheme.error
/**
* Working on the conversation rather than in it: a compaction.
* About the session rather than about the task: a command, and the compaction one of them starts.
*
* Its own colour because it is its own kind of busy. Everything else a session does is progress
* through the task; this is the session rewriting what it remembers, it can take minutes, and
* nothing it produces appears in the transcript until it is over. A reader who has learned that
* blue means "not stuck, but not answering you either" has learned the only thing that
* distinguishes it from a session that has hung.
* Its own colour because it is its own kind of work. Everything else a session does is progress
* through what was asked of it; this is the session acting on itself -- rewriting what it
* remembers, taking a new name -- and none of it appears in the transcript as an answer to
* anything. A reader who has learned that blue means "not stuck, but not replying to you either"
* has learned the thing that distinguishes it from a session that has hung.
*/
val compactingColor: Color
val commandColor: Color
@Composable get() = Mocha.Blue
/** Waiting on a person: a question, a permission, a turn that is theirs. */