refactor: improve usage tracking and rate limit management#11
Merged
Conversation
Replace cloning references before passing to slice constructors with std::slice::from_ref, which is more idiomatic and avoids unnecessary allocations in test code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Do not carry over cached usage when a credential has expired, since the poller stops fetching expired tokens and stale data would incorrectly render an invalid session as 'live'.
Change merge_fresh_hits to use asymmetric merging: when a fresh hit collides with an existing entry, keep the richer value on each field. This prevents data loss when a fresh scan can no longer compute per_model or session_duration_min (e.g. source JSONL rotated out). Also removes unused HashSet import.
Add a new blinking_dot_span helper function that creates animated visual indicators for status elements. The dot blinks at regular intervals based on the tick counter, providing visual feedback for active monitoring. - Add blinking_dot_span function in helpers.rs - Use blinking dot in live_summary status display - Use blinking dot in session_forecast status display - Pass tick parameter through render function chain Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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
Comprehensive refactoring of the usage tracking v2 feature with improvements to rate limit management, async discovery handling, and UI component modularization.
Note: recreated from #10 (retargeted to
betainstead ofmain).Changes
Testing
🤖 Generated with Claude Code