Repository navigation
(codex): opt-in Codex usage gauge - #1161
Merged
Merged
Conversation
Port of the upstream Codex usage reader behind a Settings switch that is off by default: the token is read main-side only, requests time out and back off, and any failure hides the gauge.
Turning the setting off only hides the Codex rows, a save refreshes usage only when the setting changed, the request headers are pinned, rows above 100% are kept, and the docs name the status bar gauge.
…usage setting The quota gauge clears its static placeholders again, Stats honours the renderer's Codex state, an unrendered toggle no longer turns Codex off, and a deferred turn-on refreshes once the save is applied.
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.
Closes #1139
Port of the Codex usage gauge from upstream, by Ali Basiri (doctly/switchboard ee656523 and 3ca3d19d), behind an opt-in switch as decided on 2026-10-28.
SETTING_DEFAULTS).auth.jsonand never calls the endpoint; no gauge.CODEX_HOMEor~/.codex), never logged, never sent to the renderer; requests time out and back off after a failure or a 429; any failure hides the gauge quietly. The renderer receives only the rows it renders, in the sidebar gauge and in Stats.Tests use a fake auth file and a stubbed endpoint:
test/codex-usage.test.js,test/codex-usage-ipc.test.js,test/codex-usage-renderer.test.js.