Repository navigation
Route provider account surfaces through the active Remote Orca Server - #7999
Conversation
Pre-existing on main; blocks pnpm lint for every branch. Same one-line resolution as the hunk bundled in community PR #7976. Co-authored-by: Orca <[email protected]>
With a Remote Orca Server selected as the active runtime, Settings > Accounts and the Claude/Codex status-bar switchers read and mutated the desktop-local account services: the pane listed this device's accounts, selection reported success while remote terminals kept the server-owned account, and Add/Re-authenticate silently authenticated on the desktop. Add runtime-provider-accounts-client, which scopes list/select/remove to getActiveRuntimeTarget(): local surfaces keep the existing window.api IPC, while a remote owner routes through the server's accounts.* RPC (mobile's contract: params are just accountId, result is the accounts snapshot). Listing uses a live accounts.subscribe watch instead of accounts.list because the latter blocks behind provider usage refreshes and can hang for minutes behind broken auth; the ready message carries the snapshot synchronously and later broadcasts stream usage refreshes into the open pane. The pane and switchers label the scope with the paired server's name, disable interactive add/re-auth (they spawn local login PTYs), hide the host/WSL account-location toggle, and let the remote snapshot win over accounts reconstructed from local GlobalSettings in the status bar. Local and WSL behavior is unchanged when no remote runtime is active. Fixes #7973 Co-authored-by: Orca <[email protected]>
Depending on the settings object identity re-ran the remote snapshot round trip on every unrelated settings mutation. Co-authored-by: Orca <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds remote-runtime ownership handling for Claude and Codex accounts. Provider account snapshots can be watched or fetched locally or through runtime subscriptions, while selection and removal route through local IPC or remote RPC. Settings and status-bar account controls now display remote ownership, suppress local-only authentication actions, and use remote account state. Tests and localization strings cover the new behavior, and notification authorization parsing adds an explicit undefined case. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a789bd49-c6bf-44bd-8456-a725df2133c2
📒 Files selected for processing (12)
src/main/ipc/notification-authorization-status.tssrc/renderer/src/components/settings/AccountsPane.test.tsxsrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/status-bar-runtime-groups.test.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/runtime/runtime-provider-accounts-client.test.tssrc/renderer/src/runtime/runtime-provider-accounts-client.ts
…scope The per-row getCodexAccountAuthWarning still read the desktop's own rate-limit poll, so a server-owned account could show 'Needs re-auth' based on local auth state; and the empty-state copy told users to add an account 'here' while the Add button is disabled under a remote owner. Co-authored-by: Orca <[email protected]>
|
Addressed both CodeRabbit findings in 8316d94: the per-account Codex "Needs re-auth" badge is now gated by the same remote-scope check as the section-level warning, and the empty-state copy has a remote variant that points at the server instead of the disabled local Add button (translated in all five locales). |
Keep Grok accounts section imports with remote provider account client helpers from stablyai#7999, and preserve both status-bar usage + remoteServer locale keys.
Summary
With a Remote Orca Server selected as the active runtime, Settings > Accounts and the Claude/Codex status-bar switchers still read and mutated the desktop-local account services: the pane listed this device's accounts under a remote-runtime session, selecting an account reported success while remote terminals kept the server-owned account, and Add/Re-authenticate silently authenticated on the desktop.
This routes provider account list / select / remove through the active runtime:
runtime-provider-accounts-client.tsfollows the existingruntime-*-clientseam (getActiveRuntimeTarget+callRuntimeRpc) and mobile'saccounts.*contract ({ accountId }params, accounts-snapshot results).accounts.subscribewatch, notaccounts.list: the server'saccounts.listblocks onrefreshAccountsForMobile(), which we observed hanging >15s behind broken provider auth during live validation. The subscribereadymessage carries the snapshot synchronously and later broadcasts stream usage refreshes into the open pane. The mobile-facingaccounts.listsemantics are intentionally untouched.claude login/codex loginPTYs that would authenticate this device), hide the host/WSL account-location toggle, and skip local-only refreshes (fetchSettings, inactive-usage caches, Codex reset credits, sign-in affordances) in remote scope.GlobalSettingsin the status bar (resolveCodex/ClaudeStatusAccountState).The first commit is a pre-existing one-line
switch-exhaustivenesslint failure on main (notification-authorization-status.ts) that blockspnpm lintfor every branch; drop it if a dedicated fix lands first.Relationship to #7976
Community PR #7976 (@SiteupAgencia) identified the same root cause and the right RPC seam — credit to them for the direction, including the blocked-
accounts.listobservation. This PR reimplements the account slice narrowly because #7976 bundles several unrelated changes (agent-activity reordering inorca-runtime.ts, worktree-card compact-summary UX reversal, native-chat suppression,hermes.png) and its account slice has defects detailed in the review comment on that PR (one-shot subscribe that never live-updates, a mobile-facingaccounts.listsemantics change, remote rate-limits injected into the local push-fed store slot causing flicker, account reloads keyed onsettingsobject identity).Reproduction & live validation (adapted /brennan-test-ssh harness)
Two disposable dev instances of this worktree: a headless
--serveserver and a desktop client, each seeded with divergent fake managed accounts (server-codex-1/2,server-claude-1vsdesktop-codex-1/2,desktop-claude-1), paired viaruntimeEnvironments.addFromPairingCodewith theorca://pairURL from--serve-json, server set as Active Server.Before (main): pane said "Showing accounts for this device", listed only
desktop-*accounts, Add Account enabled; clickingdesktop-codex-2flipped the local service todesktop-codex-2and showed "Active" while the server stayed onserver-codex-1; the status-bar switcher showed the local account.After (this branch, same harness):
server-claude-1,server-codex-1/2with "Repro Server" badges, Add Account/Re-authenticate disabled, no Account-location section.server-codex-2in the pane → server snapshot now reportsactiveAccountId: server-codex-2; local service state and settings untouched.server-codex-1changed the server's selection; local untouched.Validation
pnpm typecheck,pnpm lint(incl. localization catalog/parity, max-lines ratchet) greenstatus-bar/,settings/,runtime/){ accountId }" contract), remote snapshot streaming + unsubscribe-on-close, subscription failure surfacing, remote-wins status-bar account state, pane copy/disable states both scopesKnown follow-ups (unchanged behavior, called out for transparency)
accounts.selectCodex/selectClaudeawaits a provider usage refresh before returning; with wedged auth the RPC can be slow (30s timeout applied client-side).Fixes #7973 (STA-1558)
Made with Orca 🐋