From 0f7dc9a9edded91df1ca5cc2e6c8486a5d24bd71 Mon Sep 17 00:00:00 2001 From: Edward Compton Date: Thu, 18 Jun 2026 16:34:43 +0100 Subject: [PATCH] agent_ui: Use the thread title for agent notifications (#59377) The agent-waiting notification heading was hardcoded to the agent id, showing "claude acp" for external agents. Use the thread's own title, which external agents now provide via session info updates, and fall back to the agent id only for threads that aren't titled yet. # Objective - External agent notifications were just headed generically I.e. "claude acp". There was a TODO in the code to use the thread name, so that it's clear which thread actually produced the notification. ## Solution - Use the thread name, seems it was inscope in the code already from a previous change. ## Testing Tested manually by triggering a notification and seeing the thread name instead of acp-claude. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - this code path wasn't tested and doesn't seem like it needs it, but willing to be corrected. - [x] Performance impact has been considered and is acceptable Release Notes: - agent: Include thread title in notification when Zed is not focused --- crates/agent_ui/src/conversation_view.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/agent_ui/src/conversation_view.rs b/crates/agent_ui/src/conversation_view.rs index 1654ff0d02..ce01dcfc01 100644 --- a/crates/agent_ui/src/conversation_view.rs +++ b/crates/agent_ui/src/conversation_view.rs @@ -2695,8 +2695,9 @@ impl ConversationView { let root_work_dirs = root_thread.work_dirs().cloned(); let root_title = root_thread.title(); - // TODO: Change this once we have title summarization for external agents. - let title = self.agent.agent_id().0; + let title = root_title + .clone() + .unwrap_or_else(|| self.agent.agent_id().0); match settings.notify_when_agent_waiting { NotifyWhenAgentWaiting::PrimaryScreen => {