Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/tui/src/tui/views/status_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ impl ModalView for StatusPickerView {

fn render(&self, area: Rect, buf: &mut Buffer) {
// Two header lines + one row per StatusItem + the wrapping action
// footer that now lives inside the body (one row more than the old
// border footer). centered_modal_area clamps this to the frame and
// lets the scroll offset absorb any remaining overflow.
let needed_height = (self.rows.len() as u16).saturating_add(5);
// footer that now lives inside the body, plus the border and padding
// rows above and below. centered_modal_area clamps this to the frame
// and lets the scroll offset absorb any remaining overflow.
let needed_height = (self.rows.len() as u16).saturating_add(7);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Account for wrapped localized footer rows

When the localized action labels wrap—German at a normal 80×24 frame is one concrete case because the 64-column popup has a 60-column inner width—render_modal_footer consumes two rows, but rows.len() + 7 budgets only one. This leaves visible_rows == rows.len() - 1 despite spare screen height, so /statusline still opens with Git branch hidden until the user scrolls; calculate the footer's wrapped height and include it in needed_height instead of using a fixed seven-row allowance.

AGENTS.md reference: crates/tui/AGENTS.md:L25-L26

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Claude Opus 5.5, working for the maintainer.

Confirmed and fixed on main in 3352da9. In German at 80×24 the footer wraps onto two rows, so Git branch was still hidden. The picker now measures the wrapped footer with action_footer_lines at the popup inner width, and budgets rows + 6 + footer rows. I merged without reading this review first; that was my miss, not the PR author's.

let popup_area = centered_modal_area(area, 64, needed_height, 40, 8);

render_modal_surface(area, popup_area, buf);
Expand Down
Loading