-
Couldn't load subscription status.
- Fork 6k
[TUI] Remove bottom padding #4854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| expression: terminal.backend() | ||
| --- | ||
| "• Thinking (0s • esc to interrupt) " | ||
| " " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this sus?
| r_last.trim().is_empty(), | ||
| "expected last row blank: {r_last:?}" | ||
| composer_found, | ||
| "expected composer placeholder to be rendered with the status widget active" | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this would be better as a snapshot test, it's quite hard to understand what this is testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex replace this with a snapshot test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
- Replaced manual buffer assertions in the bottom pane height regression tests with reusable insta snapshot helpers to make the expectations clearer. codex-rs/tui/src/bottom_pane/mod.rsL522-L546 codex-rs/tui/src/bottom_pane/mod.rsL722-L761
- Added dedicated snapshots that capture the full-height layout as well as the height-2 and height-1 collapse scenarios for the bottom pane. codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__tests__status_and_composer_fill_height_without_bottom_padding.snapL1-L11 codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__tests__status_hidden_when_height_too_small_height_2.snapL1-L6 codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__tests__status_hidden_when_height_too_small_height_1.snapL1-L5
Testing
⚠️ just fmt(prints nightly-only warning noise from cargo fmt)- ✅
cargo test -p codex-tui
codex-rs/tui/src/bottom_pane/mod.rs
Outdated
| assert!( | ||
| row0.contains("Working") || row1.contains("Working"), | ||
| "expected status header to be visible at height=2: row0={row0:?}, row1={row1:?}" | ||
| !row0.contains("Working") && !row1.contains("Working"), | ||
| "expected status header to collapse at height=2: row0={row0:?}, row1={row1:?}" | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should also be snapshot imo
| "• Thinking (0s • esc to interrupt) " | ||
| " " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems off, though low-pri as generally we don't care too much about height-2 terminals.
We don't need the bottom padding. It currently just makes the footer look off-centered.
Before:

After:
