Repository navigation
Conversation
…n and Refresh Inactive-account usage was fetched only when "Switch to" expanded, so the Claude usage popover and the Refresh button left saved accounts blank or stale. Fetch them when the Claude popover opens and when Refresh runs (both Claude and Codex), keeping the service's on-open debounce and skipping the local caches while a remote environment owns the accounts. Part of stablyai#14833 (point 6).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe status bar refresh now includes inactive Claude and Codex account usage when no active runtime environment exists. The refresh spinner no longer waits for inactive-account fetches. Remote runtime environments skip these fetches. The Claude switcher menu also fetches inactive Claude account usage when it opens under the same condition. Tests cover these behaviors. Merge Risk: ⚪ Minimal · up to Status-bar refresh now updates inactive local Claude and Codex usage without extending the refresh spinner, while remote runtime environments remain excluded. No current merge-blocking risk is identified. 🚥 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.
ℹ️ No critical issues — one minor suggestion inline.
Reviewed changes
ClaudeSwitcherMenupopover-open fetch —handleOpenChangenow firesfetchInactiveClaudeAccountUsage()on open (gated on!hasActiveRuntimeEnvironment), alongside the retainedhandleAccountsExpandedToggletrigger.useStatusBarControllerRefresh fan-out —handleRefreshaddsfetchInactiveClaudeAccountUsage()andfetchInactiveCodexAccountUsage()to itsPromise.all, gated on the same remote-environment check.- New test —
use-status-bar-controller-refresh.test.tsxpins that Refresh fans out to both inactive fetches locally and skips them under a remote environment.
The change is well scoped: both call sites route through the existing main-side fetchInactiveClaudeAccountsOnOpen / fetchInactiveCodexAccountsOnOpen, which already carry the 60s debounce and (for Codex) the 2s-per-account probe stagger, so this adds no polling. The remote-environment gate matches the pre-existing expansion trigger, and the tests assert exact call counts rather than truthiness, so they would actually fail against a regression. I verified refresh() (active) does not already refresh inactive accounts, so the additions are genuinely new work rather than redundant.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…ctive probes Review follow-up on stablyai#18746: fire the inactive-account fetches without awaiting them, like the switcher does, so isRefreshing tracks only the active-provider refresh instead of the per-account Codex probe stagger.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Fire-and-forget inactive probes on Refresh —
handleRefreshnow invokesfetchInactiveClaudeAccountUsage()andfetchInactiveCodexAccountUsage()withvoidrather than folding them into thePromise.all, so the Refresh spinner clears once the active providers finish and no longer waits out the Codex per-account stagger. - Regression test — new
does not hold the spinner on the staggered inactive probescase holds a Codex probe pending and assertsisRefreshingis alreadyfalse, pinning the fire-and-forget behavior.
The prior review's single concern (the spinner held open on the staggered inactive probes) is resolved cleanly. The void pattern matches the switcher and the store slices swallow their own errors, so the unawaited promises can't reject. The added test asserts exact call counts and observable state rather than truthiness, so it would catch a regression.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

ELI5
Orca only looked up the usage of your other saved Claude accounts when you expanded the "Switch to" list. Opening the Claude usage popover or pressing Refresh did nothing for them, so they stayed blank or showed old numbers. Now both of those also ask for the saved accounts' usage.
What Changed
ClaudeSwitcherMenu.tsx: opening the Claude popover callsfetchInactiveClaudeAccountUsage(same gate as the "Switch to" expansion: skipped while a remote environment owns the accounts). The expansion trigger stays; the service's 60 s on-open debounce makes the second call a no-op.use-status-bar-controller.ts: the status bar Refresh button also runsfetchInactiveClaudeAccountUsageandfetchInactiveCodexAccountUsage, under the same remote-environment gate. Codex is included because Refresh is provider-wide; its inactive probes keep their own 60 s debounce and stagger in the service.use-status-bar-controller-refresh.test.tsx(real store,renderHook): Refresh fans out to both inactive fetches locally, and leaves them alone whenactiveRuntimeEnvironmentIdis set.Why
Point 6 of #14833: "Fetch inactive accounts when the user opens Switch to, when they open the Usage popover, and on explicit refresh — not only on switcher expand." The main-side fetch already exists with its own debounce, so this is two call sites, no new polling.
Linked Issue
Part of #14833 (point 6). Does not close it.
Visual Proof
N/A: no visible element changes; the existing rows fill in earlier. The popover-open path reuses the exact call the "Switch to" expansion already makes.
Testing
Platforms: Windows 11 (local). Renderer-only, platform-neutral.
vitest run --config config/vitest.config.ts src/renderer/src/components/status-bar: 52 files, 338 tests passed (includes the 2 new).pnpm tc:web: clean.oxlintandoxfmt --checkon the three changed files: clean.pnpm build:desktop: exit 0 (full typecheck, relay, CLI, electron-vite, web projection).Not covered by a test: the popover-open call in
ClaudeSwitcherMenu. The component is not rendered in isolation anywhere in the suite today, and it is a one-line addition to an existing handler with the same gate as the expansion path.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Implementation and tests by Claude (Fable 5.1) via Claude Code, driven and verified by me.
Review
Agent code-review summary:
activeRuntimeEnvironmentIdis set, matching the existing expansion trigger, because remote-owned accounts have no local cache to fill.codexper inactive account, which is why it keeps the service-side debounce and stagger; Refresh within 60 s of a previous probe is a no-op.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Review follow-up (c47dcac): the inactive fetches are fired without awaiting, so the Refresh spinner tracks only the active-provider refresh.
Independent of #18732 and #18736 (separate call sites). With #18732 the fetch actually succeeds for expired tokens; with #18736 a failed fetch shows a reason instead of a blank row.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Author
X: @EnricoPin