diff --git a/codex-rs/tui/src/bottom_pane/approval_overlay/patch_ui.rs b/codex-rs/tui/src/bottom_pane/approval_overlay/patch_ui.rs index df38d5b3b9..4c76348f3f 100644 --- a/codex-rs/tui/src/bottom_pane/approval_overlay/patch_ui.rs +++ b/codex-rs/tui/src/bottom_pane/approval_overlay/patch_ui.rs @@ -160,6 +160,7 @@ impl PatchLayout { + self.header_height + 1 + self.options_height + + 1 + self.hint_lines.len() as u16 + self.notes_height + self.validation_lines.len() as u16 @@ -220,6 +221,7 @@ impl PatchLayout { "No options", ); cursor_y = cursor_y.saturating_add(self.options_height); + cursor_y = cursor_y.saturating_add(1); for line in &self.hint_lines { Paragraph::new(line.clone()).render( @@ -273,6 +275,7 @@ impl PatchLayout { + self.header_height + 1 + self.options_height + + 1 + self.hint_lines.len() as u16; let validation_height = self.validation_lines.len() as u16; Some(Rect { diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_patch.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_patch.snap index ef98252443..9935c81695 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_patch.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_patch.snap @@ -17,4 +17,5 @@ expression: terminal.backend().vt100().screen().contents() › 1. Yes, proceed (y) 2. Yes, and don't ask again for these files (a) 3. No, and tell Codex what to do differently (tab) + Press enter to confirm or esc to cancel