Repository navigation
feat(bar): show several quota windows of one provider in the pill - #87
Merged
Merged
Conversation
The pill showed one window per provider, so a Claude user had to pick the 5 hour or the 7 day number and could not tell which one it was without hovering (#86). barWindowOverrides now accepts a set of windows ("primary+secondary", or "all"), and Settings offers both next to the single-window choices. Each shown window gets its length tag and its own usage colour ("5h 45% / 7d 80%"); the tooltip names every window. Slot parsing moves to BarWindows.js so the widget and the settings body read the same vocabulary. top/auto ranking uses the highest shown window, and notifyWindowScope=displayed alerts on every shown window. Absent windows are skipped, and the primary window still backs a choice the payload cannot satisfy. Closes #86 Signed-off-by: Bernardo Pinto Gomes <bernardopgomes@hotmail.com>
… whole "Windows that raise alerts" still said the default alerts on the single window the DankBar shows; with a multi-window override it alerts on each of them. The bar-window description's "5h 45% / 7d 80%" example wrapped mid-value in German and Spanish, so it now uses non-breaking spaces. Signed-off-by: Bernardo Pinto Gomes <bernardopgomes@hotmail.com>
Signed-off-by: Bernardo Pinto Gomes <bernardopgomes@hotmail.com>
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
The DankBar pill showed one quota window per provider, so a Claude user had to choose between the 5 hour and the 7 day number, and could not tell which one the bar showed without hovering.
DankBar usage window (
barWindowOverrides) now accepts a set of windows:claude:primary+secondary) and All windows (claude:all) join the existing Primary / Secondary / Tertiary / Highest choices.Claude 5h 45% / 7d 80%. The vertical bar stacks the tag above each percentage. The tooltip names every window, with its reset when one provider is shown.topandautopill modes rank such a provider by its highest window; with the defaultnotifyWindowScope=displayed, every shown window raises its own alert.Slot parsing moves to
BarWindows.js, shared by the widget and the settings body, which previously each carried a copy. Settings stores sets in canonical order (secondary+primary→primary+secondary, all three →all)."Windows that raise alerts" now describes the displayed windows in the plural, and the bar-window description keeps its
5h 45% / 7d 80%example on one line in German and Spanish.Related issues
Closes #86
Type of change
Migration
Existing
barWindowOverridesvalues keep their meaning.BarWindows.jsis a new QML module: a hot reload leaves the plugin disabled withFile name case mismatch, so the upgrade needs onedms restart(noted inCHANGELOG.md).Testing
tests/test-qml-smoke.sh: 14 checks onBarWindows.js(canonical slots, invalid/duplicate parts, alias-aware parsing, absent-window fallback,highest,maxPercent).tests/test-widget-runtime.sh: renders the real horizontal and vertical pills withclaude-work:primary+secondaryand checks the tags, per-window percentages, tooltip,notifyWindowsFor(), and the canonical value Settings stores.tests/test-*.sh,check-metadata,check-changelog,check-dco,qmllint,shellcheck,actionlint,git diff --checkandgitleakspass locally.Limitations
zizmorwas not run locally; no workflow changed.Checklist
plugin.json.versionandCHANGELOG.mdare consistent (only if this is a release-bearing change; both version pills read the manifest at runtime)i18n/en.jsonkeys have translations in every locale (or the strings are user-neutral)git commit -s) under the DCO