From 9617b69c8a1b549173bd0a1b6083b11a4c9c26f6 Mon Sep 17 00:00:00 2001 From: Jeremy Rose <172423086+nornagon-openai@users.noreply.github.com> Date: Thu, 2 Oct 2025 18:17:34 -0700 Subject: [PATCH] =?UTF-8?q?tui:=20=E2=80=A2=20Working,=20100%=20context=20?= =?UTF-8?q?dim=20(#4629)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add a `•` before the "Working" shimmer - make the percentage in "X% context left" dim instead of bold Screenshot 2025-10-02 at 2 29 57 PM --- codex-rs/tui/src/bottom_pane/footer.rs | 2 +- codex-rs/tui/src/bottom_pane/mod.rs | 4 ++-- .../codex_tui__chatwidget__tests__chat_small_running_h2.snap | 2 +- ...sts__chatwidget_exec_and_status_layout_vt100_snapshot.snap | 2 +- .../codex_tui__chatwidget__tests__status_widget_active.snap | 2 +- codex-rs/tui/src/diff_render.rs | 2 +- codex-rs/tui/src/history_cell.rs | 2 +- ...ui__status_indicator_widget__tests__renders_truncated.snap | 2 +- ...indicator_widget__tests__renders_with_queued_messages.snap | 2 +- ..._indicator_widget__tests__renders_with_working_header.snap | 2 +- codex-rs/tui/src/status_indicator_widget.rs | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/codex-rs/tui/src/bottom_pane/footer.rs b/codex-rs/tui/src/bottom_pane/footer.rs index 3fc9b2e1..b4c5617d 100644 --- a/codex-rs/tui/src/bottom_pane/footer.rs +++ b/codex-rs/tui/src/bottom_pane/footer.rs @@ -222,7 +222,7 @@ fn context_window_line(percent: Option) -> Line<'static> { let mut spans: Vec> = Vec::new(); match percent { Some(percent) => { - spans.push(format!("{percent}%").bold()); + spans.push(format!("{percent}%").dim()); spans.push(" context left".dim()); } None => { diff --git a/codex-rs/tui/src/bottom_pane/mod.rs b/codex-rs/tui/src/bottom_pane/mod.rs index 88a9e88d..6fe673a2 100644 --- a/codex-rs/tui/src/bottom_pane/mod.rs +++ b/codex-rs/tui/src/bottom_pane/mod.rs @@ -716,8 +716,8 @@ mod tests { top.push(buf[(x, 1)].symbol().chars().next().unwrap_or(' ')); } assert!( - top.trim_start().starts_with("Working"), - "expected top row to start with 'Working': {top:?}" + top.trim_start().starts_with("• Working"), + "expected top row to start with '• Working': {top:?}" ); assert!( top.contains("Working"), 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.snap index 3b236fff..630d1a3b 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 @@ -2,5 +2,5 @@ source: tui/src/chatwidget/tests.rs expression: terminal.backend() --- -" Thinking (0s • esc to interrupt) " +"• Thinking (0s • esc to interrupt) " "› Ask Codex to do anything " diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chatwidget_exec_and_status_layout_vt100_snapshot.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chatwidget_exec_and_status_layout_vt100_snapshot.snap index a05ef279..b83bf8a9 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chatwidget_exec_and_status_layout_vt100_snapshot.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chatwidget_exec_and_status_layout_vt100_snapshot.snap @@ -9,7 +9,7 @@ expression: term.backend().vt100().screen().contents() └ Search Change Approved Read diff_render.rs - Investigating rendering code (0s • esc to interrupt) +• Investigating rendering code (0s • esc to interrupt) › Summarize recent commits 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.snap index 46577460..7c3253a2 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 @@ -3,7 +3,7 @@ source: tui/src/chatwidget/tests.rs expression: terminal.backend() --- " " -" Analyzing (0s • esc to interrupt) " +"• Analyzing (0s • esc to interrupt) " " " " " "› Ask Codex to do anything " diff --git a/codex-rs/tui/src/diff_render.rs b/codex-rs/tui/src/diff_render.rs index b7fa5be5..6f5f7e7d 100644 --- a/codex-rs/tui/src/diff_render.rs +++ b/codex-rs/tui/src/diff_render.rs @@ -146,7 +146,7 @@ fn render_changes_block(rows: Vec, wrap_cols: usize, cwd: &Path) -> Vec> = vec!["• ".into()]; + let mut header_spans: Vec> = vec!["• ".dim()]; if let [row] = &rows[..] { let verb = match &row.change { FileChange::Add { .. } => "Added", diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index 4bab8afb..e91fce65 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -994,7 +994,7 @@ impl HistoryCell for PlanUpdateCell { indented_lines.extend(render_step(status, step)); } } - lines.extend(prefix_lines(indented_lines, " └ ".into(), " ".into())); + lines.extend(prefix_lines(indented_lines, " └ ".dim(), " ".into())); lines } diff --git a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_truncated.snap b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_truncated.snap index 95dbc33b..ba179808 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_truncated.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_truncated.snap @@ -2,5 +2,5 @@ source: tui/src/status_indicator_widget.rs expression: terminal.backend() --- -" Working (0s • esc " +"• Working (0s • esc " " " 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.snap index 7df7e5de..a46fbcc0 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 @@ -2,7 +2,7 @@ source: tui/src/status_indicator_widget.rs expression: terminal.backend() --- -" Working (0s • esc to interrupt) " +"• Working (0s • esc to interrupt) " " " " ↳ first " " ↳ second " diff --git a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_working_header.snap b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_working_header.snap index c02e8326..2b80830f 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_working_header.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_working_header.snap @@ -2,5 +2,5 @@ source: tui/src/status_indicator_widget.rs expression: terminal.backend() --- -" Working (0s • esc to interrupt) " +"• Working (0s • esc to interrupt) " " " diff --git a/codex-rs/tui/src/status_indicator_widget.rs b/codex-rs/tui/src/status_indicator_widget.rs index caf15b28..2660aa1b 100644 --- a/codex-rs/tui/src/status_indicator_widget.rs +++ b/codex-rs/tui/src/status_indicator_widget.rs @@ -160,7 +160,7 @@ impl WidgetRef for StatusIndicatorWidget { let pretty_elapsed = fmt_elapsed_compact(elapsed); // Plain rendering: no borders or padding so the live cell is visually indistinguishable from terminal scrollback. - let mut spans = vec![" ".into()]; + let mut spans = vec!["• ".dim()]; spans.extend(shimmer_spans(&self.header)); spans.extend(vec![ " ".into(),