feat: add shortcuts for cycling orchestration subagents#11760
feat: add shortcuts for cycling orchestration subagents#11760oz-for-oss[bot] wants to merge 11 commits into
Conversation
Co-Authored-By: Sathvik Vangavolu <113149539+vikvang@users.noreply.github.com>
|
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 adds editable keybindings for cycling through orchestration subagents and wires the actions through terminal view navigation using the orchestration topology helper.
Concerns
- Cycling from nested subagents uses the immediate parent as the traversal root, so grandchildren do not cycle through the full orchestration pill-bar order.
- This is a user-facing keyboard navigation change, but the PR description explicitly says no screenshots or screen recording were included. For this user-facing change, please include screenshots or a screen recording demonstrating it working end to end.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
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 |
Co-Authored-By: Oz <oz-agent@warp.dev>
|
Meta-nit: we should probably change the Changelog message to smth that reflects the new keybind? i.e., |
There was a problem hiding this comment.
Overview
This PR adds editable terminal actions and keybindings for cycling between orchestration agent conversations, plus topology tests for adjacent navigation.
Concerns
- The navigation helper uses raw descendant spawn order, but the rendered pill bar applies pin/status/recency ordering, so the keyboard shortcuts can move to a different conversation than the visible next/previous pill.
- The default shortcuts are registered as ctrl-only bindings instead of the described cmd-alt/ctrl-alt bindings; the previous shortcut also collides with the terminal Escape control chord.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| let orchestration_root_id = history | ||
| .resolved_parent_conversation_id_for_conversation(active_conversation) | ||
| .unwrap_or(active_conversation_id); | ||
| let descendant_ids = descendant_conversation_ids_in_spawn_order(history, orchestration_root_id); |
There was a problem hiding this comment.
There was a problem hiding this comment.
I think this is valid, we aren't accounting for pinned subagents. Can you TAL?
vkodithala
left a comment
There was a problem hiding this comment.
Looking good, left a few comments. Run a cargo fmt while you're at it to appease the formatter 🙏
| let orchestration_root_id = history | ||
| .resolved_parent_conversation_id_for_conversation(active_conversation) | ||
| .unwrap_or(active_conversation_id); | ||
| let descendant_ids = descendant_conversation_ids_in_spawn_order(history, orchestration_root_id); |
There was a problem hiding this comment.
I think this is valid, we aren't accounting for pinned subagents. Can you TAL?
| /// Navigate to the previous child agent conversation in the active | ||
| /// orchestration tree. | ||
| CyclePreviousOrchestrationChildAgent, | ||
| /// Navigate to the next child agent conversation in the active | ||
| /// orchestration tree. | ||
| CycleNextOrchestrationChildAgent, |
There was a problem hiding this comment.
CyclePreviousOrchestrationChildAgent isn't the best name? Also idk if this should be two different variants, why not something like NextOrchestrationChildAgent { direction }?
Co-Authored-By: Oz <oz-agent@warp.dev>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review 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 adds editable TerminalView actions and default shortcuts for cycling through orchestrator/subagent conversations, plus shared topology ordering helpers and tests.
Concerns
- The new default shortcuts use plain
ctrl-[/ctrl-], which the existing TerminalView binding validator treats as PTY control characters and rejects unless the action or keystroke is explicitly allowlisted. As written, the advertised defaults are not valid TerminalView bindings.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| .with_context_predicate( | ||
| id!("Terminal") & id!(flags::IS_ANY_AI_ENABLED) & id!(flags::ACTIVE_AGENT_VIEW), | ||
| ) | ||
| .with_mac_key_binding("ctrl-]") |
There was a problem hiding this comment.
ctrl-] and the ctrl-[ binding below match CONTROL_CHARACTER_KEY_REGEX, and TerminalView registers is_binding_pty_compliant, so these defaults are rejected unless this action is explicitly allowlisted or a PTY-compliant shortcut is used.
…lidator Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
…nflicts Co-Authored-By: Oz <oz-agent@warp.dev>
vkodithala
left a comment
There was a problem hiding this comment.
Generally I have a few questions, but the logic looks good!
| // Walk the full descendant tree in pre-order, preserving each | ||
| // parent's child registration order so nested branches stay | ||
| // contiguous and grandchildren remain visible in the row. |
There was a problem hiding this comment.
Is this comment now outdated? Can we also make sure that there's isn't downstream logic we are breaking by making this change?
| /// Returns descendants sorted in the same visual ordering used by the | ||
| /// orchestration pill bar: | ||
| /// 1) pinned children | ||
| /// 2) unpinned children | ||
| /// each bucket ordered by status priority, then done-recency, then spawn order. |
There was a problem hiding this comment.
If this logic is also used for ordering by the orchestration pill bar, is there an opportunity to centralize logic? We're probably reiterating the same logic 2x, can you check and see if we can reuse?
| .with_context_predicate( | ||
| id!("Terminal") & id!(flags::IS_ANY_AI_ENABLED) & id!(flags::ACTIVE_AGENT_VIEW), | ||
| ) | ||
| .with_mac_key_binding("ctrl-]") |
| fn cycle_orchestration_child_agent( | ||
| &mut self, | ||
| direction: OrchestrationNavigationDirection, | ||
| ctx: &mut ViewContext<Self>, | ||
| ) { | ||
| let active_conversation_id = self | ||
| .agent_view_controller | ||
| .as_ref(ctx) | ||
| .agent_view_state() | ||
| .active_conversation_id(); | ||
| let Some(active_conversation_id) = active_conversation_id else { | ||
| return; | ||
| }; | ||
| let target_conversation_id = adjacent_orchestration_child_conversation_id( | ||
| BlocklistAIHistoryModel::as_ref(ctx), | ||
| active_conversation_id, | ||
| direction, | ||
| ); | ||
| let Some(target_conversation_id) = target_conversation_id else { | ||
| return; | ||
| }; | ||
|
|
||
| ctx.emit(Event::RevealChildAgent { | ||
| conversation_id: target_conversation_id, | ||
| }); | ||
| } |
There was a problem hiding this comment.
We use TerminalView a lot and I'm a little wary of adding onto it. This is feedback Pei gave me earlier, and something DS cares about too. Is it absolutely necessary to include this here?
| // on TerminalView on all platforms. | ||
| Keystroke::parse("ctrl-c").expect("should be able to construct ctrl-c keystroke"), | ||
| // Orchestration conversation cycling defaults use ctrl-[ / ctrl-] on all platforms. | ||
| // These intentionally overlap PTY control characters and are validated here. |
There was a problem hiding this comment.
What does this mean? Is this what we want? I want to make sure we aren't regressing anything important here.
Co-Authored-By: Oz <oz-agent@warp.dev>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review 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 adds editable Warp AI keybindings for cycling through orchestration conversations, factors pill ordering into the shared topology helper, and covers the direct child navigation and binding cases with tests.
Concerns
- No blocking correctness, security, or spec-drift concerns found. The attached spec context reports no approved repository spec.
- The inline suggestions align the keybinding labels with the implemented behavior, which includes cycling back to the orchestrator.
Verdict
Found: 0 critical, 0 important, 2 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
Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
Co-Authored-By: Oz <oz-agent@warp.dev>
Closes #11734
Description
Adds editable Warp AI keybindings for cycling through orchestration sessions from the active agent-view pane. The new actions follow the same orchestration topology/pill-bar ordering as the UI, now cycle through both the orchestrator and its child agents, and reuse the existing reveal path so in-flight panes are preserved.
Default bindings:
ctrl-alt-tabon macOS, Linux, and Windows.ctrl-alt-shift-tabon macOS, Linux, and Windows.Linked Issue
ready-to-specorready-to-implement.Testing
cargo fmtgit --no-pager diff --checkcargo test -p warp --lib ai::blocklist::orchestration_topology— 11 passed.cargo test -p warp adjacent_orchestration_child_navigation— 4 passed.cargo clippy --workspace --all-targets --all-features --tests -- -D warnings— attempted, blocked by missing generated channel config JSON files whenrelease_bundleis enabled withoutwarp-channel-config.cargo clippy -p warp --lib --all-features --tests -- -D warningsI have manually tested my changes locally with
./script/runScreenshots / Videos
warp-oss.-.Build.Simple.HTML.Game.With.Subagents.-.29.May.2026.mp4
Agent Mode
CHANGELOG-IMPROVEMENT: Added keyboard shortcuts for cycling through orchestrator and subagent sessions in Agent Mode.
Co-Authored-By: Oz oz-agent@warp.dev