Repository navigation
fix(tui): restore composer shell kill shortcut - #42366
Merged
Merged
Conversation
kitlangton
force-pushed
the
composer-shell-kill
branch
from
August 13, 2026 17:10
b1a1940 to
8effc2f
Compare
kitlangton
enabled auto-merge (squash)
August 13, 2026 17:38
This was referenced Aug 13, 2026
jinhuang712
pushed a commit
to jinhuang712/opencode
that referenced
this pull request
Sep 26, 2026
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.
What
Restore
Ctrl+Dshell termination from the TUI composer Shell tab when a global binding also recognizes the key.Before / After
Before: The Shell tab rendered
kill ctrl+d, but the key could be consumed beforecomposer.shell.kill, so noDELETE /api/shell/:idrequest was sent and the background process continued running.After: While the Shell tab is active, its configured
Ctrl+Dbinding gets first refusal and dispatches the existingcomposer.shell.killcommand. The server removes the shell and terminates its process group.How
packages/tui/src/routes/session/composer/shell-tab.tsxintercepts the configuredCtrl+Dshell-kill shortcut while the Shell tab is active, then dispatches the existing command.packages/tui/test/cli/tui/composer-keymap.test.tsxcovers a focused textarea plus the globalapp.exitcollision and verifies the shell DELETE request.Scope
This does not change composer focus, the shell API, or process lifecycle. The existing
shell.removepath already terminates the detached process group; the bug was that the TUI never invoked it.Testing
bun run test test/cli/tui/composer-keymap.test.tsxfrompackages/tui: 3 passedbun typecheckfrompackages/tui: passedbun run test test/tool-shell.test.tsfrompackages/core: 20 passedtermctrlagainst the elected OpenCode service: opened the Shell tab, pressedCtrl+D, observed the shell disappear, and confirmed the shell API no longer returned its IDFlow
sequenceDiagram participant User participant ShellTab participant Server participant Process User->>ShellTab: Press Ctrl+D ShellTab->>ShellTab: Dispatch composer.shell.kill ShellTab->>Server: DELETE /api/shell/:id Server->>Process: Terminate process group Server-->>ShellTab: shell.deleted