Skip to content

Commit f8d8837

Browse files
committed
docs(tui): align Ctrl+C help and stop-affordance comment with the pause
1 parent 1847ff2 commit f8d8837

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
@@ -277,15 +277,17 @@ export function handleCtrlC(
277277
}
278278

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

0 commit comments

Comments
 (0)