Repository navigation
chore(lint): bypassing owner routing fails lint - #27313
Conversation
…g fails lint The last six renderer sites (Settings visibility defaults, preflight readiness, Linear key dialog copy) mirror the default scope host and now say so through defaultScopeHost. getActiveRuntimeTarget and settingsForRuntimeOwner are deleted with their re-exports, the unused settings-fabrication helpers go with them, and the owner-routing baseline is empty, so any new use fails lint. The provider dispatch rationale is rewritten in neutral, shorter terms.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The changed routing cleanup preserves the existing host-selection behavior, and the previously identified routing risks are not introduced or left active by this PR. Pre-merge checks |
|
77ae7c7 to
8187bb5
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
8c78c2f4-c9bc-4ace-8be4-ca3110f2a4a0
📥 Commits
Reviewing files that changed from the base of the PR and between 853c25d and 77ae7c756ed6a87c4e0d9f364b09c3bc5b800d64.
📒 Files selected for processing (123)
config/focus-setting-read-baseline.txtconfig/owner-routing-baseline.txtconfig/scripts/check-owner-routing-ratchet.mjssrc/main/providers/execution-host-provider-dispatch.tssrc/renderer/src/components/automations/use-automations-page-setup-state.tssrc/renderer/src/components/connect-dialog-outside-dismiss.test.tsxsrc/renderer/src/components/editor/ExternalFileChangeBanner.test.tsxsrc/renderer/src/components/editor/ExternalFileChangeCompareDialog.test.tsxsrc/renderer/src/components/editor/editor-restored-tab-conflict-scan.test.tssrc/renderer/src/components/editor/rich-markdown-async-image-paste.test.tssrc/renderer/src/components/editor/rich-markdown-async-image-table.test.tssrc/renderer/src/components/editor/rich-markdown-image-insert-code-block.test.tssrc/renderer/src/components/editor/rich-markdown-image-insert.test.tssrc/renderer/src/components/editor/rich-markdown-paste-image.test.tssrc/renderer/src/components/editor/useLocalImagePick.test.tsxsrc/renderer/src/components/linear-api-key-dialog.tsxsrc/renderer/src/components/native-chat/StructuredAgentSessionPaneOverlayLayer.test.tsxsrc/renderer/src/components/new-workspace/use-smart-workspace-secondary-searches.tssrc/renderer/src/components/repo/CreateFromPicker.test.tsxsrc/renderer/src/components/repo/CreateFromPicker.tsxsrc/renderer/src/components/right-sidebar/file-explorer-runtime-owner.tssrc/renderer/src/components/right-sidebar/source-control/review/use-review-context.tssrc/renderer/src/components/right-sidebar/source-control/sync/use-base-ref-default.tssrc/renderer/src/components/right-sidebar/source-control/sync/use-base-refs.tssrc/renderer/src/components/right-sidebar/use-create-pull-request-base-ref-discovery.tssrc/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.repo-default.test.tssrc/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.tssrc/renderer/src/components/settings/BaseRefPicker.tsxsrc/renderer/src/components/settings/GeneralPane.tsxsrc/renderer/src/components/settings/RepositoryGitHubAccountSection.inventory-lifetime.test.tsxsrc/renderer/src/components/settings/RepositoryGitHubAccountSection.test.tsxsrc/renderer/src/components/settings/RepositoryGitHubAccountSection.tsxsrc/renderer/src/components/settings/RepositoryHooksSection.test.tssrc/renderer/src/components/settings/RepositoryHooksSection.tsxsrc/renderer/src/components/settings/RepositoryIconPicker.github-avatar-refresh.test.tsxsrc/renderer/src/components/settings/RepositoryIconPicker.tsxsrc/renderer/src/components/settings/use-repository-issue-command.tssrc/renderer/src/components/settings/use-settings-repo-scroll-effects.tssrc/renderer/src/components/setup-guide/setup-guide-progress-readiness.tssrc/renderer/src/components/setup-guide/use-setup-guide-progress.test.tssrc/renderer/src/components/setup-guide/use-setup-guide-progress.tssrc/renderer/src/components/sidebar/SetupScriptPromptCard.tsxsrc/renderer/src/components/sidebar/WorktreeCard.affiliate-list-mode.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.compact-hover.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.compact-ports-hover-independence.test.tsxsrc/renderer/src/components/sidebar/WorktreeList.card-memo-stability.test.tsxsrc/renderer/src/components/sidebar/WorktreeList.lineage-agent-expansion-coupling.test.tsxsrc/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsxsrc/renderer/src/components/sidebar/WorktreeList.status-lane-lineage-drop.test.tsxsrc/renderer/src/components/sidebar/useAddRepoCloneFlow.test.tssrc/renderer/src/components/sidebar/useCreateRepo.default-checkout.test.tssrc/renderer/src/components/status-bar/PortsStatusSegment.host-routing.test.tsxsrc/renderer/src/components/status-bar/claude-status-sign-in.test.tsxsrc/renderer/src/components/status-bar/codex-status-sign-in.test.tsxsrc/renderer/src/components/status-bar/ports-status-popover-rows.test.tsxsrc/renderer/src/components/tab-group/useTabGroupTabCloseCommands.structured-session.test.tssrc/renderer/src/components/tab-group/useTabGroupWorkspaceModel.focus.test.tssrc/renderer/src/components/terminal-workspace-keydown.test.tssrc/renderer/src/hooks/composer-state/composer-submit-orchestration.tssrc/renderer/src/hooks/composer-state/composer-target-state.tssrc/renderer/src/hooks/composer-state/provider-runtime-sync.test.tssrc/renderer/src/hooks/composer-state/provider-runtime-sync.tssrc/renderer/src/hooks/composer-state/quick-creation-execution.tssrc/renderer/src/hooks/composer-state/runtime-target-model.tssrc/renderer/src/hooks/composer-state/runtime-target-selection.tssrc/renderer/src/hooks/useGitHubSlugMetadata.test.tsxsrc/renderer/src/hooks/useIssueMetadata.test.tsxsrc/renderer/src/lib/active-agent-note-send-explicit-target.test.tssrc/renderer/src/lib/active-agent-note-send-focused-session.test.tssrc/renderer/src/lib/active-agent-note-send-target-detection.test.tssrc/renderer/src/lib/automation-session-observer.test.tssrc/renderer/src/lib/codex-session-restart-account-recheck.test.tssrc/renderer/src/lib/codex-session-restart-shell-flap.test.tssrc/renderer/src/lib/codex-session-restart.test.tssrc/renderer/src/lib/ensure-hooks-confirmed.test.tssrc/renderer/src/lib/ensure-hooks-confirmed.tssrc/renderer/src/lib/launch-work-item-direct-owner-row.test.tssrc/renderer/src/lib/launch-work-item-direct-preflight.tssrc/renderer/src/lib/launch-work-item-direct.test.tssrc/renderer/src/lib/launch-work-item-direct.tssrc/renderer/src/lib/open-agent-message-sender.test.tssrc/renderer/src/lib/workspace-port-scan-publish.test.tssrc/renderer/src/lib/worktree-creation-flow-startup.tssrc/renderer/src/runtime/antigravity-generation-compatibility.test.tssrc/renderer/src/runtime/runtime-client-target.tssrc/renderer/src/runtime/runtime-hooks-client.test.tssrc/renderer/src/runtime/runtime-hooks-client.tssrc/renderer/src/runtime/runtime-repo-client.test.tssrc/renderer/src/runtime/runtime-repo-client.tssrc/renderer/src/runtime/runtime-rpc-client.test.tssrc/renderer/src/runtime/runtime-rpc-client.tssrc/renderer/src/store/repos/owner-routing.tssrc/renderer/src/store/repos/repo-catalog-merge.tssrc/renderer/src/store/slices/editor-open-diff.test.tssrc/renderer/src/store/slices/hosted-review-cache-race.test.tssrc/renderer/src/store/slices/hosted-review-cache.test.tssrc/renderer/src/store/slices/hosted-review-request-lifetime.test.tssrc/renderer/src/store/slices/hosted-review.test.tssrc/renderer/src/store/slices/preflight.test.tssrc/renderer/src/store/slices/preflight.tssrc/renderer/src/store/slices/repos-host-identity-routing.test.tssrc/renderer/src/store/slices/worktree-visibility-owner-settings.tssrc/renderer/src/store/slices/worktree-visibility-settings-write.tssrc/renderer/src/store/slices/worktrees-create-base-status.test.tssrc/renderer/src/store/slices/worktrees-create-parent-pick.test.tssrc/renderer/src/store/slices/worktrees-fetch-owner-routing.test.tssrc/renderer/src/store/slices/worktrees-remote-runtime-create.test.tssrc/renderer/src/store/slices/worktrees-remote-runtime-removal.test.tssrc/renderer/src/store/slices/worktrees/create/create-worktree.tssrc/renderer/src/store/slices/worktrees/create/prefetch-worktree-create-base.tssrc/renderer/src/store/slices/worktrees/listing/detected-worktree-provider-request.tssrc/renderer/src/store/slices/worktrees/listing/detected-worktree-refresh.tssrc/renderer/src/store/slices/worktrees/listing/fetch-all-worktrees.tssrc/renderer/src/store/slices/worktrees/listing/fetch-detected-worktrees.tssrc/renderer/src/store/slices/worktrees/listing/fetch-worktrees.tssrc/renderer/src/store/slices/worktrees/listing/known-ssh-worktree-fetch.tssrc/renderer/src/store/slices/worktrees/listing/worktree-owner-settings.tssrc/renderer/src/store/slices/worktrees/teardown/dispatch-worktree-removal.tssrc/renderer/src/store/slices/worktrees/teardown/force-delete-preserved-branch.tssrc/renderer/src/store/slices/worktrees/teardown/host-qualified-worktree-removal.tssrc/renderer/src/store/slices/worktrees/teardown/missing-worktree-terminal-teardown.tssrc/renderer/src/store/slices/worktrees/teardown/preserved-branch-cleanup-target.tssrc/renderer/src/store/slices/worktrees/teardown/remove-worktree.ts
💤 Files with no reviewable changes (23)
- src/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.ts
- src/renderer/src/components/sidebar/useCreateRepo.default-checkout.test.ts
- src/renderer/src/lib/launch-work-item-direct.test.ts
- src/renderer/src/components/sidebar/useAddRepoCloneFlow.test.ts
- src/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsx
- src/renderer/src/components/sidebar/WorktreeList.card-memo-stability.test.tsx
- src/renderer/src/components/tab-group/useTabGroupWorkspaceModel.focus.test.ts
- src/renderer/src/components/right-sidebar/source-control/review/use-review-context.ts
- src/renderer/src/lib/active-agent-note-send-target-detection.test.ts
- src/renderer/src/components/terminal-workspace-keydown.test.ts
- src/renderer/src/runtime/runtime-rpc-client.test.ts
- src/renderer/src/components/settings/RepositoryGitHubAccountSection.test.tsx
- src/renderer/src/components/sidebar/WorktreeList.lineage-agent-expansion-coupling.test.tsx
- src/renderer/src/runtime/antigravity-generation-compatibility.test.ts
- src/renderer/src/components/status-bar/PortsStatusSegment.host-routing.test.tsx
- src/renderer/src/components/status-bar/ports-status-popover-rows.test.tsx
- src/renderer/src/components/sidebar/WorktreeList.status-lane-lineage-drop.test.tsx
- src/renderer/src/components/right-sidebar/file-explorer-runtime-owner.ts
- src/renderer/src/lib/workspace-port-scan-publish.test.ts
- src/renderer/src/lib/active-agent-note-send-explicit-target.test.ts
- src/renderer/src/components/right-sidebar/source-control/sync/use-base-refs.ts
- src/renderer/src/lib/active-agent-note-send-focused-session.test.ts
- src/renderer/src/runtime/runtime-client-target.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟠 Major · Resolve duplicate PR repositories by the active… · use-create-pull-request-base-ref-discovery.ts:40-43
src/renderer/src/components/right-sidebar/use-create-pull-request-base-ref-discovery.ts:40-43
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftResolve duplicate PR repositories by the active repository host.
When the active workspace host differs from the settings-focused host, the current lookup can select the wrong repository for a duplicate
repoId. The base-ref requests then run against that repository’s host.Pass the already resolved repository host into this hook. Use the repository owner host, not
activeWorktree.hostId, because paired-hub worktrees can have a different execution host.🐛 Suggested fix
diff --git a/src/renderer/src/components/right-sidebar/use-create-pull-request-base-ref-discovery.ts b/src/renderer/src/components/right-sidebar/use-create-pull-request-base-ref-discovery.ts @@ type CreatePullRequestBaseRefDiscoveryOptions = { open: boolean repoId: string + repoHostId: string | null base: string @@ open, repoId, + repoHostId, base, @@ const repoHostId = useAppStore((s) => { - const repo = findRepoForHost(s.repos, repoId, { settings: s.settings }) + const repo = findRepoForHost(s.repos, repoId, { + settings: s.settings, + hostId: repoHostId + }) return repo ? getRepoExecutionHostId(repo) : null })diff --git a/src/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.ts b/src/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.ts @@ import { runtimeTargetForOwnerEnvironment } from '@/runtime/runtime-client-target' +import { getRepoExecutionHostId } from '../../../../shared/execution-host' @@ const repoDefaultBaseRef = useCreatePullRequestBaseRefDiscovery({ open, repoId, + repoHostId: repo ? getRepoExecutionHostId(repo) : null, base,
🟡 Minor · Clear the default ref when the repository host is unavailable. · use-base-ref-default.ts:21
src/renderer/src/components/right-sidebar/source-control/sync/use-base-ref-default.ts:21
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winClear the default ref when the repository host is unavailable. If a repository switch leaves
activeRepoIdset butactiveRepoExecutionHostIdnull, this guard returns the previous repository’sdefaultBaseRef. The caller can then compare branches against the previous repository’s ref. Reset the value before the missing-host return.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
8c78c2f4-c9bc-4ace-8be4-ca3110f2a4a0
📥 Commits
Reviewing files that changed from the base of the PR and between 853c25d and 77ae7c756ed6a87c4e0d9f364b09c3bc5b800d64.
📒 Files selected for processing (123)
config/focus-setting-read-baseline.txtconfig/owner-routing-baseline.txtconfig/scripts/check-owner-routing-ratchet.mjssrc/main/providers/execution-host-provider-dispatch.tssrc/renderer/src/components/automations/use-automations-page-setup-state.tssrc/renderer/src/components/connect-dialog-outside-dismiss.test.tsxsrc/renderer/src/components/editor/ExternalFileChangeBanner.test.tsxsrc/renderer/src/components/editor/ExternalFileChangeCompareDialog.test.tsxsrc/renderer/src/components/editor/editor-restored-tab-conflict-scan.test.tssrc/renderer/src/components/editor/rich-markdown-async-image-paste.test.tssrc/renderer/src/components/editor/rich-markdown-async-image-table.test.tssrc/renderer/src/components/editor/rich-markdown-image-insert-code-block.test.tssrc/renderer/src/components/editor/rich-markdown-image-insert.test.tssrc/renderer/src/components/editor/rich-markdown-paste-image.test.tssrc/renderer/src/components/editor/useLocalImagePick.test.tsxsrc/renderer/src/components/linear-api-key-dialog.tsxsrc/renderer/src/components/native-chat/StructuredAgentSessionPaneOverlayLayer.test.tsxsrc/renderer/src/components/new-workspace/use-smart-workspace-secondary-searches.tssrc/renderer/src/components/repo/CreateFromPicker.test.tsxsrc/renderer/src/components/repo/CreateFromPicker.tsxsrc/renderer/src/components/right-sidebar/file-explorer-runtime-owner.tssrc/renderer/src/components/right-sidebar/source-control/review/use-review-context.tssrc/renderer/src/components/right-sidebar/source-control/sync/use-base-ref-default.tssrc/renderer/src/components/right-sidebar/source-control/sync/use-base-refs.tssrc/renderer/src/components/right-sidebar/use-create-pull-request-base-ref-discovery.tssrc/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.repo-default.test.tssrc/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.tssrc/renderer/src/components/settings/BaseRefPicker.tsxsrc/renderer/src/components/settings/GeneralPane.tsxsrc/renderer/src/components/settings/RepositoryGitHubAccountSection.inventory-lifetime.test.tsxsrc/renderer/src/components/settings/RepositoryGitHubAccountSection.test.tsxsrc/renderer/src/components/settings/RepositoryGitHubAccountSection.tsxsrc/renderer/src/components/settings/RepositoryHooksSection.test.tssrc/renderer/src/components/settings/RepositoryHooksSection.tsxsrc/renderer/src/components/settings/RepositoryIconPicker.github-avatar-refresh.test.tsxsrc/renderer/src/components/settings/RepositoryIconPicker.tsxsrc/renderer/src/components/settings/use-repository-issue-command.tssrc/renderer/src/components/settings/use-settings-repo-scroll-effects.tssrc/renderer/src/components/setup-guide/setup-guide-progress-readiness.tssrc/renderer/src/components/setup-guide/use-setup-guide-progress.test.tssrc/renderer/src/components/setup-guide/use-setup-guide-progress.tssrc/renderer/src/components/sidebar/SetupScriptPromptCard.tsxsrc/renderer/src/components/sidebar/WorktreeCard.affiliate-list-mode.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.compact-hover.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.compact-ports-hover-independence.test.tsxsrc/renderer/src/components/sidebar/WorktreeList.card-memo-stability.test.tsxsrc/renderer/src/components/sidebar/WorktreeList.lineage-agent-expansion-coupling.test.tsxsrc/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsxsrc/renderer/src/components/sidebar/WorktreeList.status-lane-lineage-drop.test.tsxsrc/renderer/src/components/sidebar/useAddRepoCloneFlow.test.tssrc/renderer/src/components/sidebar/useCreateRepo.default-checkout.test.tssrc/renderer/src/components/status-bar/PortsStatusSegment.host-routing.test.tsxsrc/renderer/src/components/status-bar/claude-status-sign-in.test.tsxsrc/renderer/src/components/status-bar/codex-status-sign-in.test.tsxsrc/renderer/src/components/status-bar/ports-status-popover-rows.test.tsxsrc/renderer/src/components/tab-group/useTabGroupTabCloseCommands.structured-session.test.tssrc/renderer/src/components/tab-group/useTabGroupWorkspaceModel.focus.test.tssrc/renderer/src/components/terminal-workspace-keydown.test.tssrc/renderer/src/hooks/composer-state/composer-submit-orchestration.tssrc/renderer/src/hooks/composer-state/composer-target-state.tssrc/renderer/src/hooks/composer-state/provider-runtime-sync.test.tssrc/renderer/src/hooks/composer-state/provider-runtime-sync.tssrc/renderer/src/hooks/composer-state/quick-creation-execution.tssrc/renderer/src/hooks/composer-state/runtime-target-model.tssrc/renderer/src/hooks/composer-state/runtime-target-selection.tssrc/renderer/src/hooks/useGitHubSlugMetadata.test.tsxsrc/renderer/src/hooks/useIssueMetadata.test.tsxsrc/renderer/src/lib/active-agent-note-send-explicit-target.test.tssrc/renderer/src/lib/active-agent-note-send-focused-session.test.tssrc/renderer/src/lib/active-agent-note-send-target-detection.test.tssrc/renderer/src/lib/automation-session-observer.test.tssrc/renderer/src/lib/codex-session-restart-account-recheck.test.tssrc/renderer/src/lib/codex-session-restart-shell-flap.test.tssrc/renderer/src/lib/codex-session-restart.test.tssrc/renderer/src/lib/ensure-hooks-confirmed.test.tssrc/renderer/src/lib/ensure-hooks-confirmed.tssrc/renderer/src/lib/launch-work-item-direct-owner-row.test.tssrc/renderer/src/lib/launch-work-item-direct-preflight.tssrc/renderer/src/lib/launch-work-item-direct.test.tssrc/renderer/src/lib/launch-work-item-direct.tssrc/renderer/src/lib/open-agent-message-sender.test.tssrc/renderer/src/lib/workspace-port-scan-publish.test.tssrc/renderer/src/lib/worktree-creation-flow-startup.tssrc/renderer/src/runtime/antigravity-generation-compatibility.test.tssrc/renderer/src/runtime/runtime-client-target.tssrc/renderer/src/runtime/runtime-hooks-client.test.tssrc/renderer/src/runtime/runtime-hooks-client.tssrc/renderer/src/runtime/runtime-repo-client.test.tssrc/renderer/src/runtime/runtime-repo-client.tssrc/renderer/src/runtime/runtime-rpc-client.test.tssrc/renderer/src/runtime/runtime-rpc-client.tssrc/renderer/src/store/repos/owner-routing.tssrc/renderer/src/store/repos/repo-catalog-merge.tssrc/renderer/src/store/slices/editor-open-diff.test.tssrc/renderer/src/store/slices/hosted-review-cache-race.test.tssrc/renderer/src/store/slices/hosted-review-cache.test.tssrc/renderer/src/store/slices/hosted-review-request-lifetime.test.tssrc/renderer/src/store/slices/hosted-review.test.tssrc/renderer/src/store/slices/preflight.test.tssrc/renderer/src/store/slices/preflight.tssrc/renderer/src/store/slices/repos-host-identity-routing.test.tssrc/renderer/src/store/slices/worktree-visibility-owner-settings.tssrc/renderer/src/store/slices/worktree-visibility-settings-write.tssrc/renderer/src/store/slices/worktrees-create-base-status.test.tssrc/renderer/src/store/slices/worktrees-create-parent-pick.test.tssrc/renderer/src/store/slices/worktrees-fetch-owner-routing.test.tssrc/renderer/src/store/slices/worktrees-remote-runtime-create.test.tssrc/renderer/src/store/slices/worktrees-remote-runtime-removal.test.tssrc/renderer/src/store/slices/worktrees/create/create-worktree.tssrc/renderer/src/store/slices/worktrees/create/prefetch-worktree-create-base.tssrc/renderer/src/store/slices/worktrees/listing/detected-worktree-provider-request.tssrc/renderer/src/store/slices/worktrees/listing/detected-worktree-refresh.tssrc/renderer/src/store/slices/worktrees/listing/fetch-all-worktrees.tssrc/renderer/src/store/slices/worktrees/listing/fetch-detected-worktrees.tssrc/renderer/src/store/slices/worktrees/listing/fetch-worktrees.tssrc/renderer/src/store/slices/worktrees/listing/known-ssh-worktree-fetch.tssrc/renderer/src/store/slices/worktrees/listing/worktree-owner-settings.tssrc/renderer/src/store/slices/worktrees/teardown/dispatch-worktree-removal.tssrc/renderer/src/store/slices/worktrees/teardown/force-delete-preserved-branch.tssrc/renderer/src/store/slices/worktrees/teardown/host-qualified-worktree-removal.tssrc/renderer/src/store/slices/worktrees/teardown/missing-worktree-terminal-teardown.tssrc/renderer/src/store/slices/worktrees/teardown/preserved-branch-cleanup-target.tssrc/renderer/src/store/slices/worktrees/teardown/remove-worktree.ts
💤 Files with no reviewable changes (23)
- src/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.ts
- src/renderer/src/components/sidebar/useCreateRepo.default-checkout.test.ts
- src/renderer/src/lib/launch-work-item-direct.test.ts
- src/renderer/src/components/sidebar/useAddRepoCloneFlow.test.ts
- src/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsx
- src/renderer/src/components/sidebar/WorktreeList.card-memo-stability.test.tsx
- src/renderer/src/components/tab-group/useTabGroupWorkspaceModel.focus.test.ts
- src/renderer/src/components/right-sidebar/source-control/review/use-review-context.ts
- src/renderer/src/lib/active-agent-note-send-target-detection.test.ts
- src/renderer/src/components/terminal-workspace-keydown.test.ts
- src/renderer/src/runtime/runtime-rpc-client.test.ts
- src/renderer/src/components/settings/RepositoryGitHubAccountSection.test.tsx
- src/renderer/src/components/sidebar/WorktreeList.lineage-agent-expansion-coupling.test.tsx
- src/renderer/src/runtime/antigravity-generation-compatibility.test.ts
- src/renderer/src/components/status-bar/PortsStatusSegment.host-routing.test.tsx
- src/renderer/src/components/status-bar/ports-status-popover-rows.test.tsx
- src/renderer/src/components/sidebar/WorktreeList.status-lane-lineage-drop.test.tsx
- src/renderer/src/components/right-sidebar/file-explorer-runtime-owner.ts
- src/renderer/src/lib/workspace-port-scan-publish.test.ts
- src/renderer/src/lib/active-agent-note-send-explicit-target.test.ts
- src/renderer/src/components/right-sidebar/source-control/sync/use-base-refs.ts
- src/renderer/src/lib/active-agent-note-send-focused-session.test.ts
- src/renderer/src/runtime/runtime-client-target.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
ELI5
This is the last step of moving Orca off the global "Active Server" setting for anything that already belongs to a host. The two old helpers that turned that setting into a connection are deleted. The lint check that counts their uses now allows zero, so new code that routes by the setting fails CI. The few screens that really are about "the default host", because they have no project or workspace to route by, now say so explicitly.
What Changed
connectLinear. They now usedefaultScopeHost(settings)instead ofgetActiveRuntimeTarget(settings). That is the second approved reader from decision D4-9/D4-12: the initial host of a surface that has no row and no picker yet.getActiveRuntimeTargetandsettingsForRuntimeOwnerare deleted, along with their re-exports fromruntime-rpc-client.legacyRouteFromSettingsnever existed on main; the ratchet keeps the name as a guard. Type-only references now useRuntimeClientTarget.settingsForRepoOwner(both copies),settingsForKnownRepoOwner,settingsForWorktreeOwnerandgetRightSidebarWorktreeRuntimeSettings(its whole file). StalegetActiveRuntimeTarget/settingsForRuntimeOwnerentries in test mocks are removed.config/owner-routing-baseline.txtis empty, so any new use of the three names failspnpm lintand CI. The focus-read ratchet (1144 reads) still pins every other read of the setting per file and may only go down. No site needed the V4b exception.src/main/providers/execution-host-provider-dispatch.tsis rewritten in shorter, neutral terms.Why
Decision D4-9 says the setting is read only by creation flows with no source row (
defaultCreationHost) and by the D4-12 scope picker's initial default (defaultScopeHost). The remaining sites are of the second kind: Settings and readiness views mirror the default host's state, and none of them has a resource to route by. Naming themdefaultScopeHostkeeps them counted by the focus-read ratchet and searchable for when Settings gets its own picker. Deleting the old helpers makes the "no new bypass" rule a compile error as well as a lint failure.We considered moving the visibility defaults onto the Settings host picker from #27265 in this PR. That would change behavior (which host's defaults you edit) and belongs in its own change.
Linked Issue
None. This is part of the host-ownership routing stack (D4 G1). Builds on #27298 (merged). The rename of the "Active Server" copy is #27286 and merges after this.
Visual Proof
N/A. There is no UI change; every replaced call returns the same host as before.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
pnpm lintpasses, including both ratchets (owner-routing 0, focus-read 1144).pnpm tc:webis clean andpnpm run check:code-quality:changedpasses.Focused vitest: the 55 changed and related test files pass (559 tests), covering GeneralPane, worktree visibility, preflight, the Linear dialog and the mock clean-ups.
No behavior assertions changed. The removed tests covered the deleted
getActiveRuntimeTargetitself;defaultScopeHosthas its own tests from refactor(sources): row-less sources and host-less surfaces name their host #27290.Review
Agent skill upstream boundary
Notes
Renderer and comment only; no wire change. SSH, folder workspaces and Windows are unaffected (same targets as before).
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)