feat(usage): time-grid usage bars with current-segment highlight and over-pace warning#137
Merged
Merged
Conversation
…warning Make the Claude and Codex usage popovers show whether the user is in line with their rate limits, not just how full the bar is. - Split each usage bar into time segments: per-hour for the 5h session window, per-day for the 7d windows (Codex derives the count from the actual window duration). Divider lines use the border colour so they read across both filled and empty track. - Highlight the segment the user is currently in (today / this hour) with a translucent band derived from text_primary, so it adapts to light/dark. - Surface over-pace state directly: the fill up to the pace marker is the on-budget portion; usage beyond it is drawn as overage in warning/critical. The percentage text now reflects the worse of absolute-vs-cap and pace, and a "Slow down to last the period" / "Ahead of pace" line appears when ahead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
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
Makes the Claude and Codex usage popovers show whether you're in line with your rate limits — not just how full the bar is. Three layered cues:
Per-hour / per-day grid. Each usage bar is split into time segments — per-hour for the 5h session window, per-day for the 7d windows. Codex derives the segment count from the window's actual duration (capped so thin bars don't get crowded; sub-hour windows get no grid). Dividers use the border colour so they read over both the filled and empty parts of the track.
Current-segment highlight. The segment you're currently in (today / this hour) gets a translucent band derived from
text_primary, so it lightens on dark themes and darkens on light ones.Over-pace warning. Previously the bar only changed at 80%+ absolute. Now:
Notes
Test plan
cargo build— both crates compilecargo clippy— cleancargo test— all pass (addedsegments_for_windowunit test in Codex)🤖 Generated with Claude Code