From 412c4bfc7a38fdd839cd4c70bc8f98e272737bd0 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 10 Nov 2026 02:55:56 -0800 Subject: [PATCH 1/4] feat(settings): Orca Cloud settings group, secrets a11y and gateway copy (DS-20, DS-21, DS-37) - New Settings group Orca Cloud: Plan & billing, Team, Cloud secrets, Cloud environments, MCP servers, Orca API keys, Routines. Panes moved out of Orca account (which now links to them) and the runtime row (now a link). - Agent API keys and Orca account descriptions say where cloud keys go. - Paste preview value fields get accessible names; TabsContent shows the focus-ring outline when keyboard-focused. - Gateway model hint no longer gives dev-credit advice; effectiveEmpty fixture renders the empty state. --- .../hosted-environment-cli-operations.ts | 2 +- .../billing/PlanBillingSection.fixture.tsx | 6 + .../components/billing/PlanBillingSection.tsx | 67 ++++-- .../billing/team/TeamSettingsLink.tsx | 9 +- .../CloudAgentSetupFields.tsx | 4 +- .../VmBuildCloudAgentStep.tsx | 4 +- .../CloudEnvironmentSection.tsx | 42 ++-- .../orca-cloud-run-target-access.ts | 4 +- .../accounts/orca/OrcaAccountSettingsPane.tsx | 27 +-- .../orca/orca-account-settings-search.ts | 14 -- .../AgentApiKeysCloudDescription.test.tsx | 18 ++ .../AgentApiKeysCloudDescription.tsx | 31 +++ .../CloudSecretsPane.fixture.tsx | 22 +- .../cloud-secrets/CloudSecretsPane.tsx | 13 +- .../CloudSecretsPasteEnv.test.tsx | 8 + .../cloud-secrets/CloudSecretsPasteRow.tsx | 7 + .../cloud-secrets/CloudSecretsSection.tsx | 23 +- .../cloud-secrets/SecretValueInput.tsx | 8 +- .../settings-navigation-foundations.ts | 5 + .../orca-cloud/OrcaCloudMcpServersPane.tsx | 108 +++++++++ .../orca-cloud/OrcaCloudSettings.fixture.tsx | 218 ++++++++++++++++++ .../orca-cloud/OrcaCloudSettingsLinks.tsx | 54 +++++ .../orca-cloud/OrcaCloudSettingsPanes.tsx | 161 +++++++++++++ .../orca-cloud/orca-cloud-settings-search.ts | 83 +++++++ .../settings-capability-section-renderers.tsx | 19 +- .../settings-orca-cloud-section-renderers.tsx | 51 ++++ .../settings/page/settings-page-renderer.tsx | 4 +- ...tings-setup-workflow-section-renderers.tsx | 15 +- .../cloud-mcp/CloudMcpSyncSection.tsx | 7 +- .../runtimes/EphemeralVmRuntimeRow.tsx | 29 ++- src/renderer/src/components/ui/tabs.tsx | 8 +- .../worktree-creation/VmBuildSheet.tsx | 2 +- ...settings-navigation-capability-sections.ts | 67 ++---- ...ngs-navigation-orca-cloud-sections.test.ts | 55 +++++ ...settings-navigation-orca-cloud-sections.ts | 106 +++++++++ .../hooks/useSettingsNavigationMetadata.ts | 2 + src/renderer/src/i18n/locales/en.json | 67 +++++- .../src/lib/settings-navigation-types.ts | 5 + 38 files changed, 1190 insertions(+), 185 deletions(-) create mode 100644 src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.test.tsx create mode 100644 src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.tsx create mode 100644 src/renderer/src/components/settings/orca-cloud/OrcaCloudMcpServersPane.tsx create mode 100644 src/renderer/src/components/settings/orca-cloud/OrcaCloudSettings.fixture.tsx create mode 100644 src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsLinks.tsx create mode 100644 src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsPanes.tsx create mode 100644 src/renderer/src/components/settings/orca-cloud/orca-cloud-settings-search.ts create mode 100644 src/renderer/src/components/settings/page/settings-orca-cloud-section-renderers.tsx create mode 100644 src/renderer/src/hooks/settings-navigation-orca-cloud-sections.test.ts create mode 100644 src/renderer/src/hooks/settings-navigation-orca-cloud-sections.ts diff --git a/src/main/hosted-sandbox/environments/hosted-environment-cli-operations.ts b/src/main/hosted-sandbox/environments/hosted-environment-cli-operations.ts index 1dd2625c70e..360bba85b88 100644 --- a/src/main/hosted-sandbox/environments/hosted-environment-cli-operations.ts +++ b/src/main/hosted-sandbox/environments/hosted-environment-cli-operations.ts @@ -35,7 +35,7 @@ export async function resolveCloudEnvironment( throw new HostedEnvironmentUserError( 'not_found', 'no_environments', - 'This org has no environment yet. Create one in Settings > Orca Cloud.' + 'This org has no environment yet. Create one in Settings > Orca Cloud > Cloud environments.' ) } if (!selector) { diff --git a/src/renderer/src/components/billing/PlanBillingSection.fixture.tsx b/src/renderer/src/components/billing/PlanBillingSection.fixture.tsx index c07c627551b..0ffb1b09249 100644 --- a/src/renderer/src/components/billing/PlanBillingSection.fixture.tsx +++ b/src/renderer/src/components/billing/PlanBillingSection.fixture.tsx @@ -126,3 +126,9 @@ export const suspendedAdmin = defineFixture({ /> ) }) + +/** First read in Settings › Orca Cloud › Plan & billing: a placeholder, not an empty pane. */ +export const loadingFirstRead = defineFixture({ + width: 600, + render: () => +}) diff --git a/src/renderer/src/components/billing/PlanBillingSection.tsx b/src/renderer/src/components/billing/PlanBillingSection.tsx index 47cc1fc4c1d..ea41ddc4cfa 100644 --- a/src/renderer/src/components/billing/PlanBillingSection.tsx +++ b/src/renderer/src/components/billing/PlanBillingSection.tsx @@ -1,8 +1,8 @@ import { useState } from 'react' -import { SettingsGroupHeader } from '@/components/settings/section-layout/SettingsGroup' import { CreditCard, ExternalLink, RefreshCw } from 'lucide-react' import { Button } from '@/components/ui/button' import { InlineError } from '@/components/ui/inline-error' +import { Skeleton } from '@/components/ui/skeleton' import { useIntlLocale, useTranslate } from '@/i18n/use-translate' import { formatCents } from './plans/plans-pricing' import { cn } from '@/lib/utils' @@ -123,34 +123,49 @@ export function PlanBillingView({ }: PlanBillingViewProps): React.JSX.Element | null { const t = useTranslate() const locale = useIntlLocale() - if (!result || result.status === 'unconfigured' || result.status === 'signed-out') { - // The pane above already handles sign-in; billing stays out of builds without a service. + if (!result) { + return loading ? ( +
+ + {t('auto.components.billing.loading', 'Loading your plan…')} + + + +
+ ) : null + } + if (result.status === 'unconfigured') { + return ( +

+ {t( + 'auto.components.billing.unconfigured', + 'Billing isn’t available in this build of Orca.' + )} +

+ ) + } + if (result.status === 'signed-out') { + // The Orca Cloud panes show the sign-in prompt before this renders. return null } - const header = ( - - - - } - /> + // Settings › Orca Cloud › Plan & billing owns the title; the refresh sits with the plan it reloads. + const refreshButton = ( + ) if (result.status === 'failed') { return ( -
- {header} +
- {header} +
{hasPlan ? (
@@ -187,6 +201,7 @@ export function PlanBillingView({ })} + {refreshButton}
{/* Overage is moot while sandboxes are suspended for a failed payment. */} @@ -248,7 +263,9 @@ export function PlanBillingView({ - ) : null} + ) : ( + {refreshButton} + )}
{/* The payment alert already says who to ask; don't ask twice. */} diff --git a/src/renderer/src/components/billing/team/TeamSettingsLink.tsx b/src/renderer/src/components/billing/team/TeamSettingsLink.tsx index f65db470502..6956a50479d 100644 --- a/src/renderer/src/components/billing/team/TeamSettingsLink.tsx +++ b/src/renderer/src/components/billing/team/TeamSettingsLink.tsx @@ -1,12 +1,11 @@ import { ChevronRight } from 'lucide-react' -import { SettingsGroupHeader } from '@/components/settings/section-layout/SettingsGroup' import { useTranslate } from '@/i18n/use-translate' import { TeamMark } from './TeamAvatar' import { memberCountLabel } from './team-copy' import { openTeamPage } from './team-page-store' import { useOrgRoster } from './use-org-roster' -/** Settings → Orca account: one row that opens the Team page (members, invites, seats). */ +/** Settings › Orca Cloud › Team: one row that opens the Team page (members, invites, seats). */ export function TeamSettingsLink({ orgId, orgName @@ -18,11 +17,7 @@ export function TeamSettingsLink({ const roster = useOrgRoster(orgId) const members = roster.result?.status === 'ok' ? roster.result.roster.members.length : null return ( -
- +
- {connected ? : null} - {connected && authStatus?.capabilities?.flags?.billing ? ( - - ) : null} - {connected ? : null} - {connected && authStatus?.capabilities?.flags?.sandbox ? ( - - ) : null} - {connected ? ( - + {connected && cloudAvailable ? ( + openSettingsTarget({ pane, repoId: null })} /> ) : null}
diff --git a/src/renderer/src/components/settings/accounts/orca/orca-account-settings-search.ts b/src/renderer/src/components/settings/accounts/orca/orca-account-settings-search.ts index 740c6dda7a6..2ff733d6869 100644 --- a/src/renderer/src/components/settings/accounts/orca/orca-account-settings-search.ts +++ b/src/renderer/src/components/settings/accounts/orca/orca-account-settings-search.ts @@ -18,19 +18,5 @@ export const getOrcaAccountSettingsSearchEntries = createLocalizedCatalog(() => ...translateSearchKeyword('auto.components.settings.orcaAccount.keywordRelay', 'relay'), ...translateSearchKeyword('auto.components.settings.orcaAccount.keywordCloud', 'cloud') ] - }, - { - title: translate('cloudSecrets.title', 'Cloud secrets'), - description: translate( - 'cloudSecrets.searchDescription', - 'Environment variables and agent keys for Orca Cloud workspaces: personal, shared with your team, or per repository.' - ), - keywords: [ - ...translateSearchKeyword('cloudSecrets.keywordSecret', 'secret'), - ...translateSearchKeyword('cloudSecrets.keywordEnv', 'environment variable'), - ...translateSearchKeyword('cloudSecrets.keywordDotenv', '.env'), - ...translateSearchKeyword('cloudSecrets.keywordApiKey', 'api key'), - ...translateSearchKeyword('cloudSecrets.keywordGateway', 'ai gateway') - ] } ]) diff --git a/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.test.tsx b/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.test.tsx new file mode 100644 index 00000000000..06e6d15681b --- /dev/null +++ b/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.test.tsx @@ -0,0 +1,18 @@ +// @vitest-environment happy-dom +import { cleanup, fireEvent, render, screen } from '@testing-library/react' +import { afterEach, describe, expect, it, vi } from 'vitest' +import { AgentApiKeysCloudDescription } from './AgentApiKeysCloudDescription' + +describe('AgentApiKeysCloudDescription', () => { + afterEach(cleanup) + + it('says the keys are not for Orca Cloud and links to Cloud secrets', () => { + const open = vi.fn() + const { container } = render() + expect(container.textContent).toBe( + 'Keys here are for this computer and your SSH and paired hosts. For Orca Cloud, use Cloud secrets.' + ) + fireEvent.click(screen.getByRole('button', { name: 'Cloud secrets' })) + expect(open).toHaveBeenCalledTimes(1) + }) +}) diff --git a/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.tsx b/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.tsx new file mode 100644 index 00000000000..889fbbd0ea6 --- /dev/null +++ b/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.tsx @@ -0,0 +1,31 @@ +import { Trans } from 'react-i18next' +import { i18n } from '@/i18n/i18n' +import { useTranslate } from '@/i18n/use-translate' + +/** Agent API keys never reach Orca Cloud hosts; the pane says so and points at Cloud secrets. */ +export function AgentApiKeysCloudDescription({ + onOpenCloudSecrets +}: { + onOpenCloudSecrets: () => void +}): React.JSX.Element { + const t = useTranslate() + return ( + Cloud secrets.' + )} + components={{ + // Not : the Trans parser treats HTML void tag names as self-closing. + secrets: ( + + + ))} + + + ) +} diff --git a/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsPanes.tsx b/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsPanes.tsx new file mode 100644 index 00000000000..a7812380da4 --- /dev/null +++ b/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsPanes.tsx @@ -0,0 +1,161 @@ +import { CircleUserRound } from 'lucide-react' +import { Skeleton } from '@/components/ui/skeleton' +import { useOrcaProfileAuthStatusRefresh } from '@/hooks/use-orca-profile-auth-status-refresh' +import { useTranslate } from '@/i18n/use-translate' +import { useAppStore } from '@/store' +import { PlanBillingSection } from '../../billing/PlanBillingSection' +import { TeamSettingsLink } from '../../billing/team/TeamSettingsLink' +import { + CloudEnvironmentSection, + useOrcaCloudEnvironmentsAvailability +} from '../../cloud-environment/CloudEnvironmentSection' +import { OrcaSignInButton, OrcaSignInWaitNotice } from '../../OrcaSignInProgress' +import { CloudApiEmptyState } from '../cloud-api/cloud-api-parts' +import { CloudSecretsSection } from '../cloud-secrets/CloudSecretsSection' +import { SettingsGroup } from '../section-layout/SettingsGroup' +import { CloudPredictiveWakeSetting } from './CloudPredictiveWakeSetting' +import { OrcaCloudMcpServersPane } from './OrcaCloudMcpServersPane' + +type OrcaCloudAccount = { + orgId: string | null + orgName: string | null + userId: string | null + billing: boolean + sandbox: boolean +} + +export function OrcaCloudSignedOutNotice(): React.JSX.Element { + const t = useTranslate() + const reconnect = useAppStore((s) => s.orcaProfileAuthStatus?.state === 'reconnect-required') + return ( + + + + {reconnect + ? t('auto.components.settings.orcaAccount.signInAgain', 'Sign in again') + : t('auto.components.settings.orcaAccount.signIn', 'Sign in to Orca')} + + +
+ } + /> + + ) +} + +/** Every Orca Cloud pane needs the account: show sign-in instead of an empty or failing pane. */ +function OrcaCloudAccountGate({ + children +}: { + children: (account: OrcaCloudAccount) => React.ReactNode +}): React.JSX.Element { + const t = useTranslate() + const authStatus = useAppStore((s) => s.orcaProfileAuthStatus) + useOrcaProfileAuthStatusRefresh() + if (!authStatus) { + return ( +
+ + {t('auto.components.settings.orcaAccount.checking', 'Checking account status…')} + + + +
+ ) + } + if (authStatus.state !== 'connected') { + return + } + return ( + <> + {children({ + orgId: authStatus.cloud?.activeOrgId ?? null, + orgName: authStatus.cloud?.activeOrgName ?? null, + userId: authStatus.cloud?.userId ?? null, + billing: authStatus.capabilities?.flags?.billing === true, + sandbox: authStatus.capabilities?.flags?.sandbox === true + })} + + ) +} + +export function OrcaCloudBillingPane(): React.JSX.Element { + return {() => } +} + +export function OrcaCloudTeamPane(): React.JSX.Element { + const t = useTranslate() + return ( + + {(account) => + account.billing ? ( + + ) : ( +

+ {t( + 'settings.orcaCloud.team.unavailable', + 'Teams aren’t available for this account yet.' + )} +

+ ) + } +
+ ) +} + +export function OrcaCloudSecretsPane(): React.JSX.Element { + return ( + + {(account) => } + + ) +} + +export function OrcaCloudEnvironmentsPane(): React.JSX.Element { + const t = useTranslate() + const configured = useOrcaCloudEnvironmentsAvailability() + return ( + + {(account) => ( +
+ {configured === null ? ( + + ) : configured ? ( + + ) : ( +

+ {t( + 'settings.orcaCloud.environments.unavailable', + 'Cloud environments aren’t available for this account yet.' + )} +

+ )} + {account.sandbox ? : null} +
+ )} +
+ ) +} + +export function OrcaCloudMcpPane(): React.JSX.Element { + return {() => } +} diff --git a/src/renderer/src/components/settings/orca-cloud/orca-cloud-settings-search.ts b/src/renderer/src/components/settings/orca-cloud/orca-cloud-settings-search.ts new file mode 100644 index 00000000000..04c8fec7f73 --- /dev/null +++ b/src/renderer/src/components/settings/orca-cloud/orca-cloud-settings-search.ts @@ -0,0 +1,83 @@ +import { createLocalizedCatalog } from '@/i18n/localized-catalog' +import { translate } from '@/i18n/i18n' +import { translateSearchKeyword } from '../search/settings-search-keywords' + +export const getOrcaCloudBillingSearchEntries = createLocalizedCatalog(() => [ + { + title: translate('auto.components.billing.title', 'Plan & billing'), + description: translate( + 'settings.orcaCloud.billing.searchDescription', + 'Your Orca Cloud plan, sandbox hours, overage and payment.' + ), + keywords: [ + ...translateSearchKeyword('settings.orcaCloud.billing.keywordPlan', 'plan'), + ...translateSearchKeyword('settings.orcaCloud.billing.keywordBilling', 'billing'), + ...translateSearchKeyword('settings.orcaCloud.billing.keywordInvoice', 'invoice'), + ...translateSearchKeyword('settings.orcaCloud.billing.keywordUsage', 'usage'), + ...translateSearchKeyword('settings.orcaCloud.billing.keywordOverage', 'overage') + ] + } +]) + +export const getOrcaCloudTeamSearchEntries = createLocalizedCatalog(() => [ + { + title: translate('auto.components.billing.team.title', 'Team'), + description: translate( + 'settings.orcaCloud.team.searchDescription', + 'Members, invites and seats for your Orca Cloud team.' + ), + keywords: [ + ...translateSearchKeyword('settings.orcaCloud.team.keywordMembers', 'members'), + ...translateSearchKeyword('settings.orcaCloud.team.keywordInvite', 'invite'), + ...translateSearchKeyword('settings.orcaCloud.team.keywordSeats', 'seats') + ] + } +]) + +export const getOrcaCloudSecretsSearchEntries = createLocalizedCatalog(() => [ + { + title: translate('cloudSecrets.title', 'Cloud secrets'), + description: translate( + 'cloudSecrets.searchDescription', + 'Environment variables and agent keys for Orca Cloud workspaces: personal, shared with your team, or per repository.' + ), + keywords: [ + ...translateSearchKeyword('cloudSecrets.keywordSecret', 'secret'), + ...translateSearchKeyword('cloudSecrets.keywordEnv', 'environment variable'), + ...translateSearchKeyword('cloudSecrets.keywordDotenv', '.env'), + ...translateSearchKeyword('cloudSecrets.keywordApiKey', 'api key'), + ...translateSearchKeyword('cloudSecrets.keywordGateway', 'ai gateway') + ] + } +]) + +export const getOrcaCloudEnvironmentsSearchEntries = createLocalizedCatalog(() => [ + { + title: translate('settings.orcaCloud.environments.title', 'Cloud environments'), + description: translate( + 'settings.orcaCloud.environments.searchDescription', + 'Repos and install script built into a snapshot, and waking cloud workspaces before you open them.' + ), + keywords: [ + ...translateSearchKeyword('settings.orcaCloud.environments.keywordSnapshot', 'snapshot'), + ...translateSearchKeyword('settings.orcaCloud.environments.keywordInstall', 'install script'), + ...translateSearchKeyword('settings.orcaCloud.environments.keywordWake', 'wake'), + ...translateSearchKeyword('settings.orcaCloud.environments.keywordSandbox', 'sandbox') + ] + } +]) + +export const getOrcaCloudMcpSearchEntries = createLocalizedCatalog(() => [ + { + title: translate('cloudMcpSync.title', 'MCP servers'), + description: translate( + 'settings.orcaCloud.mcp.searchDescription', + 'Choose which MCP servers from this computer sync to your cloud workspaces.' + ), + keywords: [ + ...translateSearchKeyword('settings.orcaCloud.mcp.keywordMcp', 'mcp'), + ...translateSearchKeyword('settings.orcaCloud.mcp.keywordSync', 'sync'), + ...translateSearchKeyword('settings.orcaCloud.mcp.keywordCloud', 'cloud') + ] + } +]) diff --git a/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx b/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx index 97c87b773bb..c84b0bcec92 100644 --- a/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx +++ b/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx @@ -2,6 +2,7 @@ import { AccountsPane } from '../accounts/AccountsPane' import { getProviderAccountsOwnerKey } from '@/runtime/provider-accounts/observations/runtime-provider-accounts-client' import { AgentsPane } from '../agents/AgentsPane' import { AgentApiKeysSection } from '../agent-api-keys/AgentApiKeysSection' +import { AgentApiKeysCloudDescription } from '../agent-api-keys/AgentApiKeysCloudDescription' import { AgentDefaultSurfaceSection } from '../agents/surfaces/AgentDefaultSurfaceSection' import { ComputerUsePane } from '../computer-use/ComputerUsePane' import { LinearAgentSkillPane } from '../skills/linear/LinearAgentSkillPane' @@ -113,15 +114,23 @@ export function renderAgentApiKeysSettingsSection( context: SettingsRenderContext, t: Translate = translate ): React.JSX.Element | null { - const { model, navigation, view } = context + const { model, navigation, view, actions } = context return model.showDesktopOnlySettings ? ( void actions.scrollToSection('cloud-secrets')} + /> + ) : ( + t( + 'auto.components.settings.agentApiKeys.description', + 'Optional. Give an agent an API key on every host, or only some, instead of signing in on each machine.' + ) + ) + } badge={t('auto.hooks.useSettingsNavigationMetadata.7c79d3b7bf', 'Optional')} searchEntries={navigation.getSectionSearchEntries('agent-api-keys')} > diff --git a/src/renderer/src/components/settings/page/settings-orca-cloud-section-renderers.tsx b/src/renderer/src/components/settings/page/settings-orca-cloud-section-renderers.tsx new file mode 100644 index 00000000000..840d6004b42 --- /dev/null +++ b/src/renderer/src/components/settings/page/settings-orca-cloud-section-renderers.tsx @@ -0,0 +1,51 @@ +import { + OrcaCloudBillingPane, + OrcaCloudEnvironmentsPane, + OrcaCloudMcpPane, + OrcaCloudSecretsPane, + OrcaCloudTeamPane +} from '../orca-cloud/OrcaCloudSettingsPanes' +import { SettingsSection } from '../section-layout/SettingsSection' +import { translate } from '@/i18n/i18n' +import type { Translate } from '@/i18n/use-translate' +import type { SettingsRenderContext } from './settings-render-context' + +const BARE_BODY = 'rounded-none border-0 bg-transparent p-0 shadow-none' + +/** Settings › Orca Cloud: the account-backed panes. Orca API keys and Routines follow them. */ +export function renderOrcaCloudSettingsSections( + context: SettingsRenderContext, + t: Translate = translate +): React.JSX.Element | null { + const { model, navigation, view } = context + if (!model.showDesktopOnlySettings || !model.orcaCloudApiAvailable) { + return null + } + // Titles and descriptions come from the nav metadata so the pane and the sidebar never disagree. + const sections = [ + { id: 'cloud-billing', pane: }, + { id: 'cloud-team', pane: }, + { id: 'cloud-secrets', pane: }, + { id: 'cloud-environments', pane: }, + { id: 'cloud-mcp', pane: } + ] + return ( + <> + {sections.map(({ id, pane }) => { + const meta = navigation.navSections.find((section) => section.id === id) + return ( + + {view.isSectionMounted(id) ? pane : null} + + ) + })} + + ) +} diff --git a/src/renderer/src/components/settings/page/settings-page-renderer.tsx b/src/renderer/src/components/settings/page/settings-page-renderer.tsx index b3301a9b50e..05b5fb4cb7f 100644 --- a/src/renderer/src/components/settings/page/settings-page-renderer.tsx +++ b/src/renderer/src/components/settings/page/settings-page-renderer.tsx @@ -63,6 +63,7 @@ import { } from './settings-advanced-section-renderers' import { renderProjectSettingsSections } from './settings-project-section-renderer' import { renderCloudApiSettingsSections } from './settings-cloud-api-section-renderers' +import { renderOrcaCloudSettingsSections } from './settings-orca-cloud-section-renderers' import { SettingsHostScopePicker, shouldShowSettingsHostScopePicker @@ -174,11 +175,12 @@ export function renderSettingsPage( {renderLinearSettingsSection(context, t)} {renderDesktopCapabilitySettingsSections(context, t)} {renderOrcaAccountSettingsSection(context, t)} - {renderCloudApiSettingsSections(context, t)} {renderSetupGuideSettingsSection(context, t)} {renderGeneralSettingsSection(context, t)} {renderIntegrationsSettingsSection(context, t)} {renderMobileSettingsSection(context, t)} + {renderOrcaCloudSettingsSections(context, t)} + {renderCloudApiSettingsSections(context, t)} {renderAutomationsSettingsSection(context, t)} {renderArtifactsSettingsSection(context, t)} {renderShareSkillsSettingsSection(context, t)} diff --git a/src/renderer/src/components/settings/page/settings-setup-workflow-section-renderers.tsx b/src/renderer/src/components/settings/page/settings-setup-workflow-section-renderers.tsx index e142e9f9201..71033af0482 100644 --- a/src/renderer/src/components/settings/page/settings-setup-workflow-section-renderers.tsx +++ b/src/renderer/src/components/settings/page/settings-setup-workflow-section-renderers.tsx @@ -22,10 +22,17 @@ export function renderOrcaAccountSettingsSection( {view.isSectionMounted('orca-account') ? : null} diff --git a/src/renderer/src/components/settings/runtime-environments/cloud-mcp/CloudMcpSyncSection.tsx b/src/renderer/src/components/settings/runtime-environments/cloud-mcp/CloudMcpSyncSection.tsx index dec1fb686bb..c1aefd8ea82 100644 --- a/src/renderer/src/components/settings/runtime-environments/cloud-mcp/CloudMcpSyncSection.tsx +++ b/src/renderer/src/components/settings/runtime-environments/cloud-mcp/CloudMcpSyncSection.tsx @@ -9,13 +9,16 @@ import { CloudMcpSyncPanel, CloudMcpSyncSkeleton } from './CloudMcpSyncPanel' /** Renders only for Orca Cloud workspaces; main answers null for every other host. */ export function CloudMcpSyncSection({ - environmentId + environmentId, + defaultExpanded = false }: { environmentId: string + /** Settings › Orca Cloud › MCP servers opens the list when there is only one workspace. */ + defaultExpanded?: boolean }): React.JSX.Element | null { const t = useTranslate() const status = useCloudMcpSyncStatus(environmentId, true) - const [expanded, setExpanded] = useState(false) + const [expanded, setExpanded] = useState(defaultExpanded) if (status === undefined) { return } diff --git a/src/renderer/src/components/settings/virtual-machines/runtimes/EphemeralVmRuntimeRow.tsx b/src/renderer/src/components/settings/virtual-machines/runtimes/EphemeralVmRuntimeRow.tsx index 9dac8d49a88..61653044e8f 100644 --- a/src/renderer/src/components/settings/virtual-machines/runtimes/EphemeralVmRuntimeRow.tsx +++ b/src/renderer/src/components/settings/virtual-machines/runtimes/EphemeralVmRuntimeRow.tsx @@ -1,11 +1,11 @@ -import { AlertTriangle, Copy, Loader2, Square, Trash2, X } from 'lucide-react' +import { AlertTriangle, ChevronRight, Copy, Loader2, Square, Trash2, X } from 'lucide-react' import type { EphemeralVmRuntimeRecord } from '../../../../../../shared/ephemeral-vm-runtimes' import { getEphemeralVmRecipeResultProjectRoot } from '../../../../../../shared/ephemeral-vm-recipes' import { useTranslate } from '@/i18n/use-translate' import { ephemeralVmCleanupErrorText } from '@/lib/ephemeral-vm-error-copy' import { cn } from '@/lib/utils' import { Button } from '../../../ui/button' -import { CloudMcpSyncSection } from '../../runtime-environments/cloud-mcp/CloudMcpSyncSection' +import { useAppStore } from '@/store' type EphemeralVmRuntimeRowProps = { runtime: EphemeralVmRuntimeRecord @@ -38,10 +38,12 @@ export function EphemeralVmRuntimeRow({ const isProvisioning = runtime.status === 'provisioning' // Write-ahead rows never got a recipe result, so destroy only knows the instance id. const isUntracked = !runtime.recipeResult && !isProvisioning - const cloudEnvironmentId = - runtime.recipe?.provider === 'orca-cloud' && runtime.status === 'running' - ? (runtime.runtimeEnvironmentId ?? null) - : null + const openSettingsTarget = useAppStore((state) => state.openSettingsTarget) + // MCP sync lives in Settings › Orca Cloud › MCP servers; a running cloud VM links there. + const showMcpLink = + runtime.recipe?.provider === 'orca-cloud' && + runtime.status === 'running' && + Boolean(runtime.runtimeEnvironmentId) return (
@@ -149,9 +151,18 @@ export function EphemeralVmRuntimeRow({ )}
- {cloudEnvironmentId ? ( -
- + {showMcpLink ? ( +
+
) : null}
diff --git a/src/renderer/src/components/ui/tabs.tsx b/src/renderer/src/components/ui/tabs.tsx index 9547930591b..89f6c247ef7 100644 --- a/src/renderer/src/components/ui/tabs.tsx +++ b/src/renderer/src/components/ui/tabs.tsx @@ -76,11 +76,17 @@ function TabsTrigger({ className, ...props }: React.ComponentProps) { return ( ) diff --git a/src/renderer/src/components/worktree-creation/VmBuildSheet.tsx b/src/renderer/src/components/worktree-creation/VmBuildSheet.tsx index 343674b9ebc..cf22fd2ed14 100644 --- a/src/renderer/src/components/worktree-creation/VmBuildSheet.tsx +++ b/src/renderer/src/components/worktree-creation/VmBuildSheet.tsx @@ -273,7 +273,7 @@ export function VmBuildSheet({ onSeePlans: () => openPlansPage('sandbox'), onOpenBilling: () => { const store = useAppStore.getState() - store.openSettingsTarget({ pane: 'orca-account', repoId: null }) + store.openSettingsTarget({ pane: 'cloud-billing', repoId: null }) store.openSettingsPage() }, onSignIn: signIn, diff --git a/src/renderer/src/hooks/settings-navigation-capability-sections.ts b/src/renderer/src/hooks/settings-navigation-capability-sections.ts index 5ea0fe51c9d..9d9ebdbab78 100644 --- a/src/renderer/src/hooks/settings-navigation-capability-sections.ts +++ b/src/renderer/src/hooks/settings-navigation-capability-sections.ts @@ -8,10 +8,6 @@ import { getIntegrationsPaneSearchEntries } from '@/components/settings/integrat import { getLinearAgentSkillPaneSearchEntries } from '@/components/settings/skills/linear/linear-agent-skill-search' import { getMobileSettingsPaneSearchEntries } from '@/components/settings/mobile/mobile-settings-search' import { getOrcaAccountSettingsSearchEntries } from '@/components/settings/accounts/orca/orca-account-settings-search' -import { - getCloudApiKeysSearchEntries, - getCloudRoutinesSearchEntries -} from '@/components/settings/cloud-api/cloud-api-search' import { OrcaLogoSettingsIcon } from '@/components/settings/page/orca-logo-settings-icon' import { getOrchestrationPaneSearchEntries } from '@/components/settings/orchestration/orchestration-search' import { getVoicePaneSearchEntries } from '@/components/settings/voice/voice-pane-search' @@ -23,19 +19,22 @@ import { Bot, CircleUserRound, KeyRound, - KeySquare, Mic, MousePointerClick, Network, SlidersHorizontal, Smartphone, - UserCog, - Workflow + UserCog } from 'lucide-react' import type { SettingsNavigationBuildOptions } from './settings-navigation-build-options' export function buildCapabilitySettingsSections( - { isLocalWindowsHost, isWebClient, isLinearConnected }: SettingsNavigationBuildOptions, + { + isLocalWindowsHost, + isWebClient, + isLinearConnected, + isOrcaCloudApiAvailable + }: SettingsNavigationBuildOptions, t: Translate = translate ): SettingsNavSection[] { const showDesktopOnlySettings = !isWebClient @@ -75,10 +74,15 @@ export function buildCapabilitySettingsSections( { id: 'agent-api-keys', title: t('auto.components.settings.agentApiKeys.title', 'Agent API Keys'), - description: t( - 'auto.components.settings.agentApiKeys.description', - 'Optional. Give an agent an API key on every host, or only some, instead of signing in on each machine.' - ), + description: isOrcaCloudApiAvailable + ? t( + 'settings.agentApiKeys.descriptionWithCloud', + 'Keys here are for this computer and your SSH and paired hosts. For Orca Cloud, use Cloud secrets.' + ) + : t( + 'auto.components.settings.agentApiKeys.description', + 'Optional. Give an agent an API key on every host, or only some, instead of signing in on each machine.' + ), icon: KeyRound, searchEntries: getAgentApiKeysSearchEntries(), group: 'capabilities' as const, @@ -155,42 +159,21 @@ export function buildSetupSettingsSections( { id: 'orca-account', title: t('auto.components.settings.orcaAccount.title', 'Orca Account'), - description: t( - 'auto.components.settings.orcaAccount.description', - 'Share work instantly and reach your desktop from Orca Mobile wherever you are.' - ), + description: isOrcaCloudApiAvailable + ? t( + 'settings.orcaAccount.descriptionWithCloud', + 'Sign-in, plan, team and Orca Cloud settings.' + ) + : t( + 'auto.components.settings.orcaAccount.description', + 'Share work instantly and reach your desktop from Orca Mobile wherever you are.' + ), icon: CircleUserRound, searchEntries: getOrcaAccountSettingsSearchEntries(), group: 'setup' } ] : []), - ...(showDesktopOnlySettings && isOrcaCloudApiAvailable - ? [ - { - id: 'cloud-api-keys', - title: t('auto.components.settings.cloudApi.sectionTitle', 'Orca API keys'), - description: t( - 'auto.components.settings.cloudApi.sectionDescription', - 'For the Orca Cloud API, the orca CLI and MCP clients. Claude or Codex keys go in Cloud secrets.' - ), - icon: KeySquare, - searchEntries: getCloudApiKeysSearchEntries(), - group: 'setup' as const - }, - { - id: 'cloud-routines', - title: t('auto.components.settings.cloudRoutines.sectionTitle', 'Routines'), - description: t( - 'auto.components.settings.cloudRoutines.sectionDescription', - 'Agents that run in Orca Cloud on a schedule, on GitHub events or from a webhook.' - ), - icon: Workflow, - searchEntries: getCloudRoutinesSearchEntries(), - group: 'setup' as const - } - ] - : []), { id: 'setup-guide', title: t('auto.hooks.useSettingsNavigationMetadata.ded9e9032f', 'Onboarding checklist'), diff --git a/src/renderer/src/hooks/settings-navigation-orca-cloud-sections.test.ts b/src/renderer/src/hooks/settings-navigation-orca-cloud-sections.test.ts new file mode 100644 index 00000000000..de57a415f0f --- /dev/null +++ b/src/renderer/src/hooks/settings-navigation-orca-cloud-sections.test.ts @@ -0,0 +1,55 @@ +import { describe, expect, it } from 'vitest' +import { buildSetupSettingsSections } from './settings-navigation-capability-sections' +import type { SettingsNavigationBuildOptions } from './settings-navigation-build-options' +import { buildOrcaCloudSettingsSections } from './settings-navigation-orca-cloud-sections' + +function options(patch: Partial): SettingsNavigationBuildOptions { + return { + isMac: true, + isWindows: false, + isLocalWindowsHost: false, + isWindowsTerminalHost: false, + isWebClient: false, + hostQueuesMessages: false, + managedBrowserCreationEnabled: true, + mobileEmulatorCreationEnabled: true, + isDev: false, + isLinearConnected: false, + isOrcaCloudApiAvailable: true, + repos: [], + ...patch + } +} + +describe('Orca Cloud settings group', () => { + it('holds every Orca Cloud pane, in order, when the build has a control plane', () => { + const sections = buildOrcaCloudSettingsSections(options({})) + expect(sections.map((section) => section.id)).toEqual([ + 'cloud-billing', + 'cloud-team', + 'cloud-secrets', + 'cloud-environments', + 'cloud-mcp', + 'cloud-api-keys', + 'cloud-routines' + ]) + expect(new Set(sections.map((section) => section.group))).toEqual(new Set(['orca-cloud'])) + }) + + it('is absent without a control plane and on the web client', () => { + expect(buildOrcaCloudSettingsSections(options({ isOrcaCloudApiAvailable: false }))).toEqual([]) + expect(buildOrcaCloudSettingsSections(options({ isWebClient: true }))).toEqual([]) + }) + + it('leaves Set Up with the account, and describes it by what it now holds', () => { + const setup = buildSetupSettingsSections(options({})) + expect(setup.some((section) => section.id.startsWith('cloud-'))).toBe(false) + expect(setup.find((section) => section.id === 'orca-account')?.description).toBe( + 'Sign-in, plan, team and Orca Cloud settings.' + ) + const local = buildSetupSettingsSections(options({ isOrcaCloudApiAvailable: false })) + expect(local.find((section) => section.id === 'orca-account')?.description).not.toMatch( + /Orca Cloud/ + ) + }) +}) diff --git a/src/renderer/src/hooks/settings-navigation-orca-cloud-sections.ts b/src/renderer/src/hooks/settings-navigation-orca-cloud-sections.ts new file mode 100644 index 00000000000..8384c60f7d1 --- /dev/null +++ b/src/renderer/src/hooks/settings-navigation-orca-cloud-sections.ts @@ -0,0 +1,106 @@ +import { + getCloudApiKeysSearchEntries, + getCloudRoutinesSearchEntries +} from '@/components/settings/cloud-api/cloud-api-search' +import { + getOrcaCloudBillingSearchEntries, + getOrcaCloudEnvironmentsSearchEntries, + getOrcaCloudMcpSearchEntries, + getOrcaCloudSecretsSearchEntries, + getOrcaCloudTeamSearchEntries +} from '@/components/settings/orca-cloud/orca-cloud-settings-search' +import { translate } from '@/i18n/i18n' +import type { Translate } from '@/i18n/use-translate' +import type { SettingsNavSection } from '@/lib/settings-navigation-types' +import { Boxes, CreditCard, KeySquare, LockKeyhole, Plug, Users, Workflow } from 'lucide-react' +import type { SettingsNavigationBuildOptions } from './settings-navigation-build-options' + +/** One home for everything Orca Cloud; only builds with a control plane show it. */ +export function buildOrcaCloudSettingsSections( + { isWebClient, isOrcaCloudApiAvailable }: SettingsNavigationBuildOptions, + t: Translate = translate +): SettingsNavSection[] { + if (isWebClient || !isOrcaCloudApiAvailable) { + return [] + } + const group = 'orca-cloud' + return [ + { + id: 'cloud-billing', + title: t('auto.components.billing.title', 'Plan & billing'), + description: t( + 'settings.orcaCloud.billing.description', + 'Your Orca Cloud plan, sandbox hours and payment.' + ), + icon: CreditCard, + searchEntries: getOrcaCloudBillingSearchEntries(), + group + }, + { + id: 'cloud-team', + title: t('auto.components.billing.team.title', 'Team'), + description: t( + 'auto.components.billing.team.createHint', + 'Share one Orca Cloud plan with your teammates.' + ), + icon: Users, + searchEntries: getOrcaCloudTeamSearchEntries(), + group + }, + { + id: 'cloud-secrets', + title: t('cloudSecrets.title', 'Cloud secrets'), + description: t( + 'cloudSecrets.description', + 'API keys you add to Orca are never written to the sandbox. Agents and terminals get them as environment variables.' + ), + icon: LockKeyhole, + searchEntries: getOrcaCloudSecretsSearchEntries(), + group + }, + { + id: 'cloud-environments', + title: t('settings.orcaCloud.environments.title', 'Cloud environments'), + description: t( + 'cloudEnvironment.descriptionTeam', + 'Your team’s repos and install script, built once into a snapshot so every cloud workspace starts with dependencies installed.' + ), + icon: Boxes, + searchEntries: getOrcaCloudEnvironmentsSearchEntries(), + group + }, + { + id: 'cloud-mcp', + title: t('cloudMcpSync.title', 'MCP servers'), + description: t( + 'settings.orcaCloud.mcp.description', + 'MCP servers from Claude Code and Codex on this computer, synced to your cloud workspaces.' + ), + icon: Plug, + searchEntries: getOrcaCloudMcpSearchEntries(), + group + }, + { + id: 'cloud-api-keys', + title: t('auto.components.settings.cloudApi.sectionTitle', 'Orca API keys'), + description: t( + 'auto.components.settings.cloudApi.sectionDescription', + 'For the Orca Cloud API, the orca CLI and MCP clients. Claude or Codex keys go in Cloud secrets.' + ), + icon: KeySquare, + searchEntries: getCloudApiKeysSearchEntries(), + group + }, + { + id: 'cloud-routines', + title: t('auto.components.settings.cloudRoutines.sectionTitle', 'Routines'), + description: t( + 'auto.components.settings.cloudRoutines.sectionDescription', + 'Agents that run in Orca Cloud on a schedule, on GitHub events or from a webhook.' + ), + icon: Workflow, + searchEntries: getCloudRoutinesSearchEntries(), + group + } + ] +} diff --git a/src/renderer/src/hooks/useSettingsNavigationMetadata.ts b/src/renderer/src/hooks/useSettingsNavigationMetadata.ts index ec8fa595cee..5f8a00fc898 100644 --- a/src/renderer/src/hooks/useSettingsNavigationMetadata.ts +++ b/src/renderer/src/hooks/useSettingsNavigationMetadata.ts @@ -31,6 +31,7 @@ import { buildSetupSettingsSections } from './settings-navigation-capability-sections' import type { SettingsNavigationBuildOptions } from './settings-navigation-build-options' +import { buildOrcaCloudSettingsSections } from './settings-navigation-orca-cloud-sections' import { buildInterfaceSettingsSections } from './settings-navigation-interface-sections' import { buildRemoteSettingsSections } from './settings-navigation-remote-sections' import { buildWorkflowSettingsSections } from './settings-navigation-workflow-sections' @@ -112,6 +113,7 @@ export function buildSettingsNavigationMetadata( return [ ...buildCapabilitySettingsSections(options, t), ...buildSetupSettingsSections(options, t), + ...buildOrcaCloudSettingsSections(options, t), ...buildWorkflowSettingsSections(options, terminalPaneSearchEntries, t), ...buildInterfaceSettingsSections(options, t), ...buildRemoteSettingsSections(options, runtimeEnvironmentsSearchEntry, reposById, t) diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 63c87011e57..18f7665705b 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -1342,6 +1342,57 @@ "settings": "Settings", "label": "Settings breadcrumb", "close": "Close settings" + }, + "orcaCloud": { + "mcp": { + "emptyTitle": "No cloud workspace is running", + "emptyBody": "MCP servers sync to a cloud workspace while it runs. Start or wake one to choose which servers it gets.", + "workspaceLabel": "MCP servers in {{name}}", + "searchDescription": "Choose which MCP servers from this computer sync to your cloud workspaces.", + "keywordMcp": "mcp", + "keywordSync": "sync", + "keywordCloud": "cloud", + "description": "MCP servers from Claude Code and Codex on this computer, synced to your cloud workspaces." + }, + "environments": { + "title": "Cloud environments", + "unavailable": "Cloud environments aren’t available for this account yet.", + "searchDescription": "Repos and install script built into a snapshot, and waking cloud workspaces before you open them.", + "keywordSnapshot": "snapshot", + "keywordInstall": "install script", + "keywordWake": "wake", + "keywordSandbox": "sandbox" + }, + "signedOut": { + "reconnectTitle": "Sign in again", + "body": "Orca Cloud settings belong to your Orca account. Sign in to manage them." + }, + "team": { + "unavailable": "Teams aren’t available for this account yet.", + "searchDescription": "Members, invites and seats for your Orca Cloud team.", + "keywordMembers": "members", + "keywordInvite": "invite", + "keywordSeats": "seats" + }, + "billing": { + "searchDescription": "Your Orca Cloud plan, sandbox hours, overage and payment.", + "keywordPlan": "plan", + "keywordBilling": "billing", + "keywordInvoice": "invoice", + "keywordUsage": "usage", + "keywordOverage": "overage", + "description": "Your Orca Cloud plan, sandbox hours and payment." + } + }, + "groups": { + "orcaCloud": "Orca Cloud" + }, + "agentApiKeys": { + "descriptionWithCloudLink": "Keys here are for this computer and your SSH and paired hosts. For Orca Cloud, use Cloud secrets.", + "descriptionWithCloud": "Keys here are for this computer and your SSH and paired hosts. For Orca Cloud, use Cloud secrets." + }, + "orcaAccount": { + "descriptionWithCloud": "Sign-in, plan, team and Orca Cloud settings." } }, "menu": { @@ -20719,7 +20770,9 @@ "seatsAnnual_other": "{{count}} seats · Annual", "seatsMonthly_one": "{{count}} seat · Monthly", "seatsMonthly_other": "{{count}} seats · Monthly", - "upsellLine2": "Orca Cloud runs agents in sandboxes. Team is {{value0}} per seat per month." + "upsellLine2": "Orca Cloud runs agents in sandboxes. Team is {{value0}} per seat per month.", + "loading": "Loading your plan…", + "unconfigured": "Billing isn’t available in this build of Orca." }, "ports": { "RuntimePortAutoForwarder": { @@ -26680,7 +26733,9 @@ "discardQuestion": "Discard the key you typed?", "discard": "Discard", "keepEditing": "Keep editing", - "signInHandedOff": "Continues in the Agent sign-in row below." + "signInHandedOff": "Continues in the Agent sign-in row below.", + "gatewayModelDefaultHint": "Leave empty to use the gateway’s default model.", + "skippedDetailCloudGroup": "Set it up any time from Settings › Orca Cloud › Cloud secrets." }, "cloudSecrets": { "editor": { @@ -26795,7 +26850,9 @@ "lineName": "line {{line}}", "skippedLine": "Line {{line}} · skipped", "renamed": "Renamed from {{name}}", - "normalized": "Spaces and dashes become underscores" + "normalized": "Spaces and dashes become underscores", + "valueLabel": "Value for {{name}}", + "valueLabelLine": "Value, line {{line}}" }, "value": { "hide": "Hide value", @@ -26828,7 +26885,9 @@ "unterminatedQuote": "The closing quote is missing.", "overridden": "Set again further down; the later line is used.", "unknown": "Something went wrong in Orca Cloud. Nothing was changed. Try again." - } + }, + "loading": "Loading cloud secrets…", + "unavailable": "Cloud secrets aren’t available for this account yet." }, "cloudMcpSync": { "appliesEverywhere": "Applies to every cloud workspace", diff --git a/src/renderer/src/lib/settings-navigation-types.ts b/src/renderer/src/lib/settings-navigation-types.ts index 7f14e520989..fe2c5ee41a5 100644 --- a/src/renderer/src/lib/settings-navigation-types.ts +++ b/src/renderer/src/lib/settings-navigation-types.ts @@ -46,6 +46,11 @@ const SETTINGS_NAV_TARGETS = [ 'share-skills', 'automations', 'orca-account', + 'cloud-billing', + 'cloud-team', + 'cloud-secrets', + 'cloud-environments', + 'cloud-mcp', 'cloud-api-keys', 'cloud-routines', 'linear', From 694bad2810c7db2cbe707bb53275ba89f549ed96 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 10 Nov 2026 03:09:26 -0800 Subject: [PATCH 2/4] fix(settings): review follow-ups for the Orca Cloud group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - MCP servers pane: error state with retry (mcpLoadFailed fixture), generic name instead of the recipe id, single card padding. - Settings paths use → per the glossary; soft unavailable states use InlineError neutral; env pane no longer re-probes availability. - Rounded tab-panel focus outline; drop three unused en.json keys. --- .../VmBuildCloudAgentStep.tsx | 2 +- .../CloudEnvironmentSection.tsx | 14 +--- .../cloud-secrets/CloudSecretsSection.tsx | 11 ++- .../orca-cloud/OrcaCloudMcpServersPane.tsx | 70 +++++++++++++------ .../orca-cloud/OrcaCloudSettings.fixture.tsx | 4 +- .../orca-cloud/OrcaCloudSettingsPanes.tsx | 15 ++-- .../orca-cloud/orca-cloud-settings-search.ts | 2 +- .../runtimes/EphemeralVmRuntimeRow.tsx | 3 + src/renderer/src/components/ui/tabs.tsx | 2 +- src/renderer/src/i18n/locales/en.json | 12 ++-- 10 files changed, 83 insertions(+), 52 deletions(-) diff --git a/src/renderer/src/components/cloud-agent-setup/VmBuildCloudAgentStep.tsx b/src/renderer/src/components/cloud-agent-setup/VmBuildCloudAgentStep.tsx index d9a43ac38b8..40232442391 100644 --- a/src/renderer/src/components/cloud-agent-setup/VmBuildCloudAgentStep.tsx +++ b/src/renderer/src/components/cloud-agent-setup/VmBuildCloudAgentStep.tsx @@ -141,7 +141,7 @@ export function VmBuildCloudAgentStepView({ title={t('cloudAgentSetup.skippedTitle', 'Agent setup skipped')} detail={t( 'cloudAgentSetup.skippedDetailCloudGroup', - 'Set it up any time from Settings › Orca Cloud › Cloud secrets.' + 'Set it up any time from Settings → Orca Cloud → Cloud secrets.' )} /> ) diff --git a/src/renderer/src/components/cloud-environment/CloudEnvironmentSection.tsx b/src/renderer/src/components/cloud-environment/CloudEnvironmentSection.tsx index 9b50d9bdc10..47dedb341ac 100644 --- a/src/renderer/src/components/cloud-environment/CloudEnvironmentSection.tsx +++ b/src/renderer/src/components/cloud-environment/CloudEnvironmentSection.tsx @@ -29,11 +29,6 @@ import { useCloudEnvironment } from './use-cloud-environment' const LOG_TAIL_LINES = 80 -/** Hidden unless this build talks to an Orca Cloud control plane. */ -export function useOrcaCloudEnvironmentsConfigured(): boolean { - return useOrcaCloudEnvironmentsAvailability() === true -} - /** Null until main answers, so a pane can show a placeholder instead of flashing "unavailable". */ export function useOrcaCloudEnvironmentsAvailability(): boolean | null { const [configured, setConfigured] = useState(null) @@ -77,18 +72,15 @@ function useLocalRepoSuggestions(): { }, [repos]) } -/** Settings block: Orca Cloud environment (repos + install script → snapshot builds). */ +/** Settings block: Orca Cloud environment (repos + install script → snapshot builds). + * The caller checks useOrcaCloudEnvironmentsAvailability first, so this never re-probes. */ export function CloudEnvironmentSection({ orgId, viewerUserId }: { orgId: string | null viewerUserId: string | null -}): React.JSX.Element | null { - const configured = useOrcaCloudEnvironmentsConfigured() - if (!configured) { - return null - } +}): React.JSX.Element { // Settings › Orca Cloud › Cloud environments owns the title and description. return ( - {t('cloudSecrets.unavailable', 'Cloud secrets aren’t available for this account yet.')} -

+ ) } const common = { diff --git a/src/renderer/src/components/settings/orca-cloud/OrcaCloudMcpServersPane.tsx b/src/renderer/src/components/settings/orca-cloud/OrcaCloudMcpServersPane.tsx index 5e5a039e746..466c0ef67ee 100644 --- a/src/renderer/src/components/settings/orca-cloud/OrcaCloudMcpServersPane.tsx +++ b/src/renderer/src/components/settings/orca-cloud/OrcaCloudMcpServersPane.tsx @@ -1,5 +1,6 @@ -import { useEffect, useState } from 'react' +import { useCallback, useEffect, useState } from 'react' import { Plug } from 'lucide-react' +import { InlineError } from '@/components/ui/inline-error' import { Skeleton } from '@/components/ui/skeleton' import { useTranslate } from '@/i18n/use-translate' import { useAppStore } from '@/store' @@ -8,7 +9,12 @@ import { CloudApiEmptyState } from '../cloud-api/cloud-api-parts' import { CloudMcpSyncSection } from '../runtime-environments/cloud-mcp/CloudMcpSyncSection' import { SettingsGroup } from '../section-layout/SettingsGroup' -export type OrcaCloudMcpWorkspace = { runtimeId: string; name: string; environmentId: string } +/** `name` is null when the workspace record has none; the view shows a generic label. */ +export type OrcaCloudMcpWorkspace = { + runtimeId: string + name: string | null + environmentId: string +} /** Running Orca Cloud workspaces, newest first: MCP sync only reaches a sandbox that is awake. */ export function runningOrcaCloudMcpWorkspaces( @@ -24,20 +30,31 @@ export function runningOrcaCloudMcpWorkspaces( .sort((a, b) => b.createdAt - a.createdAt || a.id.localeCompare(b.id)) .map((record) => ({ runtimeId: record.id, - name: record.workspaceName || record.recipeId, + name: record.workspaceName || null, environmentId: record.runtimeEnvironmentId as string })) } export function OrcaCloudMcpServersView({ workspaces, - renderSync + renderSync, + onRetry }: { - /** Null while the runtime list loads. */ - workspaces: OrcaCloudMcpWorkspace[] | null + /** Null while the runtime list loads; 'failed' when main could not list them. */ + workspaces: OrcaCloudMcpWorkspace[] | null | 'failed' renderSync: (workspace: OrcaCloudMcpWorkspace, onlyOne: boolean) => React.ReactNode + onRetry: () => void }): React.JSX.Element { const t = useTranslate() + if (workspaces === 'failed') { + return ( + + ) + } if (workspaces === null) { return (
@@ -62,25 +79,29 @@ export function OrcaCloudMcpServersView({ } return (
- {workspaces.map((workspace) => ( - -
-

{workspace.name}

- {renderSync(workspace, workspaces.length === 1)} -
-
- ))} + {workspaces.map((workspace) => { + const name = workspace.name ?? t('settings.orcaCloud.mcp.unnamed', 'Cloud workspace') + return ( + +
+

{name}

+ {renderSync(workspace, workspaces.length === 1)} +
+
+ ) + })}
) } export function OrcaCloudMcpServersPane(): React.JSX.Element { - const [workspaces, setWorkspaces] = useState(null) + const [workspaces, setWorkspaces] = useState(null) + const [attempt, setAttempt] = useState(0) // The store mirrors every lifecycle broadcast, so a change there means the list moved. const lifecycle = useAppStore((s) => s.ephemeralVmRuntimesByWorkspaceId) useEffect(() => { @@ -92,14 +113,19 @@ export function OrcaCloudMcpServersPane(): React.JSX.Element { let disposed = false void listRuntimes() .then((records) => !disposed && setWorkspaces(runningOrcaCloudMcpWorkspaces(records))) - .catch(() => !disposed && setWorkspaces([])) + .catch(() => !disposed && setWorkspaces('failed')) return () => { disposed = true } - }, [lifecycle]) + }, [lifecycle, attempt]) + const retry = useCallback(() => { + setWorkspaces(null) + setAttempt((value) => value + 1) + }, []) return ( ( )} diff --git a/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettings.fixture.tsx b/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettings.fixture.tsx index 03661d64b32..d5156286fa9 100644 --- a/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettings.fixture.tsx +++ b/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettings.fixture.tsx @@ -95,7 +95,7 @@ const TWO: OrcaCloudMcpWorkspace[] = [ { runtimeId: 'rt-2', name: 'acme/api · billing-webhooks', environmentId: 'env-2' } ] -function mcpPage(workspaces: OrcaCloudMcpWorkspace[] | null): React.JSX.Element { +function mcpPage(workspaces: OrcaCloudMcpWorkspace[] | null | 'failed'): React.JSX.Element { return ( ( mcpPage export const mcpTwoWorkspaces = defineFixture({ width: 784, render: () => mcpPage(TWO) }) export const mcpNoneRunning = defineFixture({ width: 784, render: () => mcpPage([]) }) export const mcpLoading = defineFixture({ width: 784, render: () => mcpPage(null) }) +export const mcpLoadFailed = defineFixture({ width: 784, render: () => mcpPage('failed') }) export const secretsPage = defineFixture({ width: 784, diff --git a/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsPanes.tsx b/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsPanes.tsx index a7812380da4..43e49ef8886 100644 --- a/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsPanes.tsx +++ b/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsPanes.tsx @@ -1,4 +1,5 @@ import { CircleUserRound } from 'lucide-react' +import { InlineError } from '@/components/ui/inline-error' import { Skeleton } from '@/components/ui/skeleton' import { useOrcaProfileAuthStatusRefresh } from '@/hooks/use-orca-profile-auth-status-refresh' import { useTranslate } from '@/i18n/use-translate' @@ -110,12 +111,13 @@ export function OrcaCloudTeamPane(): React.JSX.Element { account.billing ? ( ) : ( -

- {t( + + /> ) } @@ -142,12 +144,13 @@ export function OrcaCloudEnvironmentsPane(): React.JSX.Element { ) : configured ? ( ) : ( -

- {t( + + /> )} {account.sandbox ? : null}

diff --git a/src/renderer/src/components/settings/orca-cloud/orca-cloud-settings-search.ts b/src/renderer/src/components/settings/orca-cloud/orca-cloud-settings-search.ts index 04c8fec7f73..41619f41ea1 100644 --- a/src/renderer/src/components/settings/orca-cloud/orca-cloud-settings-search.ts +++ b/src/renderer/src/components/settings/orca-cloud/orca-cloud-settings-search.ts @@ -56,7 +56,7 @@ export const getOrcaCloudEnvironmentsSearchEntries = createLocalizedCatalog(() = title: translate('settings.orcaCloud.environments.title', 'Cloud environments'), description: translate( 'settings.orcaCloud.environments.searchDescription', - 'Repos and install script built into a snapshot, and waking cloud workspaces before you open them.' + 'Repositories and install script built into a snapshot, and waking cloud workspaces before you open them.' ), keywords: [ ...translateSearchKeyword('settings.orcaCloud.environments.keywordSnapshot', 'snapshot'), diff --git a/src/renderer/src/components/settings/virtual-machines/runtimes/EphemeralVmRuntimeRow.tsx b/src/renderer/src/components/settings/virtual-machines/runtimes/EphemeralVmRuntimeRow.tsx index 61653044e8f..44d5a0b6879 100644 --- a/src/renderer/src/components/settings/virtual-machines/runtimes/EphemeralVmRuntimeRow.tsx +++ b/src/renderer/src/components/settings/virtual-machines/runtimes/EphemeralVmRuntimeRow.tsx @@ -159,6 +159,9 @@ export function EphemeralVmRuntimeRow({ size="xs" className="gap-1 text-muted-foreground hover:text-foreground" onClick={() => openSettingsTarget({ pane: 'cloud-mcp', repoId: null })} + aria-label={t('settings.orcaCloud.mcp.openFor', 'MCP servers for {{name}}', { + name: runtime.workspaceName || runtime.recipeId + })} > {t('cloudMcpSync.title', 'MCP servers')} diff --git a/src/renderer/src/components/ui/tabs.tsx b/src/renderer/src/components/ui/tabs.tsx index 89f6c247ef7..08f0d83e1ca 100644 --- a/src/renderer/src/components/ui/tabs.tsx +++ b/src/renderer/src/components/ui/tabs.tsx @@ -84,7 +84,7 @@ function TabsContent({ className, ...props }: React.ComponentProps Date: Tue, 10 Nov 2026 06:03:47 -0800 Subject: [PATCH 3/4] fix(settings): design-squad copy for Agent API keys, tab focus offset, lint - Agent API keys: sentence-case title and the squad's body copy, keeping the Cloud secrets link; stale keys removed. - TabsContent focus outline sits outside the panel (offset 2, like Button). - No type assertion in the MCP workspace projection; runtime-row link uses the quiet variant and a generic name fallback. --- .../AgentApiKeysCloudDescription.test.tsx | 2 +- .../AgentApiKeysCloudDescription.tsx | 4 ++-- .../agent-api-keys/agent-api-keys-search.ts | 2 +- .../orca-cloud/OrcaCloudMcpServersPane.tsx | 23 ++++++++++--------- .../orca-cloud/OrcaCloudSettings.fixture.tsx | 2 +- .../settings-capability-section-renderers.tsx | 2 +- .../runtimes/EphemeralVmRuntimeRow.tsx | 5 ++-- src/renderer/src/components/ui/tabs.tsx | 4 ++-- ...settings-navigation-capability-sections.ts | 6 ++--- src/renderer/src/i18n/locales/en.json | 8 +++---- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.test.tsx b/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.test.tsx index 06e6d15681b..5a62c1da6e0 100644 --- a/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.test.tsx +++ b/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.test.tsx @@ -10,7 +10,7 @@ describe('AgentApiKeysCloudDescription', () => { const open = vi.fn() const { container } = render() expect(container.textContent).toBe( - 'Keys here are for this computer and your SSH and paired hosts. For Orca Cloud, use Cloud secrets.' + 'Keys here work on this computer and your SSH and paired hosts. To use a key in cloud workspaces, save it to your Orca account in Cloud secrets.' ) fireEvent.click(screen.getByRole('button', { name: 'Cloud secrets' })) expect(open).toHaveBeenCalledTimes(1) diff --git a/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.tsx b/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.tsx index 889fbbd0ea6..11bacdf463d 100644 --- a/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.tsx +++ b/src/renderer/src/components/settings/agent-api-keys/AgentApiKeysCloudDescription.tsx @@ -13,8 +13,8 @@ export function AgentApiKeysCloudDescription({ Cloud secrets.' + 'settings.agentApiKeys.descriptionCloudSecretsLink', + 'Keys here work on this computer and your SSH and paired hosts. To use a key in cloud workspaces, save it to your Orca account in Cloud secrets.' )} components={{ // Not : the Trans parser treats HTML void tag names as self-closing. diff --git a/src/renderer/src/components/settings/agent-api-keys/agent-api-keys-search.ts b/src/renderer/src/components/settings/agent-api-keys/agent-api-keys-search.ts index 2e718a244cb..67b411a81bf 100644 --- a/src/renderer/src/components/settings/agent-api-keys/agent-api-keys-search.ts +++ b/src/renderer/src/components/settings/agent-api-keys/agent-api-keys-search.ts @@ -4,7 +4,7 @@ import { translateSearchKeyword } from '../search/settings-search-keywords' export const getAgentApiKeysSearchEntries = createLocalizedCatalog(() => [ { - title: translate('auto.components.settings.agentApiKeys.search.title', 'Agent API Keys'), + title: translate('settings.agentApiKeys.searchTitle', 'Agent API keys'), description: translate( 'auto.components.settings.agentApiKeys.search.description', 'Give agents an API key on every host or only some, without signing in on each machine.' diff --git a/src/renderer/src/components/settings/orca-cloud/OrcaCloudMcpServersPane.tsx b/src/renderer/src/components/settings/orca-cloud/OrcaCloudMcpServersPane.tsx index 466c0ef67ee..12fb24df178 100644 --- a/src/renderer/src/components/settings/orca-cloud/OrcaCloudMcpServersPane.tsx +++ b/src/renderer/src/components/settings/orca-cloud/OrcaCloudMcpServersPane.tsx @@ -21,18 +21,19 @@ export function runningOrcaCloudMcpWorkspaces( records: readonly EphemeralVmRuntimeRecord[] ): OrcaCloudMcpWorkspace[] { return records - .filter( - (record) => - record.recipe?.provider === 'orca-cloud' && - record.status === 'running' && - Boolean(record.runtimeEnvironmentId) - ) + .filter((record) => record.recipe?.provider === 'orca-cloud' && record.status === 'running') .sort((a, b) => b.createdAt - a.createdAt || a.id.localeCompare(b.id)) - .map((record) => ({ - runtimeId: record.id, - name: record.workspaceName || null, - environmentId: record.runtimeEnvironmentId as string - })) + .flatMap((record) => + record.runtimeEnvironmentId + ? [ + { + runtimeId: record.id, + name: record.workspaceName || null, + environmentId: record.runtimeEnvironmentId + } + ] + : [] + ) } export function OrcaCloudMcpServersView({ diff --git a/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettings.fixture.tsx b/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettings.fixture.tsx index d5156286fa9..98e7427cb07 100644 --- a/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettings.fixture.tsx +++ b/src/renderer/src/components/settings/orca-cloud/OrcaCloudSettings.fixture.tsx @@ -213,7 +213,7 @@ export const agentApiKeysHeader = defineFixture({ render: () => ( } /> ) diff --git a/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx b/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx index c84b0bcec92..708791c1cc5 100644 --- a/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx +++ b/src/renderer/src/components/settings/page/settings-capability-section-renderers.tsx @@ -118,7 +118,7 @@ export function renderAgentApiKeysSettingsSection( return model.showDesktopOnlySettings ? (