Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/renderer/src/components/settings/AccountsPane.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ describe('AccountsPane', () => {
expect(markup).toContain(
'Showing accounts managed by the remote server. Add or re-authenticate accounts on that server.'
)
// Both the Claude and Codex sections must say local accounts are intact and
// link the default-runtime control, so the scoped list never reads as loss.
expect(markup.split('Accounts managed on this desktop are unchanged').length - 1).toBe(2)
expect(markup.split('Open Remote Servers').length - 1).toBe(2)
// The WSL account-location toggle is a local concern; a remote owner hides it.
expect(markup).not.toContain('aria-label="Account location"')
const addAccountIndex = markup.indexOf('Add Account')
Expand All @@ -99,6 +103,7 @@ describe('AccountsPane', () => {
const markup = renderPane(getDefaultSettings('/tmp'))

expect(markup).toContain('Showing accounts for this device. New accounts are added there.')
expect(markup).not.toContain('Open Remote Servers')
const addAccountIndex = markup.indexOf('Add Account')
expect(addAccountIndex).toBeGreaterThan(0)
expect(
Expand Down
25 changes: 25 additions & 0 deletions src/renderer/src/components/settings/AccountsPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
getAccountsPaneSearchEntries
} from './accounts-search'
import { GrokAccountsSection } from './GrokAccountsSection'
import { ProviderHostScopeControl } from './ProviderHostScopeControl'
import { SearchableSetting } from './SearchableSetting'
import { SettingsRow, SettingsSegmentedControl } from './SettingsFormControls'
import { matchesSettingsSearch } from './settings-search'
Expand Down Expand Up @@ -339,6 +340,28 @@ export function AccountsPane({
localAccountRuntime.runtime === 'host' && !navigator.userAgent.includes('Windows')
? `${localAccountRuntime.label.charAt(0).toLocaleLowerCase()}${localAccountRuntime.label.slice(1)}`
: localAccountRuntime.label
// Why: users read the remote-scoped list as their desktop accounts being
// deleted (#8186); say they are intact and link the default-runtime control.
const remoteAccountScopeNotice = isRemoteAccountScope ? (
<ProviderHostScopeControl
labelPrefix={translate(
'auto.components.settings.AccountsPane.accountScopePrefix',
'Account scope'
)}
scope={{
label: translate(
'auto.components.settings.providerAccountScope.remoteServer',
'Remote server: {{value0}}',
{ value0: remoteServerLabel ?? '' }
),
description: translate(
'auto.components.settings.AccountsPane.remoteScopeLocalAccountsKept',
'Accounts managed on this desktop are unchanged. Switch the default runtime back to Local desktop to view them.'
)
}}
className="text-xs"
/>
) : null

const [codexAccounts, setCodexAccounts] =
useState<CodexRateLimitAccountsState>(emptyCodexAccountsState)
Expand Down Expand Up @@ -819,6 +842,7 @@ export function AccountsPane({
) : null}
</div>
</div>
{remoteAccountScopeNotice}

<div className="space-y-2">
<button
Expand Down Expand Up @@ -1111,6 +1135,7 @@ export function AccountsPane({
{translate('auto.components.settings.AccountsPane.b0e948a4f9', 'Add Account')}
</Button>
</div>
{remoteAccountScopeNotice}

<div className="space-y-2">
<button
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4860,6 +4860,8 @@
"remoteServerFallback": "the remote server",
"loadAccountsFailed": "Could not load provider accounts.",
"remoteScopeAccounts": "Showing accounts managed by {{value0}}. Add or re-authenticate accounts on that server.",
"accountScopePrefix": "Account scope",
"remoteScopeLocalAccountsKept": "Accounts managed on this desktop are unchanged. Switch the default runtime back to Local desktop to view them.",
"remoteScopeAuthContext": "Each account keeps its own sign-in context on {{value0}}.",
"remoteEmptyClaudeAccounts": "No managed Claude accounts on {{value0}}. It uses its system default Claude login; add accounts on that server.",
"remoteEmptyCodexAccounts": "No managed Codex accounts on {{value0}}. It uses its system default Codex login; add accounts on that server."
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -4860,6 +4860,8 @@
"remoteServerFallback": "el servidor remoto",
"loadAccountsFailed": "No se pudieron cargar las cuentas de proveedor.",
"remoteScopeAccounts": "Mostrando las cuentas administradas por {{value0}}. Agrega o vuelve a autenticar cuentas en ese servidor.",
"accountScopePrefix": "Alcance de la cuenta",
"remoteScopeLocalAccountsKept": "Las cuentas administradas en este escritorio no cambian. Vuelve a cambiar el runtime predeterminado a Escritorio local para verlas.",
"remoteScopeAuthContext": "Cada cuenta mantiene su propio contexto de inicio de sesión en {{value0}}.",
"remoteEmptyClaudeAccounts": "No hay cuentas de Claude administradas en {{value0}}. Usa su inicio de sesión de Claude predeterminado del sistema; agrega cuentas en ese servidor.",
"remoteEmptyCodexAccounts": "No hay cuentas de Codex administradas en {{value0}}. Usa su inicio de sesión de Codex predeterminado del sistema; agrega cuentas en ese servidor."
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -4845,6 +4845,8 @@
"remoteServerFallback": "リモートサーバー",
"loadAccountsFailed": "プロバイダーアカウントを読み込めませんでした。",
"remoteScopeAccounts": "{{value0}} が管理するアカウントを表示しています。アカウントの追加や再認証はそのサーバー上で行ってください。",
"accountScopePrefix": "アカウントのスコープ",
"remoteScopeLocalAccountsKept": "このデスクトップで管理されているアカウントはそのまま残っています。デフォルトランタイムをローカルデスクトップに戻すと表示されます。",
"remoteScopeAuthContext": "各アカウントは {{value0}} 上に独自のサインインコンテキストを保持します。",
"remoteEmptyClaudeAccounts": "{{value0}} に管理対象の Claude アカウントはありません。システム既定の Claude ログインを使用します。アカウントの追加はそのサーバー上で行ってください。",
"remoteEmptyCodexAccounts": "{{value0}} に管理対象の Codex アカウントはありません。システム既定の Codex ログインを使用します。アカウントの追加はそのサーバー上で行ってください。"
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/i18n/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -4845,6 +4845,8 @@
"remoteServerFallback": "원격 서버",
"loadAccountsFailed": "프로바이더 계정을 불러오지 못했습니다.",
"remoteScopeAccounts": "{{value0}}에서 관리하는 계정을 표시하고 있습니다. 계정 추가나 재인증은 해당 서버에서 진행하세요.",
"accountScopePrefix": "계정 범위",
"remoteScopeLocalAccountsKept": "이 데스크탑에서 관리되는 계정은 그대로 유지됩니다. 기본 런타임을 로컬 데스크탑으로 다시 전환하면 확인할 수 있습니다.",
"remoteScopeAuthContext": "각 계정은 {{value0}}에 자체 로그인 컨텍스트를 유지합니다.",
"remoteEmptyClaudeAccounts": "{{value0}}에 관리되는 Claude 계정이 없습니다. 해당 서버의 시스템 기본 Claude 로그인을 사용하며, 계정 추가는 그 서버에서 진행하세요.",
"remoteEmptyCodexAccounts": "{{value0}}에 관리되는 Codex 계정이 없습니다. 해당 서버의 시스템 기본 Codex 로그인을 사용하며, 계정 추가는 그 서버에서 진행하세요."
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -4845,6 +4845,8 @@
"remoteServerFallback": "远程服务器",
"loadAccountsFailed": "无法加载提供商账户。",
"remoteScopeAccounts": "正在显示由 {{value0}} 管理的账户。请在该服务器上添加或重新验证账户。",
"accountScopePrefix": "账户范围",
"remoteScopeLocalAccountsKept": "此桌面端管理的账户并未改变。将默认运行时切换回本地桌面即可查看。",
"remoteScopeAuthContext": "每个账户在 {{value0}} 上保留自己的登录上下文。",
"remoteEmptyClaudeAccounts": "{{value0}} 上没有受管理的 Claude 账户。它使用其系统默认的 Claude 登录;请在该服务器上添加账户。",
"remoteEmptyCodexAccounts": "{{value0}} 上没有受管理的 Codex 账户。它使用其系统默认的 Codex 登录;请在该服务器上添加账户。"
Expand Down
Loading