menubar: fix Codex plan tab copy, show model-scoped weekly limits (Fable)#598
Merged
Conversation
…ekly limits The Codex plan tab reused the shared connect, no-credentials and reconnect views whose copy was hardcoded for Claude, so the Codex tab showed Connect Claude subscription. Worse, the no-credentials Try Again button always re-ran the Claude bootstrap. The three views now take title, message and action from the call site. The oauth usage endpoint gained a limits array carrying model-scoped weekly buckets (currently Fable). Parse weekly_scoped entries generically by their display name and show them in the Claude hover popover and the plan tab, with the usual pace projection. Parser now has test coverage using the captured live response shape.
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.
What
Two fixes in the menubar plan/quota views.
Codex plan tab showed Claude wording. The empty states (connect, no credentials, reconnect) were shared views with hardcoded Claude copy, so the Codex tab prompted "Connect Claude subscription". The no-credentials "Try Again" button also always re-ran the Claude bootstrap, even on the Codex tab. The three views now take their title, message and retry action from the call site; Codex gets ChatGPT/Codex wording and the right bootstrap.
Fable quota was missing. The oauth usage endpoint now returns a
limitsarray with model-scoped weekly buckets (claude.ai shows this as the "Fable" weekly bar). CodeBurn only read the named windows, so the bucket never appeared. The parser now mapsweekly_scopedentries by theirscope.model.display_name, so the Claude hover popover gets a "Weekly · Fable" row and the Plan tab a "7-day Fable" bar with the usual pace projection. Future model buckets show up without a client change.Testing
swift test: 70 tests pass, including a new suite for the usage parser fed with the captured live response shape (scoped bucket parsed, named windows unaffected, old responses withoutlimitsstill decode, session/weekly_all not duplicated).swift buildclean.weekly_scoped/ Fable at 94% matching the claude.ai usage page.