Add rate projection coloring, live countdown, and reset notification - #14
Open
ramonsmits wants to merge 3 commits into
Open
Add rate projection coloring, live countdown, and reset notification#14ramonsmits wants to merge 3 commits into
ramonsmits wants to merge 3 commits into
Conversation
Replace simple threshold-based color logic with rate projection that calculates whether current usage rate will exhaust the window. Colors now reflect projected burn rate instead of current utilization: - Normal (green): projected <= 90% - Warning (yellow): projected > 90% - Critical (red): projected > 100% Panel progress bar is also colored based on projection. Dropdown shows projected percentage when warning/critical.
Replace static "Resets in Xh Ym" text with a continuously updating countdown. Updates every 60s when > 1 min remains, switches to per-second updates for the final minute, shows "Resetting..." when the timer expires, then triggers a data refresh after 3 seconds. Also shows seconds in the countdown when under 1 minute remaining.
When a usage window was at 100% and then resets (detected via API polling or countdown expiry), play an F1-style racing start beep sequence (3 short 880Hz + 1 long 1320Hz via gst-launch-1.0) and show a GNOME notification. Tracks previous limited state per window to detect the transition from limited to available.
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
Three features that improve usage monitoring:
Details
Rate projection
projected = (utilization / elapsed) * total_windowLive countdown
resets_atfrom API in instance variables_scheduleCountdownTick()picks the right interval: 60s normally, 1s in final minuteReset notification
_prevWasLimitedstate per windowgst-launch-1.0Cleanup
destroy()Test plan