Lightweight coding agent that runs in your terminal
Rust
[feat] reduce bottom padding to 1 line (#2704)
aed085f73a2a45
diff --git a/codex-rs/tui/src/bottom_pane/mod.rs b/codex-rs/tui/src/bottom_pane/mod.rsindex b9b05d559b..384d8bf41d 100644--- a/codex-rs/tui/src/bottom_pane/mod.rs+++ b/codex-rs/tui/src/bottom_pane/mod.rs@@ -72,7 +72,7 @@ pub(crate) struct BottomPaneParams {}impl BottomPane {- const BOTTOM_PAD_LINES: u16 = 2;+ const BOTTOM_PAD_LINES: u16 = 1;pub fn new(params: BottomPaneParams) -> Self {let enhanced_keys_supported = params.enhanced_keys_supported;Self {@@ -648,28 +648,15 @@ mod tests {"expected Working header on top row: {top:?}");- // Next row (spacer) is blank, and bottom two rows are blank padding- let mut spacer = String::new();+ // Last row should be blank padding; the row above should generally contain composer content.let mut r_last = String::new();- let mut r_last2 = String::new();for x in 0..area.width {- // Spacer row immediately below the status header lives at y=2.- spacer.push(buf[(x, 2)].symbol().chars().next().unwrap_or(' '));r_last.push(buf[(x, height - 1)].symbol().chars().next().unwrap_or(' '));- r_last2.push(buf[(x, height - 2)].symbol().chars().next().unwrap_or(' '));}- assert!(- spacer.trim().is_empty(),- "expected spacer line blank: {spacer:?}"- );assert!(r_last.trim().is_empty(),"expected last row blank: {r_last:?}");- assert!(- r_last2.trim().is_empty(),- "expected second-to-last row blank: {r_last2:?}"- );}#[test]diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_exec.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_exec.snapindex 9a205be1d2..9173b72623 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_exec.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_exec.snap@@ -1,5 +1,6 @@---source: tui/src/chatwidget/tests.rs+assertion_line: 728expression: terminal.backend()---"? Codex wants to run echo hello world "@@ -10,4 +11,3 @@ expression: terminal.backend()"▌ Yes Always No No, provide feedback ""▌ Approve and run the command "" "-" "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.snapindex 2e79127faa..e449f0c576 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@@ -1,6 +1,6 @@---source: tui/src/chatwidget/tests.rs-assertion_line: 690+assertion_line: 763expression: terminal.backend()---"The model wants to apply changes "@@ -11,4 +11,3 @@ expression: terminal.backend()"▌ Yes No No, provide feedback ""▌ Approve and apply the changes "" "-" "diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h2.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h2.snapindex 48e6154eb2..bf8bd08ba1 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h2.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h2.snap@@ -1,5 +1,6 @@---source: tui/src/chatwidget/tests.rs+assertion_line: 779expression: terminal.backend()---"▌ Ask Codex to do anything "diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h3.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h3.snapindex 7ab4159ade..1104773679 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h3.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h3.snap@@ -1,7 +1,8 @@---source: tui/src/chatwidget/tests.rs+assertion_line: 779expression: terminal.backend()----"▌ Ask Codex to do anything "" "+"▌ Ask Codex to do anything "" "diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h2.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h2.snapindex 48e6154eb2..7f84982aad 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h2.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h2.snap@@ -1,5 +1,6 @@---source: tui/src/chatwidget/tests.rs+assertion_line: 807expression: terminal.backend()---"▌ Ask Codex to do anything "diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h3.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h3.snapindex c77477a083..dbe9cbed21 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h3.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h3.snap@@ -1,5 +1,6 @@---source: tui/src/chatwidget/tests.rs+assertion_line: 807expression: terminal.backend()---" "diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_active.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_active.snapindex 79b55e2657..c598dbe19f 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_active.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_active.snap@@ -1,6 +1,6 @@---source: tui/src/chatwidget/tests.rs-assertion_line: 806+assertion_line: 878expression: terminal.backend()---" "@@ -9,4 +9,3 @@ expression: terminal.backend()"▌ Ask Codex to do anything "" ⏎ send Ctrl+J newline Ctrl+T transcript Ctrl+C quit "" "-" "diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_and_approval_modal.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_and_approval_modal.snapindex 5cd475248e..3abc8c7bcc 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_and_approval_modal.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_and_approval_modal.snap@@ -1,5 +1,6 @@---source: tui/src/chatwidget/tests.rs+assertion_line: 851expression: terminal.backend()---"? Codex wants to run echo 'hello world' "@@ -10,4 +11,3 @@ expression: terminal.backend()"▌ Yes Always No No, provide feedback ""▌ Approve and run the command "" "-" "