Skip to content

feat(mission-control): collapsible PR review cards for spawned + shipped work - #6125

Closed
zaridan wants to merge 27 commits into
stablyai:mainfrom
zaridan:zaridan/feat-mission-control-pr-review-cards
Closed

zaridan wants to merge 27 commits into
stablyai:mainfrom
zaridan:zaridan/feat-mission-control-pr-review-cards

Conversation

@zaridan

@zaridan zaridan commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Renders each related PR in the Orcastrator Mission Control panel as a collapsible card — the same merge + CI + comments experience as the right-sidebar Checks tab — so a director can merge a worker's PR, view checks, and read comments without leaving Mission Control.

  • Collapsed = the existing compact badge row (label + #num + state pill + external link).
  • Expanded = the full ChecksPanelInner (squash-and-merge + CI checks + comments) for that card's target, lazily mounted so collapsed cards do zero fetch.
  • Live worker cards drive merge/push/publish via the worker's own worktree; shipped cards (no live worktree) render state + checks + comments with every worktree-gated action hidden — no enabled-but-no-op controls.
  • Per-card hosted-review/checks/comments are keyed to each card's own branch/repo, never the active worktree.

Verified: typecheck, lint (localization coverage), renderer + native build, and the checks-panel tests. Independent adversarial review confirmed no regression to the existing Checks tab, correct per-card cache-key isolation, lazy-fetch, and complete worktree-less action gating.

Stacked on #6103 (the ChecksPanelInner extraction). Until #6103 merges into main, this PR's diff includes the refactor commits too; it will reduce to just the feature once #6103 lands. Please review/merge #6103 first.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Node.js version in .nvmrc is updated to 24. Two Jira test files gain coverage: one asserts that jiraRequest sends a non-browser User-Agent: Orca header with Authorization, and another parameterizes the makeEntry helper and verifies deterministic first-site error ordering in searchIssues. The main body of the PR introduces the experimental Orcastrators feature behind experimentalOrchestrators in GlobalSettings: a Zustand orchestrators slice (register/update/remove/close with rollback/reattach), a launchOrchestratorForProject service that creates a hidden worktree, seeds the /orcastrate prompt, and registers the director, entry-point wiring in Landing, NewWorkspaceComposerModal, and TaskPage, an OrchestratorLaunchModal, a sidebar OrchestratorsSidebarSection, a right-sidebar OrchestratorMissionControl with spawned-worker and shipped-branch review cards, extracted ChecksPanelReviewHeader and GitLab RPC helpers, and localization across five locales.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main feature: collapsible PR review cards in the Mission Control panel for Orcastrator.
Description check ✅ Passed The description provides a comprehensive summary of the feature, screenshots guidance, testing checklist, AI review notes, and security audit requirements as specified in the template.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🧹 Nitpick comments (1)
ORCASTRATORS-SPEC.md (1)

140-143: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Clarify historical vs current implementation details in the v2 plan section.

This block currently reads like the live contract, but it diverges from the implemented slice (tabId vs agentTabId, no status field, reattach-based persistence). Please either align the text to shipped behavior or explicitly mark it as superseded plan notes to avoid future drift.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4dcf7a5b-52bd-4610-82f7-9519b00eae1a

📥 Commits

Reviewing files that changed from the base of the PR and between ac3ab72 and 0cd8f83.

📒 Files selected for processing (69)
  • .nvmrc
  • MAINTAINING-OUR-FORK.md
  • ORCASTRATORS-SPEC.md
  • config/electron-builder.config.cjs
  • scripts/rebuild-ours.sh
  • src/main/jira/client.test.ts
  • src/main/jira/client.ts
  • src/main/jira/issues.test.ts
  • src/main/jira/issues.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/Landing.tsx
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx
  • src/renderer/src/components/NewWorkspaceComposerModal.tsx
  • src/renderer/src/components/OrchestratorLaunchModal.tsx
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanel.review-header.test.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanel.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanelInner.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanelReviewHeader.tsx
  • src/renderer/src/components/right-sidebar/MissionControlPrReviewCard.tsx
  • src/renderer/src/components/right-sidebar/MissionControlPrStatePill.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorPanelNotice.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/checks-panel-gitlab-review-rpc.ts
  • src/renderer/src/components/right-sidebar/checks-panel-inner-types.ts
  • src/renderer/src/components/right-sidebar/right-sidebar-panel-content.tsx
  • src/renderer/src/components/settings/ExperimentalPane.tsx
  • src/renderer/src/components/settings/OrchestratorsExperimentalToggle.tsx
  • src/renderer/src/components/settings/experimental-search.ts
  • src/renderer/src/components/settings/orchestrators-search-entry.ts
  • src/renderer/src/components/sidebar/OrchestratorsSidebarSection.tsx
  • src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/github-pr-search-url.test.ts
  • src/renderer/src/lib/github-pr-search-url.ts
  • src/renderer/src/lib/mission-control-card-target.ts
  • src/renderer/src/lib/orcastrate-log-shipped-work.test.ts
  • src/renderer/src/lib/orcastrate-log-shipped-work.ts
  • src/renderer/src/lib/orchestrator-launch.ts
  • src/renderer/src/lib/orchestrator-mission-control-data.test.ts
  • src/renderer/src/lib/orchestrator-mission-control-data.ts
  • src/renderer/src/lib/orchestrator-work-item-prompt.test.ts
  • src/renderer/src/lib/orchestrator-work-item-prompt.ts
  • src/renderer/src/lib/orchestrator-worker-pr-badge.test.ts
  • src/renderer/src/lib/orchestrator-worker-pr-badge.ts
  • src/renderer/src/lib/send-work-item-to-orchestrator.ts
  • src/renderer/src/lib/shipped-branch-pr-match.test.ts
  • src/renderer/src/lib/shipped-branch-pr-match.ts
  • src/renderer/src/lib/use-orchestrator-active-worktree.ts
  • src/renderer/src/lib/worktree-agent-dot-state.ts
  • src/renderer/src/store/index.ts
  • src/renderer/src/store/slices/diffComments.test.ts
  • src/renderer/src/store/slices/jira.test.ts
  • src/renderer/src/store/slices/jira.ts
  • src/renderer/src/store/slices/orchestrators.test.ts
  • src/renderer/src/store/slices/orchestrators.ts
  • src/renderer/src/store/slices/store-test-helpers.ts
  • src/renderer/src/store/slices/ui.ts
  • src/renderer/src/store/slices/worktrees.ts
  • src/renderer/src/store/types.ts
  • src/shared/types.ts

@zaridan
zaridan force-pushed the zaridan/feat-mission-control-pr-review-cards branch from 0cd8f83 to 915955c Compare June 23, 2026 05:21
@zaridan

zaridan commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

CodeRabbit review addressed (rebased onto fixed parent #6103)

Rebased this branch onto the fixed + fork-stripped parent (zaridan/refactor-mission-control-extract-checks-inner) via rebase --onto, dropping the inherited duplicate commits and the fork-maintenance commits (electron-builder / auto-update / rebuild-script) so the PR diff is now just the two PR-card commits + this review-fix commit. Conflicts during the rebase (ChecksPanelReviewHeader, OrchestratorMissionControl, review-header test, locales) were resolved keeping the parent's improvements (provider-presentation helper, token PR-state colors, resolveRepoSlug SSH routing) layered with #6125's extraction.

Fixed in this branch

  • OrchestratorMissionControl.tsx (worktreeByBranch) — scoped the live-worktree lookup to the director's own repo (worktreesByRepo[repoId]); keying by branch alone let a same-named branch in another repo pair a foreign worktree with directorRepo → mismatched card action target.
  • OrchestratorLaunchModal.tsx (seed effect) — seed form state only on the closed→open transition (wasVisibleRef) so a prefill prop changing while the modal is open no longer overwrites in-progress edits.
  • orchestrator-launch.ts (activation rollback) — on failed activateAndRevealWorktree, roll back the just-created worktree (removeWorktree(id, true)) so no orphaned hidden worktree lingers.
  • orchestrator-launch.ts (paste failure) — surface a toast (prompt_failed, added to all 5 locales) when pasteDraftWhenAgentReady returns false, instead of silently dropping /orcastrate.
  • orchestrators.ts (teardown rollback) — extended the inherited rollback to also fire on removeWorktree resolving { ok: false } (soft failure), not just a throw.
  • orchestrators.ts (reattach prune) — reattachOrchestrators now prunes stale entries (worktree removed or lost the prefix) instead of only appending, so removed directors don't linger as zombie sidebar cards. Added unit tests for both the soft-failure rollback and the stale-entry prune.
  • ChecksPanelReviewHeader.tsx (refresh button) — added type="button" + aria-label on the icon-only refresh button (resolved during the rebase).
  • ORCASTRATORS-SPEC.md (nitpick) — marked the v2 plan's registry/persistence steps as superseded by shipped behavior (tabId not agentTabId, no status field, displayName-marker reattach).

Inherited from the parent's fix (verified present, not re-fixed)

OrchestratorLaunchModal close-on-success, SourceControl director gate above SourceControlInner, and OrchestratorsSidebarSection focus-visible/touch states all arrived via the rebase onto the fixed parent.

Verification

pnpm typecheck, pnpm lint (incl. localization catalog/coverage parity across all 5 locales), and pnpm test (19684 passed) all green.

Note on the main merge conflict

Still CONFLICTING against main — but this is a stack artifact, not a #6125 issue. The conflicting files are src/main/jira/*, store/slices/worktrees.ts, store/slices/jira.test.ts, and the locale files: inherited parent-stack changes that diverge from upstream main. The conflict set is identical with or without my changes; the rebase did remove the fork (electron-builder) divergence. This resolves once the parent PRs (#6103 + the jira-fixes chain) merge, or via a full-stack rebase onto fresh main — outside this PR's scope.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/renderer/src/store/slices/orchestrators.test.ts (1)

180-205: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert teardown invocation in rollback-path tests.

These tests only check end state; they can still pass if closeOrchestrator never calls removeWorktree. Add explicit call assertions so the rollback path is actually exercised.

Suggested test hardening
   await store.getState().closeOrchestrator('w1')
+  expect(removeWorktree).toHaveBeenCalledTimes(1)
+  expect(removeWorktree).toHaveBeenCalledWith('wt1', true)

   // Why: teardown failed, so the worktree likely still exists — the registry
   // must keep the director rather than dropping a still-live entry.
   expect(store.getState().orchestrators).toHaveLength(1)
   expect(store.getState().orchestrators[0]).toMatchObject({ id: 'w1', worktreeId: 'wt1' })
@@
   await store.getState().closeOrchestrator('w1')
+  expect(removeWorktree).toHaveBeenCalledTimes(1)
+  expect(removeWorktree).toHaveBeenCalledWith('wt1', true)

   expect(store.getState().orchestrators).toHaveLength(1)
   expect(store.getState().orchestrators[0]).toMatchObject({ id: 'w1', worktreeId: 'wt1' })

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3848a68c-420a-4279-ada4-fc8bd6fae234

📥 Commits

Reviewing files that changed from the base of the PR and between 0cd8f83 and 915955c6fa3557be4660b205e0f997044a4714e1.

📒 Files selected for processing (31)
  • ORCASTRATORS-SPEC.md
  • src/main/jira/client.test.ts
  • src/main/jira/issues.test.ts
  • src/main/jira/issues.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/OrchestratorLaunchModal.tsx
  • src/renderer/src/components/hover-reveal-touch-action-visibility.test.ts
  • src/renderer/src/components/right-sidebar/ChecksPanel.review-header.test.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanel.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanelInner.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanelReviewHeader.tsx
  • src/renderer/src/components/right-sidebar/MissionControlPrReviewCard.tsx
  • src/renderer/src/components/right-sidebar/MissionControlPrStatePill.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/checks-panel-gitlab-review-rpc.ts
  • src/renderer/src/components/right-sidebar/checks-panel-inner-types.ts
  • src/renderer/src/components/sidebar/OrchestratorsSidebarSection.tsx
  • src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/mission-control-card-target.ts
  • src/renderer/src/lib/orchestrator-launch.ts
  • src/renderer/src/lib/repo-slug-index.ts
  • src/renderer/src/store/slices/orchestrators.test.ts
  • src/renderer/src/store/slices/orchestrators.ts
  • src/renderer/src/store/slices/worktrees.ts
✅ Files skipped from review due to trivial changes (5)
  • src/renderer/src/components/right-sidebar/checks-panel-inner-types.ts
  • ORCASTRATORS-SPEC.md
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/ja.json
🚧 Files skipped from review as they are similar to previous changes (16)
  • src/renderer/src/components/right-sidebar/MissionControlPrStatePill.tsx
  • src/renderer/src/lib/mission-control-card-target.ts
  • src/main/jira/issues.test.ts
  • src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/right-sidebar/ChecksPanel.review-header.test.tsx
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/store/slices/worktrees.ts
  • src/renderer/src/components/right-sidebar/MissionControlPrReviewCard.tsx
  • src/renderer/src/store/slices/orchestrators.ts
  • src/renderer/src/components/right-sidebar/checks-panel-gitlab-review-rpc.ts
  • src/renderer/src/lib/orchestrator-launch.ts
  • src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx
  • src/renderer/src/components/OrchestratorLaunchModal.tsx
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ko.json

zaridan and others added 24 commits June 22, 2026 22:32
Captures the proposed "Orcastrators" sidebar section + create-flow,
build phases, settings (mapped to coordinator TUNABLES + external-LLM
adversarial review), multi-coordinator isolation, and integration points.
Planning doc for the feat/orcastrators-sidebar prototype.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ggle

First slice of the Orcastrators feature (see ORCASTRATORS-SPEC.md): the
GlobalSettings.experimentalOrchestrators flag, an Experimental-pane toggle
(extracted to OrchestratorsExperimentalToggle to respect max-lines), and a
settings-search entry (extracted to orchestrators-search-entry). Gates the
upcoming sidebar section; no behavior yet beyond the toggle.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Records the traced, confirmed renderer call sequence for spawning a
coordinator in a repo's existing primary worktree with /orcastrate seeded
(primary-worktree lookup, createTab, startup payload, ensureAgentStartup-
InTerminal / pasteDraftWhenAgentReady), plus the two args left to copy from
the composer submit path. De-risks the launch slice.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Adds the experimental "Orcastrators" section above Projects with a + that
opens a project picker; selecting a project launches a coordinator agent in
that project's primary worktree and seeds /orcastrate.

- orchestrator-launch.ts: resolves the project's primary worktree, builds the
  agent startup plan, activates the worktree with that startup command, and
  paste-submits /orcastrate when the TUI is ready (reuses the verified
  launch-work-item-direct agent helpers).
- OrchestratorsSidebarSection.tsx: the gated section + picker, wired into the
  sidebar above the project list.

Gated behind experimentalOrchestrators. typecheck + lint clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Locks the revised design from the working session: the Orcastrator is a
persistent *director* (lives in the ORCASTRATORS section, no worktree shown,
runs in the primary checkout but display-decoupled), survives restart, allows
several per project, and uses disposition (delegate / decide-done / adversarial
review / write-as-last-resort) rather than a permission sandbox. Adds an
ordered v2 build plan (launch robustness, registry, persistence/reattach,
display-decoupling) with a verify-before-commit risk note.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replaces the activation-startup approach (which no-ops when the worktree is
already active, so relaunch spawned nothing) with createTab +
queueTabStartupCommand: forces a fresh agent tab and queues the launch command
directly onto it, working whether or not the worktree is already open. Also
delivers /orcastrate via pasteDraftWhenAgentReady with a 90s window so a cold
agent boot no longer drops the prompt with a "took too long" toast.

Verified live: relaunch into an open worktree spawns a fresh director and
/orcastrate auto-runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Adds an OrchestratorsSlice tracking launched directors (id/project/worktree/
tab/launchedAt); launchOrchestratorForProject registers one on launch. The
ORCASTRATORS sidebar section now lists live directors as clickable entries
(project name, no worktree shown) and drops entries whose tab was closed.
Wired the slice into the store + both test-store helpers.

Verified live: launching shows a persistent "my-project" entry under
ORCASTRATORS.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Display-decoupling (step 4, part 1): exclude an Orcastrator's agent tab from
the worktree card's agent rows so the director no longer appears under
Projects, and show the director's live state (working spinner / ready dot) on
its ORCASTRATORS entry instead.

Verified live: the /orcastrate agent row is gone from under the worktree and
the section entry shows a status indicator.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Make the ORCASTRATORS list a navigator: highlight the active director's entry
with the worktree card's exact active-surface styling — adds an
`.orcastrator-active-surface` class to the shared active-surface CSS rule group
in main.css (single source of truth) and reuses `worktree-sidebar-card-hover`
for hover. Status now renders via the shared AgentStateDot. No invented styles.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The Orcastrator is now a first-class director, fully decoupled from the
project's primary checkout: launch creates a *dedicated* worktree via
createWorktree (skip-setup), runs the coordinator + /orcastrate there, and
registers it by worktree id. WorktreeList excludes director worktrees so they
never appear under Projects — they live only in the ORCASTRATORS section.

Verified live: launching spawns a director in its own worktree
(workspaces/<project>/orcastrator-<project>), shown only under ORCASTRATORS,
with nothing leaking into Projects.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Step 3 + lifecycle. The in-memory registry doesn't survive a reload, so on
load (and when worktrees change) reattachOrchestrators rebuilds it by detecting
director worktrees via the ORCASTRATOR_DISPLAY_PREFIX displayName marker —
re-hiding them from Projects and re-showing them under ORCASTRATORS, reattached
to their still-running agent. The section now keys off worktree existence
(robust to tab-id drift on reattach) and derives status from the worktree's
tabs. Adds closeOrchestrator (X-on-hover) which tears down the director's
dedicated worktree and drops it from the registry.

Note: pending live verification (author away); typecheck + lint clean and gated
behind experimentalOrchestrators.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Covers register/dedupe/remove, reattach detection (by displayName prefix,
project mapping, fallback to repo id + stripped name, idempotency, skipping
non-directors), and closeOrchestrator teardown (incl. the worktree-removal-
failure path). 7 tests, all passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…tores

The Orcastrator feature reads new store fields (orchestrators registry,
worktreesByRepo) in WorktreeList, WorktreeCardAgents, and the section. Older
component test mocks build partial stores without these, so the reads threw.
Guard them (?? [] / ?? {}). Fixes 49 renderer test regressions; full renderer
suite green. (Remaining failures are pre-existing main/relay PTY/bash/relay
env tests, unrelated to this branch.)

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Records the implemented state of the director rearchitect (flag, launch,
registry/navigator, dedicated worktree, reattach, close/cleanup), the
dedicated-worktree design decision, and known follow-ups.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… + task)

Replaces the +-dropdown with a native modal matching the "Create worktree"
composer (same Dialog + ProjectCombobox + AgentCombobox). Fields: Name (shown
in the ORCASTRATORS list), Project, Agent, and a task prompt — the prompt is
seeded after /orcastrate so the director starts planning the task instead of
asking for it. Also adds a gated "Create Orcastrator" button to the Landing
empty state next to Add Project / Create worktree.

launchOrchestratorForProject now takes { name, agent, prompt }. Verified live:
a named director ("Build Site") launched with a task, planned it, and spun up
worker worktrees under the project while staying in the ORCASTRATORS section.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…", design polish

- Source Control: show a director explainer instead of the publish/PR empty state for an Orcastrator's worktree (it has no branch of its own to publish).
- Suppress the "local main is behind" suggestion toast for director worktrees.
- Send to Orcastrator: hand a tracked issue (GitHub/GitLab/Linear/Jira) to a director from the GitHub issue-row menu and the New Workspace composer footer; opens the launch modal prefilled, pre-selecting the project when the issue is repo-bound.
- Launch modal: read prefill from modalData; align with the Create-worktree composer (max-w-lg, auto-focus Name, matching textarea focus/shadow tokens).
- Experimental toggle: use the shared SettingsSwitch for the focus ring + a11y.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FNy4vrv3mvyjpPnhJMZr82
… shipped history, and PR links

Replaces the misleading publish/PR view for a director's worktree with a Mission Control console, consistent across the right-sidebar panels:

- Source Control: director header + 'no branch to publish' summary, plus the worker worktrees it spawned (linked via lineage parent) with each worker's live agent-state dot and a clickable PR badge.
- Checks (and other branch/PR panels): a director notice with an 'Open Mission Control' jump, routed centrally so directors read correctly on every tab.
- Shipped: the director's completed work, read from its own .orcastrate/log.jsonl so it survives worker teardown. Each branch is matched to its merged PR by head ref — prefix-agnostic, so branch-rename-on-push still resolves — with a direct PR link.
- PR state renders as GitHub-styled pills (merged/open/closed/draft) with an external-link affordance.

Shared logic (lineage worker selection, agent-dot derivation, PR-badge derivation, log parsing, branch matching, PR-search-URL fallback) is extracted into pure, unit-tested helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FNy4vrv3mvyjpPnhJMZr82
Double-click an Orcastrator's name in the sidebar to edit it inline,
matching the existing worktree-title rename UX. Reuses
WorktreeTitleInlineRename (Enter commits, Escape cancels, blur commits,
empty/unchanged guarded).

The rename updates both sources of truth: an optimistic in-memory
updateOrchestrator for instant UI, then the durable worktree displayName
(prefixed with ORCASTRATOR_DISPLAY_PREFIX) via the existing
updateWorktreeMeta path so reattachOrchestrators reconstructs the name
after a reload. The activate target became a role="button" div because an
Input nested in a <button> is invalid HTML; Enter/Space keep it
keyboard-accessible and the close (X) button is unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ayName

reattachOrchestrators preferred project?.displayName over the persisted
worktree displayName, so a renamed Orcastrator with a matching project
reverted to the project name on reload — silently discarding the rename.

Treat the prefix-stripped worktree displayName as the durable source of
truth (it's `prefix + project.displayName` at launch, so un-renamed
directors reconstruct identically), falling back to project/repo only
when no name survives the prefix. Adds a test that fails against the old
precedence, and a "why" note on the optimistic rename update.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…rktree wrapper

Split ChecksPanel into a thin active-worktree wrapper (default export) and a
prop-driven ChecksPanelInner that reads no active-worktree globals. The wrapper
supplies worktree/repo/gitIdentityDisplay/linked-review identity as explicit
props; the inner is agnostic about whether its target is the active worktree, so
a shipped-PR caller (Mission Control, PR2) can drive the same UI from a branch/PR
identity without a live worktree.

Also extracted leaf modules: ChecksPanelReviewHeader, GitLab review RPC helpers,
and the inner prop/types. Behavior-preserving for the existing Checks tab.

(In progress) max-lines split of ChecksPanelInner still pending; temporary
eslint-disable retained until the hook/component extraction lands.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…max-lines follow-up

Annotate the spots in ChecksPanelInner that genuinely require a live Worktree
(rename/link-PR modal, push/publish, HostedReviewActions merge) with // PR2: notes
so the Mission Control consumer knows what to supply. Make the inherited max-lines
disable comment reference the focused file-split follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace the temporary disable framing on ChecksPanelInner with the original
ChecksPanel.tsx '-- Why:' rationale, noting it is inherited from the pre-split
file and that a deeper sub-module split is out of scope for this behavior-
preserving prop-extraction.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Apply CodeRabbit feedback across the checks refactor + orchestrator base:
- ChecksPanelReviewHeader: exhaustive HostedReviewProvider handling so
  Bitbucket/Azure DevOps/Gitea show their own host label, not "GitHub".
- OrchestratorMissionControl: reuse the token-based prStateColor palette
  instead of hardcoded hex PR-state colors; resolve the repo slug through
  the repo-slug contract (env-target routing) instead of direct IPC.
- OrchestratorLaunchModal: keep the modal open on a failed launch so user
  input isn't dropped.
- OrchestratorsSidebarSection: persist the worktree displayName before the
  optimistic in-memory rename; restore focus-visible + touch discoverability
  on the row and close control.
- WorktreeCardAgents / WorktreeList: gate orchestrator filtering behind the
  experimentalOrchestrators toggle so disabling it never hides real rows.
- orchestrators slice: roll back the registry entry when worktree teardown
  fails so the sidebar stays consistent with actual worktree state.
- worktrees slice: classify orchestrator worktrees off the persisted
  result.worktree.displayName, not the caller input.
- SourceControl: gate the director switch above SourceControlInner so a
  director worktree never mounts its branch/status/review hooks.
- jira/issues: surface the first connected-site failure deterministically
  (entries order) instead of completion order.
- jira/client.test: lock the jiraRequest User-Agent/auth header path.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ped work

Render each related PR in Mission Control — live spawned workers and shipped
PRs — as a collapsible card. Collapsed shows the existing compact badge row
(name + #num + state pill + external link); expanding mounts the full
ChecksPanelInner (squash-and-merge + CI checks + comments) for that target's
identity, never the active director worktree.

- Lazy-fetch: only the expanded card mounts ChecksPanelInner, so collapsed
  cards do no hosted-review/checks/comments fetch. Collapsing unmounts the
  heavy inner and stops its polling. A new isPanelActiveOverride prop lets the
  embedded host bypass the Checks-tab visibility gate while on-screen.
- Live worker cards drive the panel from the worker's own worktree, so
  merge/push/publish/rename stay fully functional.
- Shipped cards usually have no live worktree, so they drive the panel from
  { repo, branch, linked-PR } with worktree omitted; if a branch still has a
  live worktree it's reused.
- Worktree-less cards hide or disable every worktree-gated action: publish
  branch, create-review composer, HostedReviewActions (merge/delete), and the
  PR link/unlink menu are gated on a live worktree; AI triage/comment actions
  disable with a reason. Audited each affordance's visibility predicate, not
  just its handler.
- Localize the shipped-card "PR #<n>" label (inherited unlocalized string).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
zaridan and others added 3 commits June 22, 2026 22:42
…h shipped note

Address two review nits on the PR-cards work:

- Move the GitHub-convention PR-state badge colors out of raw inline hex in
  MissionControlPrStatePill into `--pr-state-*` tokens in main.css, mirroring
  the git-decoration palette's provider-parity exception (STYLEGUIDE: use
  tokens from main.css, don't invent inline color values). Colors unchanged.
- Update the stored `shipped_note` copy in all 5 locales to match the corrected
  inline default — the old text claimed PR numbers aren't recorded, which now
  contradicts the feature (shipped branches are matched to their merged PRs).
  Translated for es/ja/ko/zh.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Apply the remaining open CodeRabbit comments on the PR-cards work (the
shared stablyai#6103 fixes arrived via rebase onto the fixed parent):

- OrchestratorMissionControl: scope worktreeByBranch to the director's
  repo so a same-named branch in another repo can't pair a foreign live
  worktree with directorRepo, producing a mismatched card action target.
- OrchestratorLaunchModal: seed the form only on the closed→open
  transition so a prefill prop changing while open can't overwrite the
  user's in-progress edits.
- orchestrator-launch: roll back the just-created worktree when activation
  fails (no orphaned hidden worktree); surface a toast when the
  /orcastrate paste doesn't land instead of dropping it silently.
- orchestrators slice: also roll back on removeWorktree { ok: false }
  (soft failure, not just a throw); prune stale registry entries on
  reattach so removed/renamed directors don't linger as zombie cards.
- ORCASTRATORS-SPEC: mark the v2 plan's registry/persistence steps as
  superseded by shipped behavior (tabId not agentTabId, no status field,
  displayName-marker reattach).
- Add the prompt_failed locale string across all 5 locales, plus tests
  for the soft-failure rollback and the stale-entry prune.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…d keys

The rebase onto the parent (now on upstream/main) pulled in upstream's
terminal scroll-speed settings UI, whose `scrollSpeed.*` keys
(settings.TerminalPane + settings.terminal.search) are referenced in code
but absent from the locale catalog upstream — so verify:localization-catalog
flagged them across all 5 locales. Sync the catalog (English fallbacks) to
restore parity; none of these are stablyai#6125 keys and the union-merges cleanly
if the base later adds the same keys.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@zaridan
zaridan force-pushed the zaridan/feat-mission-control-pr-review-cards branch from 915955c to 7e65e9f Compare June 23, 2026 06:00
@zaridan

zaridan commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current upstream/main — now mergeable

Rebased this branch onto the parent (zaridan/refactor-mission-control-extract-checks-inner, which was just rebased onto upstream/main incl. the jira reconciliation) via rebase --onto, replaying only the three genuine #6125 commits so the branch inherits the parent's full upstream + jira resolution. The #6125 commits applied cleanly — no conflicts in the mission-control/orchestrator code or my locale keys.

Locale catalog: the rebase pulled in upstream's new terminal scroll-speed settings UI, whose scrollSpeed.* keys (settings.TerminalPane + settings.terminal.search) are referenced in code but were missing from the catalog upstream, so verify:localization-catalog flagged them. Synced the catalog (English fallbacks) to restore parity across all 5 locales — none are #6125 keys; they union-merge cleanly if the base later adds the same keys.

Verification: pnpm typecheck ✅, pnpm lint ✅ (oxlint, switch-exhaustiveness, styled-scrollbars, localization catalog + coverage — 9602 keys parity across all 5 locales), pnpm test — the only failures were 5 native-PTY/relay/git-handler infra tests that time out under full-suite parallel load and pass in isolation (environmental, unrelated to this change).

Mergeable: git merge-tree upstream/main HEAD | grep -c '^CONFLICT' → 0. No conflicts vs upstream/main.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/main/jira/client.test.ts (1)

173-231: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider consolidating the duplicate test setup.

Both tests exercise the identical code path (jiraRequest with a POST to the search endpoint) using the same setup, mocking, and assertions. The second test (lines 204-231) is a superset of the first (lines 173-202), checking both User-Agent and Authorization headers. The first test appears redundant.

♻️ Suggested consolidation

Remove the first test (lines 173-202) and update the second test's name to reflect its complete coverage:

-  it('sends a non-browser User-Agent on Jira POST requests', async () => {
-    // Why: Electron's net.fetch defaults to a Chrome User-Agent, which trips
-    // Atlassian's XSRF filter on POST/PUT REST calls (issue search, create,
-    // update, comment) even under API-token auth, surfacing as a 403.
-    const siteId = 'site-alpha'
-    writeJiraFiles(siteId, 'token-alpha')
-    netFetchMock.mockResolvedValueOnce(
-      new Response(JSON.stringify({ issues: [] }), {
-        status: 200,
-        headers: { 'Content-Type': 'application/json' }
-      })
-    )
-    const jira = await loadClientModule({ encryptionAvailable: true })
-    const client = jira.getClients(siteId)[0]
-
-    if (!client) {
-      throw new Error('Expected stored Jira client')
-    }
-
-    await jira.jiraRequest(client, '/rest/api/3/search/jql', {
-      method: 'POST',
-      body: JSON.stringify({ jql: 'project = ALP' })
-    })
-
-    const headers = netFetchMock.mock.calls[0]?.[1]?.headers as Headers
-    const userAgent = headers.get('User-Agent') ?? ''
-    expect(netFetchMock.mock.calls[0]?.[1]?.method).toBe('POST')
-    expect(userAgent).toBe('Orca')
-    expect(userAgent).not.toMatch(/Mozilla|Chrome|Safari|AppleWebKit/i)
-  })
-
-  it('injects the non-browser User-Agent and auth on the jiraRequest POST path too', async () => {
+  it('injects non-browser User-Agent and Authorization on jiraRequest POST requests', async () => {
-    // Why: jiraRequest is the second header-injection point (used by issue
-    // search/create/update/comment POSTs); lock it alongside requestWithCredentials
-    // so an XSRF-tripping browser User-Agent can't regress on either path.
+    // Why: Electron's net.fetch defaults to a Chrome User-Agent, which trips
+    // Atlassian's XSRF filter on POST/PUT REST calls (issue search, create,
+    // update, comment) even under API-token auth, surfacing as a 403.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6687fb7b-0975-4b3c-8e39-e127e5c1f2ce

📥 Commits

Reviewing files that changed from the base of the PR and between 915955c6fa3557be4660b205e0f997044a4714e1 and 7e65e9f.

📒 Files selected for processing (28)
  • .nvmrc
  • ORCASTRATORS-SPEC.md
  • src/main/jira/client.test.ts
  • src/main/jira/issues.test.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/Landing.tsx
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx
  • src/renderer/src/components/NewWorkspaceComposerModal.tsx
  • src/renderer/src/components/OrchestratorLaunchModal.tsx
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/components/hover-reveal-touch-action-visibility.test.ts
  • src/renderer/src/components/right-sidebar/ChecksPanel.review-header.test.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanel.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanelInner.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanelReviewHeader.tsx
  • src/renderer/src/components/right-sidebar/MissionControlPrReviewCard.tsx
  • src/renderer/src/components/right-sidebar/MissionControlPrStatePill.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorPanelNotice.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/checks-panel-gitlab-review-rpc.ts
  • src/renderer/src/components/right-sidebar/checks-panel-inner-types.ts
  • src/renderer/src/components/right-sidebar/right-sidebar-panel-content.tsx
  • src/renderer/src/components/settings/ExperimentalPane.tsx
  • src/renderer/src/components/settings/OrchestratorsExperimentalToggle.tsx
  • src/renderer/src/components/settings/experimental-search.ts
  • src/renderer/src/components/settings/orchestrators-search-entry.ts
💤 Files with no reviewable changes (15)
  • src/renderer/src/components/settings/ExperimentalPane.tsx
  • src/renderer/src/components/settings/orchestrators-search-entry.ts
  • src/renderer/src/components/hover-reveal-touch-action-visibility.test.ts
  • src/renderer/src/components/right-sidebar/checks-panel-inner-types.ts
  • src/renderer/src/components/right-sidebar/checks-panel-gitlab-review-rpc.ts
  • src/renderer/src/components/right-sidebar/right-sidebar-panel-content.tsx
  • src/renderer/src/components/settings/experimental-search.ts
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/MissionControlPrReviewCard.tsx
  • src/renderer/src/components/settings/OrchestratorsExperimentalToggle.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorPanelNotice.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanelReviewHeader.tsx
  • src/renderer/src/components/right-sidebar/OrchestratorMissionControl.tsx
  • src/renderer/src/components/right-sidebar/ChecksPanel.review-header.test.tsx
  • src/renderer/src/components/right-sidebar/MissionControlPrStatePill.tsx
✅ Files skipped from review due to trivial changes (1)
  • .nvmrc
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/renderer/src/App.tsx
  • src/renderer/src/components/Landing.tsx
  • src/renderer/src/components/OrchestratorLaunchModal.tsx
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/components/NewWorkspaceComposerModal.tsx
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/NewWorkspaceComposerCard.tsx

@zaridan

zaridan commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Folded into the consolidated Orcastrator PR #6293.

@zaridan zaridan closed this Jun 24, 2026
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.

2 participants