You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(accounts): show Needs sign-in for a signed-out system Claude login - #45714
With no managed Claude account selected, Settings → Accounts shows the System default row as an active login ("Use your current … Claude login") even when local usage has already classified that login as signed out.
The Codex section already shows a "Needs sign-in" badge and a destructive row for the same situation. The Claude row did not.
Change
The system-default Claude row now follows that local-only treatment.
The warning uses the status-bar sign-in classification: missing-credentials, or a credential error with no other failure kind (getUsageRosterRowState kind sign-in).
A saved account that is the active login, a usage poll for a different runtime, a poll that already has usage windows, and a poll that is still fetching do not warn.
Remote account scope passes no desktop usage snapshot, so that host does not inherit this machine's login state.
The row reuses the existing "Needs sign-in" string. The subtitle stays "Use your current … Claude login." and only takes the destructive color.
The row waits until the Claude account roster has loaded, matching the Codex gate.
This does not add a signed-out failure kind. The status bar classifies this state as above.
Before the function returned a warning, the missing-credentials case and the "Not logged in" case failed (expected missing-sign-in, received null). The other six cases passed.
After the change, all 8 tests passed:
node node_modules/vitest/vitest.mjs run --config config/vitest.config.ts src/renderer/src/components/settings/accounts/claude/claude-account-auth-warning.test.ts
Limits
The desktop Accounts pane was not opened. The badge and destructive classes match the existing Codex system-default row. This does not change status-bar copy, and it does not name the system-default Claude login.
The Claude Accounts pane now checks usage rate-limit data for a missing sign-in on the System default account. It limits this check to the matching runtime and waits for the Claude account snapshot to load. When the warning applies, the System default row displays a “Needs sign-in” badge and destructive styling.
Severity of issue fixed: Medium
Merge Risk: Low · up to b525d
The System default Claude row may show a misleading "Needs sign-in" badge in some WSL multi-distro setups. The effect is display-only and narrow, so the change is mergeable with a follow-up.
Pre-merge checks: 2 · 2
Failed checks: 2 inconclusive
Check name
Status
Explanation
Resolution
Description check
The description follows the template well. It covers the problem, the change mechanism, the tests with the exact command and before/after results, and the limits. It lacks the ELI5 section, a user-fac…
Add an ELI5 summary in plain language. Add a Visual Proof section with BEFORE and AFTER screenshots or a video of the System default Claude row, because this is a UI change. Complete the Testing checkboxes and state which platforms were tes…
Linked Issues check
Issue #20131 asks that the System default Claude row show the existing "Needs sign-in" treatment (badge and destructive styling) when the local usage snapshot for the viewed runtime reports sign-out. …
Confirm with the issue owner whether the missing-credentials or credential-error classification satisfies #20131 in place of the signed-out kind. If the signed-out kind is required, the PR must consume it from the usage snapshot once …
Passed checks: 2 passed
Check name
Status
Explanation
Title check
The title names the main change: the system-default Claude row now shows "Needs sign-in" when the local Claude login is signed out. It uses the conventional fix(scope) prefix and is 70 characters, wit…
Out of Scope Changes check
All changed files relate to the System default Claude row warning. AccountsPane.tsx derives the warning and passes null limits for remote scope, mirroring the Codex gate. accounts-pane-types.ts ad…
Full details: Title check
Explanation
The title names the main change: the system-default Claude row now shows "Needs sign-in" when the local Claude login is signed out. It uses the conventional fix(scope) prefix and is 70 characters, within a normal length. It matches the PR objectives and the changed files (AccountsPane, the Claude section renderer, and the new auth warning helper).
Full details: Out of Scope Changes check
Explanation
All changed files relate to the System default Claude row warning. AccountsPane.tsx derives the warning and passes null limits for remote scope, mirroring the Codex gate. accounts-pane-types.ts adds systemClaudeNeedsSignIn. accounts-pane-claude-section.tsx renders the badge and destructive styling from that flag. claude-account-auth-warning.ts holds the classification helper. claude-account-auth-warning.test.ts covers that helper. No unrelated behavior or copy change is described. The PR states that status-bar copy is unchanged.
Full details: Description check
Explanation
The description follows the template well. It covers the problem, the change mechanism, the tests with the exact command and before/after results, and the limits. It lacks the ELI5 section, a user-facing before/after visual proof (the author states the pane was not opened), a linked issue in the required 'Fixes #' format (it reads 'Fixes #20131', which is filled), a Risk section with a level and rollback note, and the Notes/Checklist items. The Visual Proof section is required for UI changes and is not provided.
Resolution
Add an ELI5 summary in plain language. Add a Visual Proof section with BEFORE and AFTER screenshots or a video of the System default Claude row, because this is a UI change. Complete the Testing checkboxes and state which platforms were tested. Add a Risk section with a Level (Low, Medium, or High), the riskiest part, and how to revert. Complete the Review, Notes, and Checklist sections, or mark them as not applicable.
Full details: Linked Issues check
Explanation
Issue #20131 asks that the System default Claude row show the existing "Needs sign-in" treatment (badge and destructive styling) when the local usage snapshot for the viewed runtime reports sign-out. It names a signed-out failure kind from #20120 as the trigger and requires local-host scope only. The PR implements the row treatment. getClaudeSystemDefaultSignInWarning returns missing-sign-in when getUsageRosterRowState returns kind sign-in. It returns null for a remote scope (limits passed as null), a saved active account, a WSL or other runtime mismatch, and absent limits. The PR does not add a signed-out kind. The reviewed head file claude-account-auth-warning.ts shows no signed-out handling. The trigger therefore differs from the issue's stated signal. The missing-credentials state is the state the issue describes, so the behavior likely matches the bug report. The signed-out kind is not confirmed as present or absent at the reviewed head. The desktop Accounts pane was not exercised, and the rendering in accounts-pane-claude-section.tsx was taken from the summary. Unit test results (8 of 8 passing) are reported by the author and were not re-run.
Resolution
Confirm with the issue owner whether the missing-credentials or credential-error classification satisfies #20131 in place of the signed-out kind. If the signed-out kind is required, the PR must consume it from the usage snapshot once #20120 lands. Alternatively, update #20131 to cite the status-bar sign-in classification. Optionally, confirm at the reviewed head that the AccountsPane row renders the badge and destructive classes for the system-default Claude row.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Match the concrete WSL default distro.
When runtime.wslDistro is null, this accepts every WSL poll target. If Debian is the WSL default and the poll targets signed-out Ubuntu, the Debian System default row incorrectly shows “Needs sign-in”.
Resolve the default distro before comparing targets. Preserve matches when an explicit target names that same default distro.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With no managed Claude account selected, Settings → Accounts shows the System default row as an active login ("Use your current … Claude login") even when local usage has already classified that login as signed out.
The Codex section already shows a "Needs sign-in" badge and a destructive row for the same situation. The Claude row did not.
Change
The system-default Claude row now follows that local-only treatment.
missing-credentials, or a credential error with no other failure kind (getUsageRosterRowStatekindsign-in).This does not add a
signed-outfailure kind. The status bar classifies this state as above.Tests
src/renderer/src/components/settings/accounts/claude/claude-account-auth-warning.test.tsBefore the function returned a warning, the missing-credentials case and the "Not logged in" case failed (expected
missing-sign-in, receivednull). The other six cases passed.After the change, all 8 tests passed:
node node_modules/vitest/vitest.mjs run --config config/vitest.config.ts src/renderer/src/components/settings/accounts/claude/claude-account-auth-warning.test.tsLimits
The desktop Accounts pane was not opened. The badge and destructive classes match the existing Codex system-default row. This does not change status-bar copy, and it does not name the system-default Claude login.
Fixes #20131