Add API stats and historical chart navigation - #4
Merged
ssh4net merged 1 commit intoJul 25, 2026
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
APISTATscreen backed by the OpenAI Codex account usage service, with bars/heat views, day/week/month grouping, vertical/horizontal layouts, UTC labeling, and the existing display stylesUSAGEcharts to the complete indexed local history while keeping the dashboard summaries scoped to the recent 7/30-day windowsWhy
The previous local charts were limited by the summary window, so grouped weeks at the edge could be partial and could not be compared fairly with server data. Long timelines also had no explicit viewport or visible navigation aid. Forked Codex sessions copy replay history and cumulative token counters, which requires careful deduplication before their local totals and runs can be trusted.
The account API and local JSONL logs remain intentionally separate sources: APISTAT shows OpenAI's authoritative server aggregation, while USAGE reconstructs the locally available sessions.
User impact
Users can inspect the full available history without losing the compact dashboard summaries, compare local usage in UTC with APISTAT on the same calendar boundaries, navigate timelines using either keyboard or mouse, and see when local indexing is still in progress instead of receiving partial totals.
Validation
cargo test— 100 tests passedcargo clippy --all-targets -- -D warnings -A clippy::collapsible-match -A clippy::redundant-guardsbash scripts/check-ascii.shgit diff --checkcargo build --release --lockedcomon --versionsmoke check