feat(terminal): Mouse Mode Submit button for agent terminal panes (#819) - #823
Merged
Conversation
Juliusolsson05
commented
Sep 7, 2026
Juliusolsson05
left a comment
Owner
Author
There was a problem hiding this comment.
Read the full diff against the mouse-first workspace plan and #819's acceptance criteria.
- Submit routes
'\r'through the same forwarder + pre-attach queue the keyboard uses, so a click before attach is queued and a click during replay is dropped exactly like a keypress. The closure readsforwarder.replayingandattachedBackfillDoneat call time, so no stale capture. TerminalLeaf.tsxandComposerActions.tsxare byte-identical to main (checked withgit diff origin/main...HEAD).- Merged current main (23 commits) into the branch: no conflicts;
npm run typecheckclean; the two new test files pass on Node 24 (8 tests). - One observation, not a blocker: the leaf test detects the Node 25 happy-dom problem only in the PR body.
.nvmrcalready pins 24, so nothing to change.
Approve. Waiting for the maintainer's merge confirmation per repository policy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #819.
What
Adds a Mouse Mode-gated Submit row so a mouse-only user can press Enter inside an agent terminal pane (
AgentTerminalLeaf) after dictating or pasting a command into the raw PTY. Clicking Submit routes the Enter byte ('\r') through the existing keypress pipeline (terminalInputForwarder+ the pre-attachpendingInputqueue), so a mouse click and a real Enter are byte-identical to the backend — no read/clear of any draft (terminal view has none by design), no new setting (reusesmouseModeEnabled), zero layout change when off.Scope
AgentTerminalLeafonly. Added:src/renderer/src/workspace/tile-tree/AgentTerminalActions.tsx(+ colocated test) and wiring inAgentTerminalLeaf.tsx(selector, a ref the mount effect publishes the routing closure on, and the gated row).TerminalLeaf(plain shells) andComposerActionsare byte-identical — confirmed viagit diffagainstmain.Design/plan
docs/superpowers/specs/2026-09-05-mouse-mode-terminal-submit-design.mddocs/superpowers/plans/2026-09-05-mouse-mode-terminal-submit.mdVerification (Node v24.14.1, matching
.nvmrc/CI)npm run typecheck(control-sdk +tsc -b): exit 0npm run test:renderer: 123 files / 522 tests passing (baseline 121/514, +2 files/+8 tests)node scripts/verify-submodule-checkouts.mjs: verifiedTests added
AgentTerminalActions.renderer.test.tsx(5): renders one always-enabled button,mousedownpreventDefault (xterm focus preserved) + still bubbles (leaf engagement), click firesonSubmit, composer scaffold classes.AgentTerminalLeaf.submit.renderer.test.tsx(3): button hidden when mouse mode off; sends'\r'to the PTY after attach when on; queues a pre-attach Submit and delivers it on attach.Do not merge — awaiting explicit maintainer confirmation.