Show live task details in the agent command center (#42455)

## What changed

- Add bounded detail previews for the selected task, including pending approval or user-input requests, live reasoning headings, and the latest agent message.
- Prefer the most urgent child task with useful detail while keeping the task list compact.
- Populate historical last messages from existing thread reads and update live details from already-delivered events without attaching to additional threads.
- Clear stale previews after reverts, event-stream gaps, reconnects, and thread lifecycle changes.

## Testing

- Add coverage and snapshots for attention requests, live activity, historical messages, stale refreshes, and attachment changes.

GitOrigin-RevId: 5de4b8aa3bc5bf9653a40c44b827f7aa85c8cf89
This commit is contained in:
Eric Traut authored and copyberry committed 2026-09-03 05:33:57 +00:00
1 parent c9fecd3fa0
commit 8ff74cc9b1
20 files changed
+757 -42

No files matched your search

@@ -128,6 +128,9 @@ async fn reconnect_daemon_command_center_after_socket_replacement_without_a_conv
.map(|thread| Ok((ThreadId::from_string(&thread.id)?, Some(thread.clone()))))
.collect::<Result<HashMap<_, _>>>()?;
app.agents_overview.threads = stale_threads.clone();
app.agents_overview
.last_messages
.insert(selected, "Pre-disconnect answer".into());
app.agents_overview.initialized = overview_initialized;
let view = app.agents_overview_view(
stale.clone(),
@@ -248,6 +251,7 @@ async fn reconnect_daemon_command_center_after_socket_replacement_without_a_conv
let disconnected = session.next_event().await.unwrap();
app.handle_app_server_event(&session, disconnected).await;
assert!(app.reconnect.offline);
assert!(app.agents_overview.last_messages.is_empty());
assert!(refresh.await.unwrap_err().is_cancelled());
assert_eq!(
(
@@ -260,6 +264,7 @@ async fn reconnect_daemon_command_center_after_socket_replacement_without_a_conv
&session,
stale_request,
Ok(AgentsOverviewThreadRefresh {
last_messages: HashMap::new(),
threads: HashMap::new(),
recent_seed_complete: false,
}),
@@ -381,6 +386,7 @@ async fn reconnect_daemon_command_center_after_socket_replacement_without_a_conv
&session,
stale_request,
Ok(AgentsOverviewThreadRefresh {
last_messages: HashMap::new(),
threads: stale_threads,
recent_seed_complete: true,
}),
@@ -13,7 +13,7 @@ expression: "render_bottom_popup(&app.chat_widget, 100)"
│ Project
│ /tmp/project
│
│ Latest activity
│ Prompt
│ Selected task
│
│
@@ -13,7 +13,7 @@ expression: "render_bottom_popup(&app.chat_widget, 100)"
│ Project
│ /tmp/project
│
│ Latest activity
│ Prompt
│ Selected task
│
│
@@ -13,7 +13,7 @@ expression: "render_bottom_popup(&app.chat_widget, 100)"
│ Project
│ /tmp/project
│
│ Latest activity
│ Prompt
│ New task
│
│