Skip to content

refactor: group renderer session launch owners - #37018

Merged
nwparker merged 1 commit into
mainfrom
module-organization/pr34-renderer-session-launch
Nov 1, 2026
Merged

nwparker merged 1 commit into
mainfrom
module-organization/pr34-renderer-session-launch

Conversation

@nwparker

@nwparker nwparker commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Puts renderer session-launch code together so its owners and callers are easier to find. Launching, retrying, cancelling, and restoring sessions keep their existing behavior.

What Changed

Moves 36 files into lib/agent-session/launch and updates callers, mocks, and CI timing paths together. Removes forwarding exports; consumers import the concrete status, selection, cancellation, and type owners.

Two absent legacy tests are accounted for separately: one was relocated upstream into the existing integration suite, and one was deliberately retired upstream. The current integration suite stays in place.

Why

Keeps related launch responsibilities together and makes dependencies explicit, without barrels or compatibility shims.

Linked Issue

Maintainer-authorized module-organization cleanup; no separate issue opened.

Visual Proof

N/A — module moves and import retargets preserve rendered UI and interaction behavior.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Existing tests and mocks were retargeted. Local macOS validation: ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=46bc075bf9e0d9a9d9cb79a1ac3c9d28ff735b97 --maxWorkers=2 passed 24 of 25 checks, including unit tests and typechecks. Its sole fixture line-count finding was corrected by renaming a new mock callback parameter; focused lint, formatting, both fixture consumer suites (29 tests), seven affected view suites (49 tests), and normal commit hooks passed.

Hosted lint then found four duplicate same-owner imports. Consolidating them preserved bindings, evaluation order, and non-import statements; the failing lint rule and four affected consumer suites (38 tests) pass locally.

Hosted CI covers Linux unit tests, static analysis/typechecks, package builds including Windows, and isolated Electron end-to-end/layout checks. The sole initial end-to-end failure captured text in the terminal instead of the search box; the failed-job-only retry passed on unchanged source. No local manual GUI or SSH session was run.

AI Disclosure

Review

Two independent native Codex source audits verified production bodies, literals, concrete owners, mock composition, and all 142 outputs across 178 changed paths. The unchanged refactor-audit merge gate and independent current-main preservation review pass. Detailed evidence remains local.

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

No protocol, permission, persistence, focus, or rendering behavior changes. Platform, remote, mobile, and folder-workspace paths retain their existing implementation; only module ownership and references change.

Checklist

  • This PR is focused: one renderer session-launch boundary
  • I explained what changed and why
  • Visual proof is N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Lint, typechecks, tests, and builds covered by the validation above and hosted CI

@nwparker
nwparker force-pushed the module-organization/pr34-renderer-session-launch branch from eaf7ace to 74d5ed9 Compare November 1, 2026 12:38
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

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: e6ab8919-407f-4dac-b5be-69a450179b13
Commits

Reviewing files that changed from the base of the PR and between eaf7ace and 74d5ed9.

Files selected for processing: 142
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/app-shell/use-app-startup-hydration.ts
  • src/renderer/src/components/native-chat/NativeChatEmptyPane.tsx
  • src/renderer/src/components/native-chat/NativeChatInterruptedContinue.test.tsx
  • src/renderer/src/components/native-chat/NativeChatInterruptedContinue.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.availability-notice.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.goal-dock.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.history-read-state.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.launch-lifecycle.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.notice-card.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.orca-stop-continue.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.retained-draft.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.test-harness.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/native-chat-structured-session-notices.ts
  • src/renderer/src/components/native-chat/native-chat-view-state.ts
  • src/renderer/src/components/native-chat/structured-agent-session-status-bridge-failed-start.test.tsx
  • src/renderer/src/components/native-chat/structured-agent-session-status-bridge-unconfirmed-start.test.tsx
  • src/renderer/src/components/native-chat/structured-conversation-command-send.test.ts
  • src/renderer/src/components/native-chat/use-host-model-catalog-upgrade.test.tsx
  • src/renderer/src/components/native-chat/use-host-model-catalog-upgrade.unavailable.test.tsx
  • src/renderer/src/components/native-chat/use-native-chat-availability-notice.ts
  • src/renderer/src/components/native-chat/use-native-chat-host-permission-gate.ts
  • src/renderer/src/components/native-chat/use-native-chat-host-send-gate.ts
  • src/renderer/src/components/native-chat/use-native-chat-provisional-launch.test.tsx
  • src/renderer/src/components/native-chat/use-native-chat-provisional-launch.ts
  • src/renderer/src/components/native-chat/use-native-chat-structured-composer-transport.ts
  • src/renderer/src/components/native-chat/use-native-chat-transcript-row-context.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.first-frame.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.learned-default.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.preloaded-agents.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.test-fixture.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-provisional.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-send-options.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-send-options.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session.ts
  • src/renderer/src/components/right-sidebar/AiVaultSessionVirtualList.keyboard.test.tsx
  • src/renderer/src/components/right-sidebar/ai-vault-session-resume-here.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-resume-in-chat-launch.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-resume-in-chat-launch.ts
  • src/renderer/src/components/tab-bar/QuickLaunchButton.launch-status.test.tsx
  • src/renderer/src/components/tab-bar/cli-chat-resume-feedback.ts
  • src/renderer/src/components/tab-bar/cli-chat-resume-run.test.ts
  • src/renderer/src/components/tab-bar/cli-chat-resume-run.ts
  • src/renderer/src/components/tab-bar/use-new-tab-agent-menu-rows.test.tsx
  • src/renderer/src/components/tab-group/useTabGroupTabCloseCommands.structured-session.test.ts
  • src/renderer/src/components/terminal-workspace-keydown.test.ts
  • src/renderer/src/components/terminal/initial-terminal-structured-launch.test.tsx
  • src/renderer/src/components/use-terminal-watcher-effects.ts
  • src/renderer/src/components/worktree-creation/PendingNativeChatCreation.tsx
  • src/renderer/src/lib/agent-launch-caller-routing.test.ts
  • src/renderer/src/lib/agent-message-send.test.ts
  • src/renderer/src/lib/agent-message-send.ts
  • src/renderer/src/lib/agent-session-launch-plan.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-action-launch.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-create-hydration.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-host-admission.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-admission.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-after-failure.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-callers.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-cancel.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-close-race.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-call.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-message.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-message.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-support.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-different-request.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-draft.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-errors.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-exited-owner.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-failure.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-join-delivery.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-label.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-message.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-options.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-options.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-outcome-tracking.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-permission-notice.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-probe-outage.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-prompt-outcome.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-prompt-stop.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-prompt.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-prompt.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-publication-confirmation.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-recovery.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-registry.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-reload.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-reload.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-request.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-resume-identity.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-source-handoff.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-status.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-surface.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-unconfirmed-or-retried.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-unconfirmed-recheck.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch.test.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-legacy-launch-stop.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-local-launch-cancel.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-new-chat-own-launch.test.ts
  • src/renderer/src/lib/agent-session/structured-agent-session-draft-position-lifetime.test.tsx
  • src/renderer/src/lib/agent-session/structured-agent-session-ordinary-draft.test.tsx
  • src/renderer/src/lib/agent-session/structured-agent-session-provisional-selection-lifetime.test-fixture.ts
  • src/renderer/src/lib/agent-session/structured-agent-session-provisional-tab.test.ts
  • src/renderer/src/lib/agent-session/structured-agent-session-provisional-tab.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-args.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-host-agents.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-structured-route.ts
  • src/renderer/src/lib/launch-agent-session-continuation.test.ts
  • src/renderer/src/lib/launch-agent-structured-chat-guard.test.ts
  • src/renderer/src/lib/launch-agent-structured-chat-picker-parity.test.ts
  • src/renderer/src/lib/launch-agent-structured-chat-test-fixture.ts
  • src/renderer/src/lib/launch-agent-web-host-tab.ts
  • src/renderer/src/lib/launch-structured-agent-session.test.ts
  • src/renderer/src/lib/launch-structured-agent-session.ts
  • src/renderer/src/lib/launch-work-item-direct-agent-routing.ts
  • src/renderer/src/lib/new-agent-prompt-outcome.test.ts
  • src/renderer/src/lib/new-agent-prompt-outcome.ts
  • src/renderer/src/lib/structured-agent-launch-settlement.test.ts
  • src/renderer/src/lib/structured-agent-launch-settlement.ts
  • src/renderer/src/lib/structured-agent-session-launch-action-effort.test-fixture.ts
  • src/renderer/src/lib/structured-agent-session-launch-create-message.test-fixture.ts
  • src/renderer/src/lib/structured-agent-session-launch-draft.test.ts
  • src/renderer/src/lib/structured-agent-session-launch-prerequisites.test.ts
  • src/renderer/src/lib/structured-agent-session-launch.test-fixture.ts
  • src/renderer/src/lib/structured-agent-session-selection-lifetime.test.tsx
  • src/renderer/src/lib/worktree-activation-launch-awaiting-host.test.ts
  • src/renderer/src/lib/worktree-creation-structured-session.ts
  • src/renderer/src/runtime/paired-host-structured-launch-bookkeeping.test.ts
  • src/renderer/src/runtime/structured-agent-session-tab-retirement.test.ts
  • src/renderer/src/runtime/structured-agent-session-tab-retirement.ts
  • src/renderer/src/runtime/structured-launch-cancel-layout-owner.test.ts
  • src/renderer/src/store/slices/content-tabs-from-main-frames.test.ts
  • src/renderer/src/store/slices/content-tabs-paired-server-workspace.test.ts
  • src/renderer/src/store/slices/tabs/tabs-close-actions.ts
  • src/renderer/src/store/slices/ui-agent-send-target.test.ts
  • src/renderer/src/store/slices/worktrees/listing/stale-listing-purges-created-worktree.test.ts
  • src/renderer/src/store/slices/worktrees/teardown/purged-structured-launch-retirement.ts
  • tests/e2e/claude-auto-mode-host-catalog.unit.test.ts
  • tests/e2e/structured-agent-session-launch-admission.unit.test.ts
  • tests/e2e/structured-agent-session-launch-continuation.unit.test.ts
Files with no reviewable changes: 2
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-legacy-launch-stop.ts
  • src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-prompt.test.ts
Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/components/native-chat/native-chat-structured-session-notices.ts

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

Walkthrough

The change relocates structured agent-session launch modules under agent-session/launch. Production imports, test imports, mocks, fixtures, and CI timing keys now use the new paths. Launch tests separate implementation, registry, and options mocks. The launch implementation also removes its registry, status, and selection re-exports.

Merge Risk: Minimal · up to 74d5e

The launch modules and their consumers have been relocated without an identified merge-blocking behavior change.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: grouping renderer session launch owners under a dedicated module area.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. 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.
Description check Passed The description is complete and aligned with the template. It explains the refactor, scope, rationale, visual impact, testing, review evidence, platform considerations, and checklist status. The maint…
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. 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 0 functions across 50 files. (90 skipped: 1 unsupported, 89 over the file limit.)

Full details: Description check

Explanation

The description is complete and aligned with the template. It explains the refactor, scope, rationale, visual impact, testing, review evidence, platform considerations, and checklist status. The maintainer-authorized cleanup explains why no separate issue was opened.

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

@nwparker
nwparker merged commit c8c0925 into main Nov 1, 2026
99 of 100 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