Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Respect read-only claude-swap account adapters. The
cswap --list --jsonschema-v1 envelope may carry an optional top-level booleansupportsAccountSwitching(absent means true). When it isfalse, usage, account details and the active marker remain, but no Switch or Reauthenticate action is projected for any row, and the shell rejects switch/reauthenticate for that list. A present non-boolean value (includingnull, numbers, strings, arrays, objects) fails the whole payload withMalformedShape("supportsAccountSwitching is not a boolean").Upstream reference
f21dbeb37/ fix(claude): honor read-only account adapters steipete/CodexBar#3846).Sources/CodexBarCore/Providers/Claude/ClaudeSwap/ClaudeSwapAccountList.swift(supportsAccountSwitching, default true, exact error text),ClaudeSwapAccountProjection.swift(canActivate: list.supportsAccountSwitching && ...),Tests/CodexBarTests/ClaudeSwapListParserTests.swift,ClaudeSwapAccountProjectionTests.swift,ClaudeSwapSwitchErrorTimingTests.swift,docs/claude-multi-account-and-status-items.md.Ported / Deferred
Ported: parser field and validation, projection gating (
action_for_accountnow takes the list), shell rejection invalidate_claude_swap_operation, tests. The existing UI already renders no button whenactionis null, so no frontend change; a Vitest test pins it.Deferred: none. The other hunks of the upstream commit (scoped-window parse refactor, projected-usage snapshot inlining) are behavior-preserving refactors and were not ported.
Validation
cargo +1.98.0 fmt --all;cargo +1.98.0 clippy --workspace --all-targets -- -D warnings: cleancargo +1.98.0 test -p codexbar claude_swap: 40 passed, 0 failedcargo +1.98.0 test -p codexbar-desktop-tauri claude_accounts: 7 passed, 0 failedpnpm exec vitest run .../ClaudeSwapAccountsSection.test.tsx: 8 passed;pnpm run build: ok;pnpm run lint: only pre-existing warnings in untouched filesAffected areas
UI proof
Pending: coordinator will capture CUA proof on a fresh build.