You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(orchestration): open a party by Dispatch address through one helper - #40555
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.
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
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: 5
Check name
Status
Explanation
Title check
The title clearly describes the main change: extracting Dispatch opening into a shared helper.
Description check
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
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
What Changed
openOrchestrationDispatch(address, label, host, feedback?)inopen-agent-message-sender.tsnow owns the crew panel'sdispatchopen: anorchestration.partyOpensender lookup by address, then focusing the terminal it answers with. The crew panel'sdispatchbranch 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 throughpartyOpen. I checked thatpartyOpenwith adispatch: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.tsxNo 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
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist