From a4bf9bb1e8d1a257df68da0692a7a3f6bb1f9f74 Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Sun, 30 Aug 2026 18:38:41 -0700 Subject: [PATCH] fix(settings): allow Escape to close from controls (#17516) docs(orchestration): clarify terminal worktree selection Co-authored-by: m4air --- src/cli/specs/orchestration-worker-specs.ts | 1 + .../src/components/settings/use-settings-page-effects.ts | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/specs/orchestration-worker-specs.ts b/src/cli/specs/orchestration-worker-specs.ts index 31377eb4384..8bac305a87b 100644 --- a/src/cli/specs/orchestration-worker-specs.ts +++ b/src/cli/specs/orchestration-worker-specs.ts @@ -29,6 +29,7 @@ export const ORCHESTRATION_WORKER_COMMAND_SPECS: CommandSpec[] = [ ], notes: [ 'Current and existing worktrees never rerun setup; a fresh agent terminal is created unless --terminal is explicit.', + 'When reusing --terminal, pass --worktree for that terminal; current means the coordinator worktree.', '--model supports Claude, Codex, and Cursor opaque provider model ids; --effort requires --model. Neither can combine with --terminal.', 'New worktrees use agent-first creation and default --setup to run. Repository start-immediately runs setup beside the agent; wait-for-setup gates agent readiness and task input.', 'Creation flags (--name, --repo, --base-branch, --display-name, --comment, --setup) are rejected for current/existing worktrees. Use exact --repo on the selected server; project/host convenience routing remains on worktree create.', diff --git a/src/renderer/src/components/settings/use-settings-page-effects.ts b/src/renderer/src/components/settings/use-settings-page-effects.ts index a913a181391..361498932b6 100644 --- a/src/renderer/src/components/settings/use-settings-page-effects.ts +++ b/src/renderer/src/components/settings/use-settings-page-effects.ts @@ -16,7 +16,6 @@ import type { SettingsStoreModel } from './use-settings-store-model' import type { SettingsInteractionController } from './use-settings-interaction-controller' import { getSettingsSectionId, - isEditableTarget, SHORTCUTS_ESCAPE_CONFIRM_TOAST_ID, SHORTCUTS_ESCAPE_CONFIRM_WINDOW_MS } from './settings-navigation-foundations' @@ -89,8 +88,8 @@ export function useSettingsPageEffects( if (hasVisibleOverlay()) { return } - // Why: Escape in an editable control means "cancel this edit", not "close Settings" — defer to the field's own handler. - if (isEditableTarget(event.target)) { + // Why: IME composition owns Escape; ordinary controls should still close Settings. + if (event.isComposing) { return } if (activeSectionId === 'shortcuts') {