Repository navigation
Conversation
Claude CLI auth lapses overnight, leaving the bottom-left usage status bar unable to report Claude usage until the user re-authenticates. Add a "Re-authenticate" entry to the Claude account menu that refreshes the active managed account in place, without a trip to Settings. The entry shows only when an active managed account exists; system-default sessions keep falling back to Settings. Add an e2e test that seeds an active managed account and asserts the new menu entry renders.
📝 WalkthroughWalkthroughA “Re-authenticate” action is added to the Claude status bar account switcher. The dropdown now shows the action for the active account, disables it during switching or reauthentication, and shows a loading spinner while the reauthentication request is in progress. A new handler calls 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e2b6bb46-6727-4fbd-b979-322b8ab06d26
📒 Files selected for processing (7)
src/renderer/src/components/status-bar/StatusBar.tsxsrc/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.jsontests/e2e/claude-status-reauth-button.spec.ts
The accessible-name assertions previously matched only English and Japanese, so the test could fail under other locales even when the menu rendered. Seed uiLanguage='en' so I18nProvider pins the UI language, and assert against the English labels deterministically regardless of host/CI locale.
|
I noticed that a root cause fix has already been proposed in #6864.Since my PR (#6828) addresses a similar issue/consequence, please let me know how you'd like to handle this.If #6864 is preferred, I'm happy to close this PR. Otherwise, let me know if this can be reviewed as a temporary workaround. Thanks! |
|
Thanks @mantaroh for the work here. Closing as superseded: the account switcher now offers an inline Sign in action for accounts that need re-authentication, and the underlying credential issue was reworked in #26801. Appreciate the contribution, and feel free to open a fresh PR against current main if you see anything still missing. |

Summary
Claude CLI authentication lapses overnight, so after Orca sits idle the
bottom-left usage status bar can no longer report Claude usage until the
account is re-authenticated. This adds a one-click "Re-authenticate" entry to
the Claude account menu in the usage status bar, refreshing the active managed
account in place without opening Settings → Accounts.
claudeAccounts.reauthenticateflow, then reloadsaccounts, settings, and usage for the active runtime target.
are unaffected and keep using Settings.
Screenshots
(Attached to the PR conversation: the open Claude menu showing the new
"Re-authenticate" entry above "Manage Accounts…".)
Testing
pnpm lintpnpm typecheckpnpm test— 20522 passed. 2 failures are pre-existing and environmentalon the dev machine, unrelated to this change and in files this PR does not
touch: one expects English weekday labels but the machine locale is
ja_JP (passes under
LANG=C); one expects 0o600 credential-store permsbut the local filesystem reports 0o644.
pnpm buildtests/e2e/claude-status-reauth-button.spec.ts) seeding anactive managed account and asserting the menu entry renders.
AI Review Report
Reviewed for cross-platform, remote/SSH, provider neutrality, performance, UI,
and security:
path handling, or shell calls added. Reuses existing DropdownMenu primitives
and the runtime-target plumbing already used by the Codex menu. Label is i18n,
not hardcoded.
refreshClaudeRateLimitsForTarget(runtimeTarget), so host/WSL/remote selectionis preserved; no local-only assumptions.
menu behavior; no other providers touched.
hot-path work, no new polling.
the Codex sign-in entry; spinner shown during the in-flight login; menu kept
open during the call so progress is visible.
claudeAccounts:reauthenticate; nosecrets logged; the only argument is the active account id from app state.
Flagged/changed: the entry is gated on an active managed account, since
system-default has no account id to pass to the IPC.
Security Audit
existing reauthenticate IPC; no user-entered strings.
main-process flow.
stays in the existing main-process service.
Follow-up: none.
Notes
contract.
ELI5
Claude usage in the status bar can go stale overnight when auth expires. A one-click “Re-authenticate” item on the Claude account menu refreshes the active account without opening Settings.