From 65462b1b2248a6061a80d03f5ffc6cee267bc40b Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 29 Jun 2026 09:39:02 -0400 Subject: [PATCH] Document TUI task activity --- codex-rs/tui/src/bottom_pane/task_activity.rs | 4 ++++ codex-rs/tui/src/slash_command.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/codex-rs/tui/src/bottom_pane/task_activity.rs b/codex-rs/tui/src/bottom_pane/task_activity.rs index 16a52c6199..73b302bca9 100644 --- a/codex-rs/tui/src/bottom_pane/task_activity.rs +++ b/codex-rs/tui/src/bottom_pane/task_activity.rs @@ -1,3 +1,7 @@ +/// Tracks foreground work independently from MCP startup running in the background. +/// +/// The aggregate busy state preserves the existing composer and spinner behavior, while the +/// individual states let command gating and status ownership distinguish the two lifecycles. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] pub(crate) struct TaskActivity { foreground_task_running: bool, diff --git a/codex-rs/tui/src/slash_command.rs b/codex-rs/tui/src/slash_command.rs index 15698b8f00..7c5c36511b 100644 --- a/codex-rs/tui/src/slash_command.rs +++ b/codex-rs/tui/src/slash_command.rs @@ -248,6 +248,10 @@ impl SlashCommand { self == SlashCommand::Review || self.available_during_task() } + /// Whether this command is allowed during MCP startup but not during foreground work. + /// + /// Callers use this distinction to preserve the draft until dispatch confirms that no + /// foreground task blocks the command. pub fn available_during_background_task_only(self) -> bool { self.available_during_mcp_startup() && !self.available_during_task() }