[feat] reduce bottom padding to 1 line (#2704)

This commit is contained in:
ae
2025-08-25 22:47:26 -07:00
committed by GitHub
parent ab9250e714
commit d085f73a2a
9 changed files with 11 additions and 22 deletions

View File

@@ -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]

View File

@@ -1,5 +1,6 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 728
expression: 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 "
" "
" "

View File

@@ -1,6 +1,6 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 690
assertion_line: 763
expression: 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 "
" "
" "

View File

@@ -1,5 +1,6 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 779
expression: terminal.backend()
---
"▌ Ask Codex to do anything "

View File

@@ -1,7 +1,8 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 779
expression: terminal.backend()
---
" "
"▌ Ask Codex to do anything "
" "
" "

View File

@@ -1,5 +1,6 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 807
expression: terminal.backend()
---
"▌ Ask Codex to do anything "

View File

@@ -1,5 +1,6 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 807
expression: terminal.backend()
---
" "

View File

@@ -1,6 +1,6 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 806
assertion_line: 878
expression: terminal.backend()
---
" "
@@ -9,4 +9,3 @@ expression: terminal.backend()
"▌ Ask Codex to do anything "
" ⏎ send Ctrl+J newline Ctrl+T transcript Ctrl+C quit "
" "
" "

View File

@@ -1,5 +1,6 @@
---
source: tui/src/chatwidget/tests.rs
assertion_line: 851
expression: 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 "
" "
" "