From e70592f85ad2c86aaa5e45754d9e2dc89a8ab113 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Wed, 28 Jan 2026 22:13:53 -0800 Subject: [PATCH] fix: ignore key release events during onboarding (#10131) ## Summary - guard onboarding key handling to ignore KeyEventKind::Release - handle key events at the onboarding screen boundary to avoid double-triggering widgets ## Related - https://github.com/ratatui/ratatui/issues/347 ## Testing - cd codex-rs && just fmt - cd codex-rs && cargo test -p codex-tui --- codex-rs/tui/src/onboarding/onboarding_screen.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codex-rs/tui/src/onboarding/onboarding_screen.rs b/codex-rs/tui/src/onboarding/onboarding_screen.rs index 78a7f0ce8..09be507ff 100644 --- a/codex-rs/tui/src/onboarding/onboarding_screen.rs +++ b/codex-rs/tui/src/onboarding/onboarding_screen.rs @@ -211,6 +211,9 @@ impl OnboardingScreen { impl KeyboardHandler for OnboardingScreen { fn handle_key_event(&mut self, key_event: KeyEvent) { + if !matches!(key_event.kind, KeyEventKind::Press | KeyEventKind::Repeat) { + return; + } let is_api_key_entry_active = self.is_api_key_entry_active(); let should_quit = match key_event { KeyEvent {