Add guarded limit reset action and bump 0.5.1 - #7
Merged
Conversation
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
Add a guarded RESET action to the Usage LIMITS card and bump CoMon to 0.5.1.
What changed
account/rateLimitResetCredit/consumewith a unique idempotency key.reset,nothingToReset,noCredit, andalreadyRedeemed.Safety
The reset RPC is not sent unless the cooldown has first been written successfully to
state.json.A separate bounded channel prevents routine refresh requests from displacing the user action. The backend remains authoritative, and the UI guard uses a small floating-point
tolerance around 0% remaining.
UI
The RESET button is independent of the card border, vertically centered, and aligned to the card's right inner edge.
Its active state uses the same inverse-video treatment as the YES/NO dialog buttons. Disabled, in-flight, and cooldown states remain visually distinct.
Validation
cargo fmt --checkbash scripts/check-ascii.shcomon 0.5.1.The existing upstream theme and heatmap Clippy warnings are unchanged by this PR.