mirror of
https://github.com/openai/codex.git
synced 2026-11-22 07:13:50 +00:00
Show action required in terminal title (#18372)
Implements #18162 This updates the TUI terminal title to show an explicit action-required state when Codex is blocked on user approval or input. The terminal title now uses the activity title item to cover both active work and blocked-on-user states, while still accepting the legacy spinner config value. Changes - Rename the terminal title item from `spinner` to `activity` while preserving legacy config compatibility - Show `[ ! ] Action Required `while approval or input overlays are active, with a blinking `[ . ]` alternate state - Suppress the normal working spinner while Codex is blocked on user action - Add targeted coverage for action-required title behavior and legacy title-item parsing Testing - Trigger an approval or input modal and confirm the tab title alternates between `[ ! ] Action Required` and `[ . ] Action Required` - Disable the activity title item and confirm the action-required title does not appear - Resolve the prompt and confirm the title returns to the normal spinning/idel state https://github.com/user-attachments/assets/e9ecc530-a6be-4fd7-b9a6-d550a790eb2c
This commit is contained in:
1 parent
e903d000b0
commit
e64c765673
20 files changed
+450
-68
No files matched your search
@@ -45,6 +45,7 @@ use ratatui::text::Line;
|
||||
use std::time::Duration;
|
||||
use std::time::Instant;
|
||||
|
||||
mod action_required_title;
|
||||
mod app_link_view;
|
||||
mod approval_overlay;
|
||||
mod mcp_server_elicitation;
|
||||
@@ -53,6 +54,8 @@ mod request_user_input;
|
||||
mod status_line_setup;
|
||||
mod status_surface_preview;
|
||||
mod title_setup;
|
||||
pub(crate) use action_required_title::ACTION_REQUIRED_PREVIEW_PREFIX;
|
||||
pub(crate) use action_required_title::build_action_required_title_text;
|
||||
pub(crate) use app_link_view::AppLinkElicitationTarget;
|
||||
pub(crate) use app_link_view::AppLinkSuggestionType;
|
||||
pub(crate) use app_link_view::AppLinkView;
|
||||
@@ -1023,6 +1026,11 @@ impl BottomPane {
|
||||
self.is_task_running
|
||||
}
|
||||
|
||||
pub(crate) fn terminal_title_requires_action(&self) -> bool {
|
||||
self.active_view()
|
||||
.is_some_and(bottom_pane_view::BottomPaneView::terminal_title_requires_action)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn has_active_view(&self) -> bool {
|
||||
!self.view_stack.is_empty()
|
||||
|
||||
Reference in new issue
Block a user