diff --git a/packages/cli/src/ui/components/SettingsDialog.test.tsx b/packages/cli/src/ui/components/SettingsDialog.test.tsx index 268325923b..9425c9f1e9 100644 --- a/packages/cli/src/ui/components/SettingsDialog.test.tsx +++ b/packages/cli/src/ui/components/SettingsDialog.test.tsx @@ -211,7 +211,9 @@ describe('SettingsDialog', () => { const output = lastFrame(); expect(output).toContain('Settings'); expect(output).toContain('Apply To'); - expect(output).toContain('Use Enter to select, Tab to change focus'); + expect(output).toContain( + 'Use Enter to select, Tab to change focus, Esc to close', + ); }); it('should accept availableTerminalHeight prop without errors', () => { @@ -231,7 +233,7 @@ describe('SettingsDialog', () => { const output = lastFrame(); // Should still render properly with the height prop expect(output).toContain('Settings'); - expect(output).toContain('Use Enter to select'); + expect(output).toContain('Use Enter to select, Esc to close'); }); it('should show settings list with default values', () => { @@ -1086,7 +1088,7 @@ describe('SettingsDialog', () => { expect(lastFrame()).toContain('Apply To'); // Scope section expect(lastFrame()).toContain('User Settings'); // Scope options (no numbers when settings focused) expect(lastFrame()).toContain( - '(Use Enter to select, Tab to change focus)', + '(Use Enter to select, Tab to change focus, Esc to close)', ); // Help text // This test validates the complete UI structure is available for user workflow diff --git a/packages/cli/src/ui/components/SettingsDialog.tsx b/packages/cli/src/ui/components/SettingsDialog.tsx index 708f30b929..ef3a897090 100644 --- a/packages/cli/src/ui/components/SettingsDialog.tsx +++ b/packages/cli/src/ui/components/SettingsDialog.tsx @@ -897,7 +897,7 @@ export function SettingsDialog({ (Use Enter to select - {showScopeSelection ? ', Tab to change focus' : ''}) + {showScopeSelection ? ', Tab to change focus' : ''}, Esc to close) {showRestartPrompt && ( diff --git a/packages/cli/src/ui/components/__snapshots__/SettingsDialog.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/SettingsDialog.test.tsx.snap index e371e38da3..1555a01da5 100644 --- a/packages/cli/src/ui/components/__snapshots__/SettingsDialog.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/SettingsDialog.test.tsx.snap @@ -30,7 +30,7 @@ exports[`SettingsDialog > Snapshot Tests > should render default state correctly │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `; @@ -65,7 +65,7 @@ exports[`SettingsDialog > Snapshot Tests > should render focused on scope select │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `; @@ -100,7 +100,7 @@ exports[`SettingsDialog > Snapshot Tests > should render with accessibility sett │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `; @@ -135,7 +135,7 @@ exports[`SettingsDialog > Snapshot Tests > should render with all boolean settin │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `; @@ -170,7 +170,7 @@ exports[`SettingsDialog > Snapshot Tests > should render with different scope se │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `; @@ -205,7 +205,7 @@ exports[`SettingsDialog > Snapshot Tests > should render with different scope se │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `; @@ -240,7 +240,7 @@ exports[`SettingsDialog > Snapshot Tests > should render with file filtering set │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `; @@ -275,7 +275,7 @@ exports[`SettingsDialog > Snapshot Tests > should render with mixed boolean and │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `; @@ -310,7 +310,7 @@ exports[`SettingsDialog > Snapshot Tests > should render with tools and security │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `; @@ -345,7 +345,7 @@ exports[`SettingsDialog > Snapshot Tests > should render with various boolean se │ Workspace Settings │ │ System Settings │ │ │ -│ (Use Enter to select, Tab to change focus) │ +│ (Use Enter to select, Tab to change focus, Esc to close) │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" `;