Repository navigation
Sync FloatBar with menu bar metric preference - #335
Merged
Finesssee merged 1 commit intoAug 18, 2026
Merged
Conversation
Finesssee
marked this pull request as ready for review
August 17, 2026 04:13
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.
Summary
Why this is needed
ChatGPT/Codex quota lanes are not always stable. The service can temporarily omit the 5-hour window while continuing to return a valid weekly window. In that state, a surface tied to the primary lane can show an informational 0% placeholder instead of actionable quota usage.
PR #277 fixed the automatic primary-to-weekly fallback for compact surfaces, but intentionally left explicit metric preferences unchanged. The existing preference therefore controlled the menu bar while FloatBar could show a different temporal window. This is especially confusing because both are persistent, glanceable indicators: users can see two different percentages for the same provider, and FloatBar becomes ineffective when the unavailable 5-hour lane is selected implicitly.
Using one preference for both surfaces makes the user's choice authoritative and keeps the indicators consistent when a provider adds, removes, or temporarily suppresses a quota window.
Related issue
Follow-up to #275 and #277. The original issue explicitly allowed exposing a FloatBar metric setting; this change reuses the existing setting instead of adding duplicate configuration.
Affected areas
Validation
Hosted PR check runs on Blacksmith Windows when CI_BUDGET_MODE is not off (see .github/workflows/pr-check.yml and CONTEXT.md). Still run the local slice and list commands/results below. If a check is not relevant, say why.
UI / tray proof
For UI, tray, settings, or visual behavior changes, use CUA Driver for visual proof. If CUA Driver cannot be used, explain why and attach equivalent manual proof.
CUA Driver is not available in this environment. The contributor ran the branch through the Windows Tauri development flow, selected Weekly under Settings > Providers > Codex > Menu and floating bar metric, enabled FloatBar, and confirmed that FloatBar displayed weekly usage instead of the unavailable 5-hour 0% value. The final internal refactor preserves that behavior through the canonical policy and focused integration tests listed above.
Notes for reviewers
The settings value and persistence format are unchanged. Provider cache entries remain raw; selectedMetric is derived at the presentation boundary for both cached reads and provider-updated events. Existing settings-changed handling reloads cached presentation data, so changing the metric updates FloatBar without requiring a provider refetch.
The native tray now consumes the same policy that produces selectedMetric, preventing future drift between the two surfaces. Please focus review on the presentation payload boundary and fallback parity preserved by the existing tray regression suite.