Added option to show Codex 5-hr & weekly usage limit as a ring+pie chart#428
Open
le0-VV wants to merge 7 commits intosteipete:mainfrom
Open
Added option to show Codex 5-hr & weekly usage limit as a ring+pie chart#428le0-VV wants to merge 7 commits intosteipete:mainfrom
le0-VV wants to merge 7 commits intosteipete:mainfrom
Conversation
Add explicit invalid-chart rendering controls for codex pie/ring mode. This lets the UI keep a meaningful visual state when upstream usage values are non-finite by toggling full-track vs full-used rendering per affected chart.
Track the codex pie/ring invalid-flash task on the controller and cancel it during deinit. This prevents background task leaks and keeps animation lifecycle consistent with other controller-owned tasks.
…ash state Detect non-finite upstream usage values, map them to affected pie/ring charts based on current layout mode, and run a 1-second flash ticker only when codex pie/ring is actively displayed. This aligns error handling with existing upstream resilience while preserving meaningful on-icon feedback.
…l variance Replace brittle single-pixel outer-ring checks with sampled-region average alpha assertions, and cover zero-usage plus invalid-flash phase contrast. This keeps the same behavioral intent while reducing flakiness across rendering environments.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3778bcbd4f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Route pie/ring inputs through usedPercent vs remainingPercent based on usageBarsShowUsed in both merged and per-provider icon paths. Add regression test to assert rendered output matches expected used/remaining mappings.
Draw pie and ring used segments from start angle to used endpoint so low usage values render as small fills in show-used mode. Add regression coverage for 1% usage to guard against complement-arc regressions.
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.
By Codex:
CodexMenuBarVisualizationModesupport in settings/state.IconRenderer.makeCodexPieRingIcon(...)to render both mappings based on mode.StatusItemController+Animation, added sanitization:codexPieRingInvalidFlashTask) managed byStatusItemController.StatusItemAnimationTeststo avoid fragile single-pixel assertions.