qwen-code/packages/cli/src/ui/components
Nan Li 173246723e
fix: resolve RadioButtonSelect array bounds crash and auth dialog navigation (#46)
- Add bounds checking in RadioButtonSelect to prevent accessing undefined array elements
- Add useEffect to ensure activeIndex stays within valid bounds when items array changes
- Add validation guards around navigation handlers (up/down arrow keys)
- Fix AuthDialog initialAuthIndex calculation to prevent negative values from findIndex
- Ensure Enter key works properly on authentication screen

Fixes TypeError: Cannot read properties of undefined (reading 'value') that occurred
when activeIndex was out of bounds due to dynamic array changes or invalid initialization.

Signed-off-by: loheagn <loheagn@icloud.com>
Co-authored-by: linan.loheagn3 <linan.loheagn3@bytedance.com>
2025-07-23 14:15:35 +08:00
..
__snapshots__ pre-release commit 2025-07-22 23:26:01 +08:00
messages pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
shared fix: resolve RadioButtonSelect array bounds crash and auth dialog navigation (#46) 2025-07-23 14:15:35 +08:00
AboutBox.tsx pre-release commit 2025-07-22 23:26:01 +08:00
AsciiArt.ts pre-release commit 2025-07-22 23:26:01 +08:00
AuthDialog.test.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
AuthDialog.tsx fix: resolve RadioButtonSelect array bounds crash and auth dialog navigation (#46) 2025-07-23 14:15:35 +08:00
AuthInProgress.tsx pre-release commit 2025-07-22 23:26:01 +08:00
AutoAcceptIndicator.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
ConsoleSummaryDisplay.tsx pre-release commit 2025-07-22 23:26:01 +08:00
ContextSummaryDisplay.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
DetailedMessagesDisplay.tsx pre-release commit 2025-07-22 23:26:01 +08:00
EditorSettingsDialog.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
Footer.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
GeminiRespondingSpinner.tsx pre-release commit 2025-07-22 23:26:01 +08:00
Header.tsx pre-release commit 2025-07-22 23:26:01 +08:00
Help.tsx pre-release commit 2025-07-22 23:26:01 +08:00
HistoryItemDisplay.test.tsx pre-release commit 2025-07-22 23:26:01 +08:00
HistoryItemDisplay.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
InputPrompt.test.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
InputPrompt.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
LoadingIndicator.test.tsx pre-release commit 2025-07-22 23:26:01 +08:00
LoadingIndicator.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
MemoryUsageDisplay.tsx pre-release commit 2025-07-22 23:26:01 +08:00
ModelStatsDisplay.test.tsx pre-release commit 2025-07-22 23:26:01 +08:00
ModelStatsDisplay.tsx pre-release commit 2025-07-22 23:26:01 +08:00
OpenAIKeyPrompt.test.tsx pre-release commit 2025-07-22 23:26:01 +08:00
OpenAIKeyPrompt.tsx pre-release commit 2025-07-22 23:26:01 +08:00
SessionSummaryDisplay.test.tsx pre-release commit 2025-07-22 23:26:01 +08:00
SessionSummaryDisplay.tsx pre-release commit 2025-07-22 23:26:01 +08:00
ShellModeIndicator.tsx pre-release commit 2025-07-22 23:26:01 +08:00
ShowMoreLines.tsx pre-release commit 2025-07-22 23:26:01 +08:00
StatsDisplay.test.tsx pre-release commit 2025-07-22 23:26:01 +08:00
StatsDisplay.tsx pre-release commit 2025-07-22 23:26:01 +08:00
SuggestionsDisplay.tsx pre-release commit 2025-07-22 23:26:01 +08:00
ThemeDialog.tsx pre-release commit 2025-07-22 23:26:01 +08:00
Tips.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
ToolStatsDisplay.test.tsx pre-release commit 2025-07-22 23:26:01 +08:00
ToolStatsDisplay.tsx pre-release: fix ci (#1) 2025-07-22 09:27:14 -07:00
UpdateNotification.tsx pre-release commit 2025-07-22 23:26:01 +08:00