web: chat composer review fixes — real Stop, /close leaves the pane

Address the review of C8/C9: the composer's Stop control now routes to
`chat_interrupt` (`onStop`) instead of the inert submit path, and the smoke
clicks it and asserts the page's own "Stopping the running turn…" notice with
no `Action failed` dialog (captures/63b). Accepting `/close` finishes the
session locally — the running/queued bits clear and the conversation leaves
the pane for the list, mirroring Android's `finishSession` — and the smoke
asserts the select hint returns. A command notice draws the one terminal
glyph (`CHAT_COMMAND_GLYPH`, `>_`) for both states, tinted only; the growing
textarea accounts for its padding and border so six rows are six whole lines;
remove a shadowed duplicate `chatSessionById`. Wording unchanged; every pure
helper and the wire shapes remain unit-tested.

The smoke creates a throwaway session via `/new`, really prompts, really
interrupts and closes it; the operator's session is never prompted.
This commit is contained in:
2026-10-19 07:26:25 +01:00
parent f660078173
commit d9f5ba6f75
6 changed files with 110 additions and 31 deletions
+7
View File
@@ -820,6 +820,13 @@ export const CHAT_ATTACH_LABEL = "Attach file";
/** The composer's queued notice, shown while a prompt waits behind a turn. */
export const CHAT_QUEUED_NOTICE = "Queued — it will send when the current turn finishes.";
/**
* The terminal glyph on a command notice. The app draws `Icons.Default.Terminal`
* for both a successful and a failed notice and only changes the tint, so the
* browser uses this one glyph for both.
*/
export const CHAT_COMMAND_GLYPH = ">_";
/** The two values of [composerAction]. */
export const COMPOSER_SEND = "send";
export const COMPOSER_STOP = "stop";