Skip to content

Commit 3e81cda

Browse files
committed
docs(tui): align Ctrl+C help and stop-affordance comment with the pause
1 parent 6f0053b commit 3e81cda

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

‎src/tui/keybindings.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const SHELL_SHORTCUTS: readonly ShellShortcut[] = [
3838
{
3939
keys: "Ctrl+C",
4040
description:
41-
"interrupt the run, or clear the prompt and attachments when idle; press twice to exit",
41+
"pause a busy run and hold the queue, or clear the prompt and attachments when idle; Ctrl+C again to exit — with live sub-agents, a 2nd press stops them, a 3rd quits",
4242
},
4343
{
4444
keys: "Ctrl+G",

‎src/tui/shell/keys.ts‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,17 @@ export function handleCtrlC(
270270
}
271271

272272
/**
273-
* Pure read of the registered stop affordance scalars for the second-press
274-
* branch (Phase 2). The shell stays service-free: it never constructs a
273+
* Pure read of the registered stop affordance scalars backing the Ctrl+C
274+
* three-press machine. This is the live source for both the stop-press branch
275+
* and the count-aware note in `handleCtrlC`: an in-window press that finds
276+
* live workers becomes a "stop the fleet, stay up" press (`state: "stopped"`),
277+
* routing the quit off to a third press; the note's count also comes straight
278+
* from here, so the operator sees that the next press stops the sub-agents
279+
* rather than exiting. The shell stays service-free: it never constructs a
275280
* worker-count itself, only mirrors what the runner registered. Defaults keep
276-
* an unregistered shell on today's two-press contract (count 0, no-op stop) so
277-
* the armed branch stays safe before Phase 4 wires the runner.
278-
*
279-
* Phase 1 establishes this seam only; it is NOT yet consulted by `handleCtrlC`.
280-
* It is exported so Phase 1 consumes it honestly (pinned by the stop-affordance
281-
* test) instead of leaving it dead until Phase 2 wires the second-press branch.
281+
* an unregistered shell on the plain two-press contract (count 0, no-op stop)
282+
* so a runner that has not wired the affordance still quits on the second
283+
* press.
282284
*/
283285
export function readStopAffordance(shell: AppShell): {
284286
count: number;

0 commit comments

Comments
 (0)