From b745d46395a7f9e0c5a44039fbadc062c224331e Mon Sep 17 00:00:00 2001 From: Sehoon Shon Date: Thu, 4 Dec 2025 09:48:18 -0500 Subject: [PATCH] do not toggle the setting item when entering space (#14489) --- .../cli/src/ui/components/SettingsDialog.test.tsx | 14 -------------- packages/cli/src/ui/components/SettingsDialog.tsx | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/cli/src/ui/components/SettingsDialog.test.tsx b/packages/cli/src/ui/components/SettingsDialog.test.tsx index fef79cbe57..8d4a255eb2 100644 --- a/packages/cli/src/ui/components/SettingsDialog.test.tsx +++ b/packages/cli/src/ui/components/SettingsDialog.test.tsx @@ -466,20 +466,6 @@ describe('SettingsDialog', () => { }); }); - it('should toggle setting with Space key', async () => { - const settings = createMockSettings(); - const onSelect = vi.fn(); - - const { stdin, unmount } = renderDialog(settings, onSelect); - - // Press Space to toggle current setting - act(() => { - stdin.write(' '); // Space key - }); - - unmount(); - }); - it('should handle vim mode setting specially', async () => { const settings = createMockSettings(); const onSelect = vi.fn(); diff --git a/packages/cli/src/ui/components/SettingsDialog.tsx b/packages/cli/src/ui/components/SettingsDialog.tsx index 596822d1f7..f8b165c1c7 100644 --- a/packages/cli/src/ui/components/SettingsDialog.tsx +++ b/packages/cli/src/ui/components/SettingsDialog.tsx @@ -714,7 +714,7 @@ export function SettingsDialog({ } else if (newIndex >= scrollOffset + effectiveMaxItemsToShow) { setScrollOffset(newIndex - effectiveMaxItemsToShow + 1); } - } else if (keyMatchers[Command.RETURN](key) || name === 'space') { + } else if (keyMatchers[Command.RETURN](key)) { const currentItem = items[activeSettingIndex]; if ( currentItem?.type === 'number' ||