From 5bdc88970801bbdf5f67dbdb669281360cd0406d Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Fri, 7 Aug 2026 02:41:52 +0000 Subject: [PATCH] Use consistent TUI input placeholders (#37360) ## What changed - Show `Ask Codex to do anything` in the main conversation input. - Show `Ask a follow-up question` in side conversation inputs. - Remove randomized example prompt selection and update the side conversation snapshots. GitOrigin-RevId: 2f6d310cf80bfa9743b7695621892a821eda4a18 --- codex-rs/tui/src/chatwidget.rs | 19 ++----------------- codex-rs/tui/src/chatwidget/constructor.rs | 6 ++---- ...e_context_label_preserves_status_line.snap | 2 +- ...ide_context_label_shows_parent_status.snap | 2 +- codex-rs/tui/src/chatwidget/tests/helpers.rs | 6 ------ 5 files changed, 6 insertions(+), 29 deletions(-) diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 4948cce1e3..11c9656271 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -165,7 +165,6 @@ use crossterm::event::KeyCode; use crossterm::event::KeyEvent; use crossterm::event::KeyEventKind; use crossterm::event::KeyModifiers; -use rand::Rng; use ratatui::buffer::Buffer; use ratatui::layout::Rect; use ratatui::style::Modifier; @@ -1977,22 +1976,8 @@ impl Drop for ChatWidget { } } -const PLACEHOLDERS: [&str; 8] = [ - "Explain this codebase", - "Summarize recent commits", - "Implement {feature}", - "Find and fix a bug in @filename", - "Write tests for @filename", - "Improve documentation in @filename", - "Run /review on my current changes", - "Use /skills to list available skills", -]; - -const SIDE_PLACEHOLDERS: [&str; 3] = [ - "Check recently modified functions for compatibility", - "How many files have been modified?", - "Will this algorithm scale well?", -]; +const PLACEHOLDER: &str = "Ask Codex to do anything"; +const SIDE_PLACEHOLDER: &str = "Ask a follow-up question"; // Extract the first bold (Markdown) element in the form **...** from `s`. // Returns the inner text if found; otherwise `None`. diff --git a/codex-rs/tui/src/chatwidget/constructor.rs b/codex-rs/tui/src/chatwidget/constructor.rs index 06ccca7313..ebb0f4e1e4 100644 --- a/codex-rs/tui/src/chatwidget/constructor.rs +++ b/codex-rs/tui/src/chatwidget/constructor.rs @@ -36,10 +36,8 @@ impl ChatWidget { let mut config = config; config.model = model.clone(); let prevent_idle_sleep = config.features.enabled(Feature::PreventIdleSleep); - let mut rng = rand::rng(); - let placeholder = PLACEHOLDERS[rng.random_range(0..PLACEHOLDERS.len())].to_string(); - let side_placeholder = - SIDE_PLACEHOLDERS[rng.random_range(0..SIDE_PLACEHOLDERS.len())].to_string(); + let placeholder = PLACEHOLDER.to_string(); + let side_placeholder = SIDE_PLACEHOLDER.to_string(); let model_override = model.as_deref(); let model_for_header = model diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__side_context_label_preserves_status_line.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__side_context_label_preserves_status_line.snap index 6ab706777b..454a67e000 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__side_context_label_preserves_status_line.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__side_context_label_preserves_status_line.snap @@ -4,6 +4,6 @@ expression: terminal.backend() --- " " " " -"› Check recently modified functions for compatibility " +"› Ask a follow-up question " " " " gpt-5.6-sol Side from main thread · ctrl + / to switch · ctrl + c to close " diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__side_context_label_shows_parent_status.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__side_context_label_shows_parent_status.snap index 84c11757e5..b873d754c3 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__side_context_label_shows_parent_status.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__side_context_label_shows_parent_status.snap @@ -4,6 +4,6 @@ expression: terminal.backend() --- " " " " -"› Check recently modified functions for compatibility " +"› Ask a follow-up question " " " " Side from main thread · main needs input · ctrl + / to switch · ctrl + c to cl" diff --git a/codex-rs/tui/src/chatwidget/tests/helpers.rs b/codex-rs/tui/src/chatwidget/tests/helpers.rs index a7e9fe2012..fbf04b2987 100644 --- a/codex-rs/tui/src/chatwidget/tests/helpers.rs +++ b/codex-rs/tui/src/chatwidget/tests/helpers.rs @@ -206,12 +206,6 @@ pub(super) async fn make_chatwidget_manual_with_auth( let mut widget = ChatWidget::new_with_op_target(common, super::CodexOpTarget::Direct(op_tx)); widget.transcript.active_cell = None; widget.transcript.active_cell_revision = 0; - widget.normal_placeholder_text = "Ask Codex to do anything".to_string(); - widget.side_placeholder_text = - "Check recently modified functions for compatibility".to_string(); - widget - .bottom_pane - .set_placeholder_text(widget.normal_placeholder_text.clone()); widget.set_model(&resolved_model); (widget, rx, op_rx) }