Skip to content

fix(dispatch): nest orchestration agents without stealing focus - #164

Merged
Juliusolsson05 merged 1 commit into
mainfrom
fix/orchestration-dispatch-ui
May 16, 2026
Merged

Juliusolsson05 merged 1 commit into
mainfrom
fix/orchestration-dispatch-ui

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Summary

Fixes the first orchestration-agent UX pass after #163:

  • MCP-created orchestration children render indented under their parent in Dispatch, matching the linked-agent visual hierarchy.
  • Creating an orchestration child no longer steals the active tab or focused Dispatch row from the user.

Behavior

Orchestration agents keep their own metadata (orchestrationParentId) instead of reusing linkedParentId, but Dispatch grouping now treats both parent fields as visual nesting relationships. If the parent is not present in the same Dispatch group because of filters, pinning, or closure, the child still renders as a normal depth-0 row instead of disappearing.

createOrchestrationAgent still creates the child as a detached Dispatch session in the parent's project tab. It just leaves the user's current focus where it was; the MCP caller already receives the new sessionId as the control handle.

Files

  • src/renderer/src/workspace/dispatch/dispatchSelectors.ts — include orchestrationParentId in Dispatch nesting.
  • src/renderer/src/workspace/hook/actions/pane.ts — remove focus/tab stealing when MCP creates an orchestration child.

Verification

  • git diff --check
  • Previously live-smoked during MCP orchestration testing: create/list/send-prompt returned ok and created visible child agents.

Test Plan

  • Create an orchestration child through MCP and confirm it appears under the parent in Dispatch.
  • Confirm the parent/current row keeps focus after child creation.
  • Confirm manual linked agents still nest the same way as before.
  • Confirm orphaned/filtered children still render at depth 0 instead of disappearing.

@Juliusolsson05
Juliusolsson05 merged commit 0543e5b into main May 16, 2026
@Juliusolsson05
Juliusolsson05 deleted the fix/orchestration-dispatch-ui branch May 16, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant