From 90a89bd649ebaadebacd6ae640e5bd6bb97290af Mon Sep 17 00:00:00 2001
From: Jinwoo-H
Date: Fri, 12 Jun 2026 23:05:51 -0700
Subject: [PATCH] Add provider host scope controls
Co-authored-by: Orca
---
.../host-context-implementation-checklist.md | 7 +-
.../github/github-rate-limit-display.tsx | 19 ++-
.../gitlab/gitlab-rate-limit-display.tsx | 19 ++-
.../settings/ProviderHostScopeControl.tsx | 49 ++++++++
...-source-control-integration-cards.test.tsx | 24 +++-
.../cli-source-control-integration-cards.tsx | 19 ++-
.../settings/jira-integration-card.test.tsx | 115 ++++++++++++++++++
.../settings/jira-integration-card.tsx | 19 ++-
.../provider-rate-limit-scope-panels.test.tsx | 23 +++-
.../task-tracker-integration-cards.test.tsx | 14 ++-
.../task-tracker-integration-cards.tsx | 19 ++-
11 files changed, 268 insertions(+), 59 deletions(-)
create mode 100644 src/renderer/src/components/settings/ProviderHostScopeControl.tsx
create mode 100644 src/renderer/src/components/settings/jira-integration-card.test.tsx
diff --git a/notes/host-context-implementation-checklist.md b/notes/host-context-implementation-checklist.md
index c86576ba277..dee522f517b 100644
--- a/notes/host-context-implementation-checklist.md
+++ b/notes/host-context-implementation-checklist.md
@@ -84,9 +84,9 @@ Done means: scheduled or manual automations behave predictably when a project ex
## 6. Settings, Accounts, And Host Ownership
-- [~] Clarify which settings are client-owned versus host-owned.
-- [~] Add host/account selectors to provider settings where credentials may differ by host.
-- [~] Make provider rate limits, diagnostics, and “current account” views show their host/source context.
+- [x] Clarify which settings are client-owned versus host-owned.
+- [x] Add host/account selectors to provider settings where credentials may differ by host.
+- [x] Make provider rate limits, diagnostics, and “current account” views show their host/source context.
- [x] Audit source-control AI, agent defaults, command defaults, and model selections for whether they should be client-global or host-scoped.
- [x] Preserve existing Windows/WSL-style setting patterns where they already solve host-specific settings.
- [x] Ensure remote server version/capability information is visible enough to explain unavailable controls.
@@ -258,3 +258,4 @@ Done means: reviewers and future agents can understand the vision, implementatio
- [x] 2026-06-12: Extracted and tested external automation source availability copy so local missing tooling, disconnected SSH sources, connecting SSH sources, and connected SSH hosts with missing remote tooling get distinct states; verified with focused automation availability tests, targeted oxlint, and full `pnpm run typecheck`.
- [x] 2026-06-12: Marked repo-id/path compatibility adapters complete after hardening the renderer project-host selector to merge repo-derived compatibility rows when hydrated project/setup arrays are empty or partial, alongside existing shared projection, persistence backfill/sync, automation context migration, and pending worktree context coverage. Verified with selector/projection tests, persistence tests, targeted oxlint, full `pnpm run typecheck`, and `git diff --check`.
- [x] 2026-06-12: Marked the Host copy audit complete after replacing remaining visible stale SSH/project wording in paired-web project creation errors, Settings SSH search entries, AI Vault SSH-host workspace copy, and SSH shutdown errors. Verified with a stale-copy scan showing only comments/tests/technical internals, focused SSH IPC tests, targeted oxlint, full `pnpm run typecheck`, and `git diff --check`.
+- [x] 2026-06-12: Completed Settings ownership/account rows by adding a shared provider Host scope control with a Change Host action that opens Settings > Active Server from GitHub/GitLab/Linear/Jira account surfaces and GitHub/GitLab API budget panels. Existing ownership diagnostics still distinguish desktop-client versus remote-server credentials, and rate-limit panels show the budget Host scope. Verified with settings ownership, RuntimeEnvironmentsPane, provider account, source-control card, task-tracker card, Jira card, and rate-limit panel tests, targeted oxlint, full `pnpm run typecheck`, and `git diff --check`.
diff --git a/src/renderer/src/components/github/github-rate-limit-display.tsx b/src/renderer/src/components/github/github-rate-limit-display.tsx
index f05f7ac479e..38297503285 100644
--- a/src/renderer/src/components/github/github-rate-limit-display.tsx
+++ b/src/renderer/src/components/github/github-rate-limit-display.tsx
@@ -6,6 +6,7 @@ import { useAppStore } from '@/store'
import { callRuntimeRpc, getActiveRuntimeTarget } from '@/runtime/runtime-rpc-client'
import type { GetRateLimitResult, GitHubRateLimitSnapshot } from '../../../../shared/types'
import { getProviderRateLimitScope } from '@/components/settings/provider-account-scope'
+import { ProviderHostScopeControl } from '@/components/settings/ProviderHostScopeControl'
import { translate } from '@/i18n/i18n'
const REFRESH_INTERVAL_MS = 60_000
@@ -190,16 +191,14 @@ export function GitHubRateLimitPanel({ className }: { className?: string }): Rea
'Orca uses REST, Search, and GraphQL through the GitHub CLI.'
)}
-
-
- {translate(
- 'auto.components.github.github.rate.limit.display.budget_scope',
- 'Budget scope: {{value0}}',
- { value0: budgetScope.label }
- )}
- {' '}
- {budgetScope.description}
-
+