fix(tui): adapt collab foundation to refreshed main

Preserve the collab transcript fixtures and current TUI style rules after rebasing onto the refreshed tui_app_server codebase.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Friel
2026-03-28 18:24:49 -07:00
co-authored by Codex
parent ed0cff78a6
commit 77c69e35b7
5 changed files with 7 additions and 5 deletions
@@ -21,7 +21,6 @@ use async_trait::async_trait;
use codex_protocol::ThreadId;
use codex_protocol::models::ResponseInputItem;
use codex_protocol::openai_models::ReasoningEffort;
use codex_protocol::openai_models::ReasoningEffortPreset;
use codex_protocol::protocol::AgentSpawnMode;
use codex_protocol::protocol::CollabAgentInteractionBeginEvent;
use codex_protocol::protocol::CollabAgentInteractionEndEvent;
@@ -5,6 +5,7 @@ use crate::agent::next_thread_spawn_depth;
use crate::agent::role::DEFAULT_ROLE_NAME;
use crate::agent::role::apply_role_to_config;
use codex_protocol::AgentPath;
use codex_protocol::protocol::AgentSpawnMode;
use codex_protocol::protocol::InterAgentCommunication;
use codex_protocol::protocol::Op;
@@ -170,6 +171,7 @@ impl ToolHandler for Handler {
prompt,
model: effective_model,
reasoning_effort: effective_reasoning_effort,
spawn_mode: AgentSpawnMode::Spawn,
status,
}
.into(),
+1
View File
@@ -2409,6 +2409,7 @@ async fn collab_spawn_end_shows_requested_model_and_effort() {
prompt: "Explore the repo".to_string(),
model: "gpt-5".to_string(),
reasoning_effort: ReasoningEffortConfig::High,
spawn_mode: codex_protocol::protocol::AgentSpawnMode::Spawn,
status: AgentStatus::PendingInit,
}),
});
+3 -3
View File
@@ -643,7 +643,7 @@ pub(crate) fn new_subagent_spawned_cell(name: &str, prompt_preview: &str) -> Pla
if !preview.is_empty() {
lines.push(Line::from(vec![
" └ ".dim(),
Span::from(format!("\"{preview}\"" )).dim(),
Span::from(format!("\"{preview}\"")).dim(),
]));
}
@@ -689,7 +689,7 @@ fn status_span_for_panel(agent: &SubagentPanelAgent) -> Span<'static> {
match &agent.status {
AgentStatus::PendingInit if agent.is_watchdog => "idle".dim(),
AgentStatus::PendingInit | AgentStatus::Running => "running".cyan().bold(),
AgentStatus::Interrupted => "interrupted".yellow(),
AgentStatus::Interrupted => "interrupted".magenta(),
AgentStatus::Completed(_) => "completed".green(),
AgentStatus::Errored(_) => "errored".red(),
AgentStatus::Shutdown => "shutdown".dim(),
@@ -713,7 +713,7 @@ fn should_shimmer(agent: &SubagentPanelAgent, now: Instant) -> bool {
fn status_label_span(status: &AgentStatus) -> Span<'static> {
match status {
AgentStatus::PendingInit | AgentStatus::Running => "running".cyan().bold(),
AgentStatus::Interrupted => "interrupted".yellow(),
AgentStatus::Interrupted => "interrupted".magenta(),
AgentStatus::Completed(_) => "completed".green(),
AgentStatus::Errored(_) => "errored".red(),
AgentStatus::Shutdown => "shutdown".dim(),
+1 -1
View File
@@ -9,7 +9,6 @@ use crate::render::line_utils::prefix_lines;
use crate::text_formatting::truncate_text;
use codex_protocol::ThreadId;
use codex_protocol::openai_models::ReasoningEffort as ReasoningEffortConfig;
use codex_protocol::protocol::AgentSpawnMode;
use codex_protocol::protocol::AgentStatus;
use codex_protocol::protocol::CollabAgentInteractionEndEvent;
use codex_protocol::protocol::CollabAgentRef;
@@ -583,6 +582,7 @@ fn status_summary_spans(status: &AgentStatus) -> Vec<Span<'static>> {
#[cfg(test)]
mod tests {
use super::*;
use codex_protocol::protocol::AgentSpawnMode;
use crate::history_cell::HistoryCell;
#[cfg(target_os = "macos")]
use crossterm::event::KeyEvent;