Motivation
Mouse Mode (mouseModeEnabled) gates Send/Stop in ComposerActions, but only inside the rendered feed (TileLeaf). When an agent runs in Terminal view (AgentTerminalLeaf — Claude/Codex TUI, and the OpenCode Terminal runtime), there is no composer and no mouse-reachable way to press Enter. A mouse-only user who dictated or pasted a command into the raw PTY cannot submit it. Dictation deliberately does not auto-submit ("user reviews, then presses Enter" — useComposerDictation), so a mouse-only user has no path to that final Enter without the keyboard.
Follows the Mouse Mode gap from docs/superpowers/plans/2026-07-28-mouse-first-workspace.md (PR #617, IMPLEMENTED): mouse users could not interrupt before; they still cannot submit in terminal view.
Intended behavior
- When
mouseModeEnabled is on, AgentTerminalLeaf renders a thin action row below the xterm with a Submit button.
- Clicking Submit sends
'\r' (Enter) to the agent PTY via the existing window.api.sendInput(sessionId, ...) path — the exact byte xterm emits for Enter.
- It must NOT read, clear, or invent any draft (
runtime.draftInput and feed state are untouched). Raw terminals have no readable "current line", so the button is always enabled, like a hardware Enter key.
onMouseDown preventDefault so the click never steals xterm focus.
- Scope: agent terminal panes only (
AgentTerminalLeaf). Plain shell panes (TerminalLeaf) keep zero controls — ordinary shell behavior is preserved. Stop button is out of scope (interrupt semantics differ per TUI).
Acceptance criteria
Motivation
Mouse Mode (
mouseModeEnabled) gates Send/Stop inComposerActions, but only inside the rendered feed (TileLeaf). When an agent runs in Terminal view (AgentTerminalLeaf— Claude/Codex TUI, and the OpenCode Terminal runtime), there is no composer and no mouse-reachable way to press Enter. A mouse-only user who dictated or pasted a command into the raw PTY cannot submit it. Dictation deliberately does not auto-submit ("user reviews, then presses Enter" —useComposerDictation), so a mouse-only user has no path to that final Enter without the keyboard.Follows the Mouse Mode gap from
docs/superpowers/plans/2026-07-28-mouse-first-workspace.md(PR #617, IMPLEMENTED): mouse users could not interrupt before; they still cannot submit in terminal view.Intended behavior
mouseModeEnabledis on,AgentTerminalLeafrenders a thin action row below the xterm with a Submit button.'\r'(Enter) to the agent PTY via the existingwindow.api.sendInput(sessionId, ...)path — the exact byte xterm emits for Enter.runtime.draftInputand feed state are untouched). Raw terminals have no readable "current line", so the button is always enabled, like a hardware Enter key.onMouseDownpreventDefault so the click never steals xterm focus.AgentTerminalLeaf). Plain shell panes (TerminalLeaf) keep zero controls — ordinary shell behavior is preserved. Stop button is out of scope (interrupt semantics differ per TUI).Acceptance criteria
mouseModeEnabled; zero layout change when off.'\r'to the agent PTY; no draft/composer state is touched.TerminalLeafbyte-identical (no control added to plain shells).npm run typecheckandnpm run test:rendererpass.