feat(widgets): add secure Codex usage widget - #1064
Conversation
86bdb3a to
e2a9304
Compare
|
It looks like your "codex" can't read the Contributing Page :)
And don't change the readme. |
|
;( mb, my Codex and Claude missed the contributing guidelines before opening the PR. I'll revert the changes to schema.json and the README, and make sure to follow the guidelines going forward. Thanks for pointing it out! |
21f36f4 to
a4907f1
Compare
|
You're right — the icons shouldn't be hardcoded. I'll replace them with the appropriate dynamic icon references, clean up the format and styles, and rename the image using a random UUID. Thanks for the clarification. I'll update the PR accordingly.
I just realized those Codex credits are probably from a test environment, That explains the impressive balance. :) |
22e9fd4 to
0ee2bc3
Compare
Happy Monday! :) Your feedback is spot on — the default layout should be readable and compact for users who may not customize the CSS themselves. I’m considering turning the lower sections into a horizontally switchable view, so users can move between them without the popup taking up most of the screen height. I’ll also improve the default font sizes and spacing, then push the changes to this PR. Thanks for the helpful suggestions! |
|
Let me know when it's ready to merge. Also, before that, just squash the commits into a single one. |
d21a8ff to
b39dbe6
Compare
|
Hi I’ve pushed the requested updates and squashed the PR history into a single commit as requested. It’s now ready for your final review and merge. Thanks again for the helpful feedback! |



Summary
yasb.codex_usage.CodexUsageWidgetthat shows remaining Codex rate-limit capacityaccount/rateLimits/read) instead of reading~/.codex/auth.jsonor calling a private ChatGPT endpointwindowDurationMins, so different window lengths and missing secondary windows render correctlyQStackedWidgetmenu.show_overview,show_models,show_activity,show_resets, andshow_detailsswitches; hidden or data-less pages are omitted and navigation disappears when only one page remainsshow_token_usagecompatibility and keep the fixed rate-limit area working when all optional pages are disabledrateLimitResetCredits; redeemable credit IDs are deliberately discarded and no consume action is exposedScreenshots
Taskbar widget
Compact paged details popup
Maintainer feedback addressed
README.mdremains unchangedschema.jsonremains unchangedContext
This is an alternative implementation to #1031. It delegates subscription authentication entirely to Codex CLI/app-server and never handles access tokens.
Test plan
ruff format .ruff format --check .ruff check .git diff --checkREADME.mdorschema.jsonAuthentication and privacy
The widget requires a recent Codex CLI and an existing ChatGPT-backed
codex login. It never opensauth.json, and it does not read, log, copy, or cache credentials. Optional token statistics scan only structured model/timestamp/token-count metadata from the current user's local Codex session files; prompt and response content is not parsed or retained, and nothing is uploaded. Setshow_token_usage: falseto disable local history scanning.Reset-credit support stores only display metadata such as count, title, status, and timestamps. It intentionally discards the backend credit ID and does not expose the protocol's consume operation.