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:
@@ -6,6 +6,7 @@ import assert from "node:assert/strict";
|
||||
|
||||
import {
|
||||
CHAT_COMMANDS,
|
||||
CHAT_COMMAND_GLYPH,
|
||||
CHAT_FOLLOW_THRESHOLD_PX,
|
||||
CHAT_QUEUED_NOTICE,
|
||||
COMPOSER_SEND,
|
||||
@@ -767,6 +768,12 @@ test("CHAT_QUEUED_NOTICE is the app's own queued sentence", () => {
|
||||
assert.equal(CHAT_QUEUED_NOTICE, "Queued — it will send when the current turn finishes.");
|
||||
});
|
||||
|
||||
test("a command notice carries one terminal glyph for both states", () => {
|
||||
// Android draws Icons.Default.Terminal for a Command and a Command failed
|
||||
// notice and only changes the tint, so the two share this glyph.
|
||||
assert.equal(CHAT_COMMAND_GLYPH, ">_");
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Slash commands (C9)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user