From cb4cbf8d9487f61b1e70ed356a5b94d9684e1252 Mon Sep 17 00:00:00 2001 From: Christine Betts Date: Thu, 12 Feb 2026 15:38:02 -0500 Subject: [PATCH] address comments --- packages/cli/src/ui/components/SettingsDialog.tsx | 1 - packages/cli/src/ui/hooks/useFuzzyList.ts | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/ui/components/SettingsDialog.tsx b/packages/cli/src/ui/components/SettingsDialog.tsx index 50571f9fbd..2bfbe7a9fa 100644 --- a/packages/cli/src/ui/components/SettingsDialog.tsx +++ b/packages/cli/src/ui/components/SettingsDialog.tsx @@ -164,7 +164,6 @@ export function SettingsDialog({ }); }, [settingKeys, selectedScope, settings, modifiedSettings, pendingSettings]); - // Use fuzzy search hook const { filteredItems, searchBuffer, maxLabelWidth } = useFuzzyList({ items, }); diff --git a/packages/cli/src/ui/hooks/useFuzzyList.ts b/packages/cli/src/ui/hooks/useFuzzyList.ts index dee88b119a..6d07b0ea75 100644 --- a/packages/cli/src/ui/hooks/useFuzzyList.ts +++ b/packages/cli/src/ui/hooks/useFuzzyList.ts @@ -1,6 +1,6 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ @@ -92,8 +92,11 @@ export function useFuzzyList({ onSearch?.(searchQuery); }; - // eslint-disable-next-line @typescript-eslint/no-floating-promises - doSearch(); + void doSearch().catch((error) => { + // eslint-disable-next-line no-console + console.error('Search failed:', error); + setFilteredKeys(items.map((i) => i.key)); // Reset to all items on error + }); return () => { active = false;