Fix Claude rate-limit handling for mixed account states#103
Merged
Conversation
Contributor
|
Rate Limit 오류가 있어도 표시할 계정 데이터가 있다면 에러 뷰 대신 정보를 우선 보여주도록
이건 그냥 짧은 맛보기 리뷰야. 버그부터 보안 이슈까지 탈탈 털어주는 상세 리뷰를 원하면 |
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
This change fixes the Claude multi-account menu behavior when one account still has usable quota data but another account is in a rate-limited cooldown window. Users were seeing the entire Claude section collapse into a single
Rate limitedprovider row, which hid both Claude accounts from the dropdown even though one account remained valid and should still have been visible.The root cause was the provider-level error precedence in the menu renderer.
ProviderManagerintentionally preserves rate-limit errors during the cooldown interval, even when cached provider results are still available.StatusBarControllertreated that provider-level rate-limit error as higher priority than the existing multi-account result and replaced the account rows with a single error row. In mixed-account Claude states, that meant an error produced by one account could visually suppress the other account and make the whole provider appear unavailable.The fix adds a shared display policy for rate-limited rows. Multi-account providers now keep rendering their account rows whenever displayable account data already exists, and the provider-level
Rate limitedrow is only shown when there are no account rows to render. This keeps the existing cooldown behavior for providers that truly have no visible account data, while preserving Claude, Codex, Copilot, and Gemini account rows when cached or current account-level data is still available.I also added regression coverage for the display policy. The new tests verify that Claude account rows remain visible during a rate-limit cooldown when account data exists, and that single-result providers without account rows still surface the rate-limit error row as before.
Validation
I validated the change with the existing targeted provider regression suite and with a clean local Debug build:
xcodebuild test -project CopilotMonitor/CopilotMonitor.xcodeproj -scheme CopilotMonitor -configuration Debug -destination 'platform=macOS' -only-testing:CopilotMonitorTests/ProviderUsageTestsxcodebuild -project CopilotMonitor/CopilotMonitor.xcodeproj -scheme CopilotMonitor -configuration Debug -destination 'platform=macOS' clean buildI also restarted the Debug app and confirmed the updated build launched successfully and emitted provider logs. The exact mixed live state was not reproducible at run time because both Claude accounts were returning HTTP 429 during that launch window, so the final user-facing behavior for the mixed state is covered by the new regression tests.