fix(shortcuts): Ctrl+W no longer closes a session

Close Session was bound to Ctrl+W by default. Ctrl+W is delete-word in
every shell, readline prompt and agent CLI, so muscle memory killed the
session (its tmux pane and CLI, with no confirm) mid-sentence, and with
the split pane open it was not even the pane being typed in.

Close Session now has no default key: the capture-phase handler lets
Ctrl+W through and xterm sends ^W to whichever pane is focused. The
action stays in the registry and can be bound in App Settings ->
Shortcuts; the shortcut overlay shows it as not bound. The Help modal,
CLAUDE.md, the split and tile-grid specs and three wiki pages stop
advertising Ctrl+W as kill. Owner decision (tile-grid decision 5).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-06 15:46:49 +02:00
parent 9e032bdc3e
commit bcdccd14c4
13 changed files with 155 additions and 33 deletions
+4 -4
View File
@@ -8,9 +8,9 @@
* now answers with the pane whose terminal was focused last, and the actions
* that are about a TERMINAL (clear, restore size) go through it.
*
* Ctrl+W deliberately does NOT follow focus yet: it kills a session outright,
* with no confirm, so moving it changes which agent a muscle-memory press kills
* (docs/tile-grid-plan.md, decision 5). It stays on the active session.
* Close Session is not one of them: it has no default key any more (Ctrl+W is
* left to the terminal as delete-word, see ctrl-w-never-closes.test.ts), and a
* key a user binds to it closes the active session, as it always did.
*
* Real code under test: constants.js + terminal-ui.js in a `vm` context.
*/
@@ -136,7 +136,7 @@ describe('terminal shortcuts follow the focused pane', () => {
});
});
describe('Ctrl+W stays on the active session (decision 5)', () => {
describe('Close Session (user-bound key only) stays on the active session', () => {
it('killActiveSession closes activeSessionId and never consults the focused pane', () => {
const appSource = read('app.js');
const body = appSource.slice(