Lightweight coding agent that runs in your terminal
Rust
Add spacing before queued status indicator messages (#3474)
Ahmed Ibrahime9327222927a
diff --git a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_queued_messages.snap b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_queued_messages.snapindex 0290eb6976..7f2c267f21 100644--- a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_queued_messages.snap+++ b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_queued_messages.snap@@ -3,10 +3,10 @@ source: tui/src/status_indicator_widget.rsexpression: terminal.backend()---" Working (0s • Esc to interrupt) "+" "" ↳ first "" ↳ second "" ⌥↑ edit "" "" "" "-" "diff --git a/codex-rs/tui/src/status_indicator_widget.rs b/codex-rs/tui/src/status_indicator_widget.rsindex bf392b6997..e3a1b854db 100644--- a/codex-rs/tui/src/status_indicator_widget.rs+++ b/codex-rs/tui/src/status_indicator_widget.rs@@ -63,10 +63,13 @@ impl StatusIndicatorWidget {}pub fn desired_height(&self, width: u16) -> u16 {- // Status line + wrapped queued messages (up to 3 lines per message)+ // Status line + optional blank line + wrapped queued messages (up to 3 lines per message)// + optional ellipsis line per truncated message + 1 spacer linelet inner_width = width.max(1) as usize;let mut total: u16 = 1; // status line+ if !self.queued_messages.is_empty() {+ total = total.saturating_add(1); // blank line between status and queued messages+ }let text_width = inner_width.saturating_sub(3); // account for " ↳ " prefixif text_width > 0 {for q in &self.queued_messages {@@ -168,6 +171,9 @@ impl WidgetRef for StatusIndicatorWidget {// Build lines: status, then queued messages, then spacer.let mut lines: Vec<Line<'static>> = Vec::new();lines.push(Line::from(spans));+ if !self.queued_messages.is_empty() {+ lines.push(Line::from(""));+ }// Wrap queued messages using textwrap and show up to the first 3 lines per message.let text_width = area.width.saturating_sub(3); // " ↳ " prefixfor q in &self.queued_messages {