Repository navigation
fix(quota): load account quotas automatically and prepare 0.89.1 - #394
Merged
Merged
Conversation
The overview and menu bar previously depended on opening Upstreams to populate ChatGPT quota state. Warm it at startup and through generic quota reads, then prefer real traffic updates, a 15-minute stale-data fallback and reported window reset times over fixed one-minute polling. Share concurrent reads, bound outbound queries and back off failures while retaining the last quota. Cancel the poller during Core handover and reject late results for accounts that have been disabled or replaced. Prepare 0.89.1 with regression coverage and release notes.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What this changes
Load ChatGPT account quotas at startup and through generic quota reads, so the overview and menu bar no longer depend on visiting Upstreams. Prefer quota headers from real traffic; query again after 15 minutes without an update or after a reported window reset. Manual refresh remains immediate.
Concurrent readers share in-flight queries, with at most four outbound reads. Failures back off while preserving the last quota. Automatic reads exclude disabled accounts and accounts requiring sign-in; late results cannot overwrite disabled or replaced accounts. The poller is cancelled during Core handover.
Why
Only the account usage endpoint populated ChatGPT quota state. A cold Core therefore returned no ChatGPT quota to the overview or menu until the user opened the Upstreams page.
How it was verified
NO_PROXY=127.0.0.1,localhost,::1. Eight tests were skipped by the suite.The existing account request path retains its OAuth refresh, proxy selection and masked backend errors. Integration tests use a local fake OpenAI server and fabricated credentials.
Notes for review
Prepare v0.89.1 and its release notes. No configuration or control-protocol changes are required. Lite's accompanying overview event-subscription fix and Core pin update are in ThinkWatch-Lite#400, targeting
devwithout a Lite release.