Skip to content

refactor(orchestration): open a party by Dispatch address through one helper - #40555

Merged
Jinwoo-H merged 1 commit into
mainfrom
jinwoo/open-orchestration-dispatch
Nov 10, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
jinwoo/open-orchestration-dispatch

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Clicking an orchestration worker that Orca has opened by its Dispatch now goes through one shared function, so other places that list workers can open them the same way.

Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​53 $\color{#cf222e}{\Huge{\mathbf{−}}}$​12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​41

What Changed

openOrchestrationDispatch(address, label, host, feedback?) in open-agent-message-sender.ts now owns the crew panel's dispatch open: an orchestration.partyOpen sender lookup by address, then focusing the terminal it answers with. The crew panel's dispatch branch calls it with the same feedback as before. Nothing else changes.

Why

Other worker lists need the same open: a worker whose terminal Orca closed after it reported should reopen through partyOpen (#37210), not try to focus a pane that no longer exists. Exporting the crew panel's path lets them reuse it instead of writing a second copy.

The crew panel itself is already correct: once a worker's PTY exits, its handle is invalidated, the crew snapshot drops the terminal target and emits dispatch:<id>, and the open goes through partyOpen. I checked that partyOpen with a dispatch: address resumes a released worker and only locates a live one.

Linked Issue

N/A (maintainer refactor)

Visual Proof

N/A: no visual or interaction change. This is an inert extraction.

Testing

  • pnpm run typecheck:ci, pr.yml static steps (lint, JS plugins, anti-slop, ast-grep, oxfmt, code-quality, type-aware, changed-code quality, React Doctor, localization, ratchets, Zustand fan-out, reliability, RPC catalog)

  • pnpm test src/renderer/src/lib/open-agent-message-sender.test.ts src/renderer/src/components/orchestration-crew src/renderer/src/components/native-chat/worker-lifetime/use-orchestration-crew.test.tsx

  • No new test: the change is behaviour-preserving, so no test would fail on revert.

  • I manually tested these changes locally (inert refactor; not run in the app)

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

Risk

Level: Low. Renderer-only move of an existing code path; same RPC, same feedback. Back out with a plain revert.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out

@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds openOrchestrationDispatch to open a dispatch address as a sender on a host, focus a returned terminal, and report caught errors through optional feedback. Dispatch targets now use this helper and return. The remaining structured-session path requests chat history with the target worktree and session IDs.

Merge Risk: Minimal · up to 4bf19

No actionable merge-blocking risk is established for this change; it is mergeable after normal checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly describes the main change: extracting Dispatch opening into a shared helper.
Description check Passed The description covers the change, reason, linked-issue exception, visual proof, testing, and risk. It explains why no new test was added and how to revert. The empty Review section and unchecked chec…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the change, reason, linked-issue exception, visual proof, testing, and risk. It explains why no new test was added and how to revert. The empty Review section and unchecked checklist items do not make the description incomplete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b443104e-b1b8-473f-9572-8cce4d9d54b4
Commits

Reviewing files that changed from the base of the PR and between 668089d and 4bf1949.

Files selected for processing: 1

  • src/renderer/src/lib/open-agent-message-sender.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@Jinwoo-H
Jinwoo-H merged commit baea7aa into main Nov 10, 2026
41 checks passed
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