QUALITY-731: round-trip orchestrator agent short name through task records#11090
QUALITY-731: round-trip orchestrator agent short name through task records#11090cephalonaut wants to merge 4 commits into
Conversation
…cords Threads the orchestrator-supplied short name (`run_agents.agent_run_configs[i].name`) through SpawnAgentRequest and AmbientAgentTask so shared-session viewers can display the short label (e.g. "frontend-tests") instead of the descriptive title or a truncated prompt. Wire contract: REST/JSON `name`, GraphQL `agentName`, Rust `agent_name`, DB `agent_name`. SpawnAgentRequest.name uses `skip_serializing_if = "Option::is_none"`; AmbientAgentTask.name uses `#[serde(default)]` for backward-compatible deserialization from older servers. New display_name() helper on AmbientAgentTask returns trimmed name -> trimmed title -> "Agent" so the UI never falls back to a blank label. Co-Authored-By: Oz <oz-agent@warp.dev>
Keep the viewer pill/breadcrumb/hover/transcript surfaces using the orchestrator-supplied short name via display_name(), but leave ConversationDetailsData::from_task on task.title for now. Product may ultimately want to show both name and title in the side pane; defer that decision until there is real feedback rather than guess at the shape. Removes the two details-panel display_name tests added in the initial implementation. The viewer/details fixture in create_test_task still includes name: None to satisfy the new field on AmbientAgentTask. Updates the client TECH.md to document the deferral. Co-Authored-By: Oz <oz-agent@warp.dev>
Trim/remove comment blocks added in the initial QUALITY-731 commit that either restated 'name vs title' multiple times or repeated information already visible from the symbol or types. Keeps the doc comment on display_name() (the lookup-order contract), tightens the field doc on AmbientAgentTask.name, and shortens the per-site notes around None literals and trim points. No behavior changes. Co-Authored-By: Oz <oz-agent@warp.dev>
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR threads the orchestrator-supplied child agent name through the task request/response paths and updates viewer registration to prefer the new display-name fallback. The REST and GraphQL payloads remain optional/backward-compatible, and the local/remote child paths both normalize empty names before persistence.
Concerns
- Non-blocking: the added client spec references a contributor-local absolute path; use a portable reference so the checked-in spec remains useful outside that workstation.
Verdict
Found: 0 critical, 0 important, 1 suggestions
Approve with nits
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| - `app/src/ai/blocklist/history_model.rs (398-433)` — `start_new_child_conversation` writes its `name` argument directly into `AIConversation::agent_name`. | ||
| - `app/src/ai/agent/conversation.rs (776-785, 1293-1309)` — `agent_name()` backs orchestration labels; `title()` falls back to `fallback_display_title`. | ||
| - `app/src/ai/conversation_details_panel.rs (285-352)` — `ConversationDetailsData::from_task` currently uses `task.title` as the side-pane title. | ||
| The matching server spec in `/Users/matthew/src/roundtrip-agent-name/warp-server/specs/QUALITY-731/TECH.md` defines the wire contract: task responses include optional JSON `name` while retaining descriptive `title`. |
There was a problem hiding this comment.
💡 [SUGGESTION] Avoid checking in a contributor-local absolute path; reference the linked server PR or a repository-relative spec path instead.
| The matching server spec in `/Users/matthew/src/roundtrip-agent-name/warp-server/specs/QUALITY-731/TECH.md` defines the wire contract: task responses include optional JSON `name` while retaining descriptive `title`. | |
| The matching server spec in the linked warp-server PR defines the wire contract: task responses include optional JSON `name` while retaining descriptive `title`. |
…l comment) Apply four reviewer findings: - Sync the client GraphQL schema docstring for CreateAgentTaskInput.agentName with the server wording and explicit reference to run_agents.agent_run_configs[i].name, so the file does not drift on the next graphql-codegen run. - Align the REST trim in launch_remote_child with the GraphQL trim in AIClient::create_agent_task; both use the (let trimmed = name.trim(); ...) pattern, with a cross-reference comment on each side. - Note in orchestration_viewer_model.rs that on the name=None back-compat path agent_name and fallback_display_title are deliberately both seeded from task.title because the two surfaces consume different fallback chains. - Add an in-code comment on ConversationDetailsData::from_task pointing at specs/QUALITY-731/TECH.md to flag the deferred title surface. Declined Finding 8: the make_task wrapper provides cleaner call sites for the seven non-name test cases. Co-Authored-By: Oz <oz-agent@warp.dev>
Description
Threads the orchestrator-supplied agent short name (
run_agents.agent_run_configs[i].name) through the server task record so shared-session viewers can display the short label (e.g.frontend-tests) instead of the descriptivetitleor a truncated prompt.Wire contract
namefield alongside the existing requiredtitle.CreateAgentTaskInput.agentName: Stringmutation field.Option<String>, deserialized with#[serde(default)]for backward-compat.agent_name(server PR).SpawnAgentRequest.nameusesskip_serializing_if = "Option::is_none"so older servers see the same payload shape as today.Client changes
AmbientAgentTaskgainsname: Option<String>and adisplay_name()helper that returns trimmedname→ trimmedtitle→"Agent", so the UI never renders a blank pill.AIClient::create_agent_tasktakes anagent_name: Option<String>argument; whitespace-only values normalize toNone.launch_remote_childforwardsrequest.nameintoSpawnAgentRequest.name(trimmed, empty →None).prepare_local_harness_child_launch/launch_local_harness_childthread the same name intocreate_agent_taskso local harness children get the orchestrator label, not just remote ones.OrchestrationViewerModel::apply_children_fetchusestask.display_name()for the child conversation's pill label and stashes the descriptivetask.titleviaset_fallback_display_titleso it stays discoverable.ConversationDetailsData::from_taskusesdisplay_name()for the side-pane header title; the raw prompt remains insource_prompt.Server PR: https://github.com/warpdotdev/warp-server/pull/11223
Testing
cargo test -p warp):ai::ambient_agents::task::tests::display_name_*— 5 cases covering name, title, whitespace, blank, and trim fallback.terminal::shared_session::viewer::orchestration_viewer_model::tests::registers_child_agent_name_*— 4 cases covering name-vs-title registration and the blank/whitespace fallbacks.ai::conversation_details_panel::tests::test_from_task_uses_orchestrator_short_name_as_panel_titleand the matching missing-name fallback case.pane_group::pane::local_harness_launch::tests::prepare_local_codex_child_*— confirms theagent_nameargument is threaded intocreate_agent_task(both with and without a value).server::server_api::ai::tests::spawn_agent_request_serializes_name_when_present/_omits_name_when_none— pins the on-wire JSON shape.cargo fmt -- --checkclean.cargo clippy --workspace --exclude warp_completer --exclude command-signatures-v2 --all-targets --tests -- -D warningsclean.Agent Mode