Skip to content

Add API stats and historical chart navigation - #4

Merged
ssh4net merged 1 commit into
ssh4net:masterfrom
woffko:agent/api-stats-history-scrollbars
Jul 25, 2026
Merged

Add API stats and historical chart navigation#4
ssh4net merged 1 commit into
ssh4net:masterfrom
woffko:agent/api-stats-history-scrollbars

Conversation

@woffko

@woffko woffko commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an APISTAT screen 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 styles
  • expand USAGE charts to the complete indexed local history while keeping the dashboard summaries scoped to the recent 7/30-day windows
  • add matching day/week/month grouping and LOCAL/UTC zone controls to local usage
  • add wheel, arrow, PageUp/PageDown, Home/End, and mouse-driven chart navigation
  • add visible ASCII scrollbars with spacing from chart content, clickable arrows/tracks, draggable inverted-space thumbs, and responsive wider vertical columns
  • persist incremental indexing in SQLite, hide partial values until the backlog is complete, and selectively rebuild stale fork rows through cache schema v6
  • harden fork/replay accounting with parent cumulative baselines and preserve the first real child run after the copied replay prefix
  • keep cross-month ISO week labels readable and document the distinction between local session-log estimates and server-owned UTC buckets

Why

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 passed
  • cargo clippy --all-targets -- -D warnings -A clippy::collapsible-match -A clippy::redundant-guards
  • bash scripts/check-ascii.sh
  • git diff --check
  • cargo build --release --locked
  • local installation and comon --version smoke check

@ssh4net
ssh4net merged commit b46c0f5 into ssh4net:master Jul 25, 2026
1 check passed
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.

2 participants