Repository navigation
fix(widget): headline a used-up window in the bar and card header - #106
Merged
Merged
Conversation
A Codex or Claude account blocked by its weekly limit kept showing the idle 5 hour window in the bar, reading 0% used or 100% left in green while every request failed. Without a barWindowOverrides pair the bar and the card header now show BarWindows.headlineWindow(): the primary window, unless a later window is used up while the primary still has room. The promotion is display only. primaryUsageWindow() still drives sorting, the hero, the fleet rollup and history, so their series keep their meaning. The settings dropdown gains Automatic for the default, and Primary becomes an explicit choice that is stored and keeps the primary window. Co-authored-by: dotredstone <[email protected]> Signed-off-by: Bernardo Pinto Gomes <[email protected]>
Signed-off-by: Bernardo Pinto Gomes <[email protected]>
6 of 10 tasks
9 of 10 tasks
5 of 10 tasks
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
Split out of #101 (the "exhausted multi-window promotion" part by @DotRedstone, credited as co-author) and narrowed to display.
A Codex or Claude account blocked by its weekly limit kept showing its idle 5 hour window in the bar: 0% used, or 100% left in green, while every request failed. #101 fixed this by changing
primaryUsageWindow(). That function also drives sorting, the hero, the fleet rollup, history andnotifyWindowScope=primary, so the history series would have switched windows silently.This PR keeps
primaryUsageWindow()unchanged and addsBarWindows.headlineWindow(). It returns the primary window, unless the primary still has room while a later window is used up (≥ 100%). Only exhaustion promotes a window; a busy but usable weekly window never does.barWindowOverridespair.notifyWindowScope=displayed, alerts follow the window the bar shows, as documented.Tests:
tests/test-qml-smoke.sh: unit checks forheadlineWindow,isExhaustedandwindowsFor.tests/test-widget-runtime.sh: renders the exhausted case. It checks the pill text, the card header text, thatproviderPercent()andprimaryUsageWindow()still return the primary window, the notification window, and the explicitcodex:primaryoverride. It also checks that Automatic/Primary persist in settings.I ran it natively on Wayland and confirmed it fails when the default falls back to the primary window.
Docs:
configuration.md,architecture.md,troubleshooting.mdand a CHANGELOG bullet.Related issues
Part of #101.
Type of change
Checklist
plugin.json.versionandCHANGELOG.mdare consistent (not release-bearing;## Unreleasedbullet)i18n/en.jsonkeys have translations in every localegit commit -s) under the DCOLocal gates:
check-metadata,check-changelog,check-dco,bash -n,shellcheck -S warning,qmllint,actionlint,gitleaks, everytests/test-*.sh(including the native widget runtime on Wayland), andAIOC_COVERAGE_MIN=95 scripts/coverage.