Skip to content

feat(ui): add t keyboard shortcut to toggle rate tracking view#14

Closed
hmenzagh wants to merge 35 commits into
mainfrom
beta
Closed

feat(ui): add t keyboard shortcut to toggle rate tracking view#14
hmenzagh wants to merge 35 commits into
mainfrom
beta

Conversation

@hmenzagh
Copy link
Copy Markdown
Owner

Summary

  • Add t as the primary keyboard shortcut to toggle between main dashboard and rate tracking view
  • Backtick (`) remains as an alias for backwards compatibility
  • Keyboard shortcut is easier to find on non-US keyboard layouts (AZERTY, QWERTZ, etc)

Changes

  1. feat(ui): add t keyboard shortcut to toggle rate tracking view — Implement keyboard handling, update UI footers, and document new shortcut in README
  2. chore: bump version to 2.0.0-beta.4 — Update version and changelog

🤖 Generated with Claude Code

hmenzagh and others added 30 commits April 7, 2026 01:23
…zation

- Trigger JSONL re-parse when usage data is updated to keep token counts
  and utilization percentages consistent
- Fix UsageWindow.resets_at deserialization failure when API returns null
  (was breaking the entire UsageReport for max subscriptions)
- Align gradient bars with fixed-width label padding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts by combining both usage tracking (UsagePoller,
rate tracking) and update notification (version check, banner) features.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ting

Add detailed token tracking that separates input and output tokens in the rate
limiting display. This includes:

- New `tokens_in_window_split()` method to return separate input/output totals
- New `daily_input_output_for_root()` method for per-day token breakdown
- Split `DayBar` to track input and output tokens separately
- Updated rendering to show stacked bars with input (lighter) on top and
  output (darker) on bottom, with distinct colors for each bar type
- Smart token splitting that uses actual ratios when available, falling back
  to 50/50 split

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Automatic formatting changes from cargo fmt including consistent
indentation, line wrapping, and alphabetical import organization.
- Use #[derive(Default)] for UsageStats instead of manual impl
- Change &PathBuf to &Path in function signatures (idiomatic style)
- Collapse nested if-let chains using && operator
- Replace .min(30).max(1) with .clamp(1, 30)
- Use .is_multiple_of(2) instead of % 2 == 0
- Use .div_ceil() for ceiling division
- Use range.contains() instead of manual bounds check
- Add #[allow(dead_code)] for fields used in future functionality
- Add #[allow(too_many_arguments)] on render function
- Shift the last time label left when it would be cut off by the chart boundary
- Skip date labels when bars are too narrow to avoid overlapping text
- Use div_ceil for more idiomatic ceiling division

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: add rate limit tracking view with usage monitoring
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>
refactor: improve usage tracking and rate limit management
Add comprehensive documentation for the new rate tracking view:
- New feature section with credential cards, forecast, timeline, and overages
- Backtick keybinding for toggling between dashboard and rate tracking
- Updated keybindings table with rate tracking navigation
- Updated project structure to reflect new modules
- Warning about chat-only tokens not being tracked
- Note about persistent rate history storage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Deduplicate API responses by requestId to eliminate 2-3x overcounting
  from streaming chunks, sub-agent mirrors, and compact retries
- Implement deltaize algorithm to correctly distribute tokens across
  minutes for long streaming responses with extended thinking
- Preserve code metrics on partial-overlap streams using ghost markers
- Fix ghost event filtering in model breakdowns

Fixes token and cost accuracy issues observed with heavy sub-agent usage.
- Implement schema_version tracking in history.json
- Auto-invalidate and rebuild cache on version mismatch
- Fixes cache migration without manual user intervention
hmenzagh and others added 5 commits April 13, 2026 22:14
- Display cache state banner on startup (rebuilt or unreadable)
- Add CCMETER_FORCE_BANNER env var for testing
- Update dashboard styling for rate tracking components
- Include new rate-tracking asset
- Add 'Accurate token counting' section explaining dedup approach
- Update version to 2.0.0-beta.3
- Document all fixes and new features in CHANGELOG
fix(parser): implement request dedup and deltaize for token accuracy
- 't' is now the primary way to toggle between main dashboard and rate tracking view
- Backtick (\`) still works as an alias for accessibility
- Updated all UI footers to show 't' instead of backtick
- Easier to find on non-US keyboard layouts (AZERTY, QWERTZ, etc)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hmenzagh hmenzagh closed this Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant