Skip to content

Show cache-read usage and quota pace in Capacity Dock - #1267

Open
ozymandiashh wants to merge 2 commits into
getagentseal:mainfrom
ozymandiashh:feat/capacity-dock-cache-pace
Open

Show cache-read usage and quota pace in Capacity Dock#1267
ozymandiashh wants to merge 2 commits into
getagentseal:mainfrom
ozymandiashh:feat/capacity-dock-cache-pace

Conversation

@ozymandiashh

@ozymandiashh ozymandiashh commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Show provider-scoped cache-read tokens in the Capacity Dock’s Today section, alongside input, output, calls and the existing cost. Known zero displays as 0; missing or incomplete historical accounting stays unknown. Cache reads are already included in cost, so this adds visibility without changing pricing.
  • Add per-window quota pace and estimated exhaustion using the existing whole-window average calculation. Captions require valid durations and fresh data; short windows retain deficit/reserve guidance without an exhaustion ETA. Four quota windows use a two-column grid to keep scope labels, reset times and estimates readable.

The JSON field is optional for compatibility with older clients and histories. Status snapshot revision 7 invalidates older cached payloads without purging daily history. No additional polling is introduced.

Testing

  • Tested against a copied real Codex session in an isolated environment: CLI Today and the direct parser both reported 11,148,288 cache-read tokens, 84 calls and one session.
  • npm test: 3,748 passed, 5 skipped, versus 3,738 passed, 5 skipped on the base revision; zero failures. Covers durable/fresh history, provider/date/config filters, known zero, incomplete legacy data and snapshot invalidation.
  • npm run build and tsc --noEmit passed.
  • Native CapacityDockDetailView render harness: 62 checks passed across 0.9×, 1× and 1.25× scales and all four dock edges; rendered layouts inspected visually.
  • Swift Testing subset: 457 tests in 55 suites passed, versus 424 tests in 53 suites on the base. Includes fresh/stale quota samples, invalid windows, layout sizing, legacy payload decoding and overlapping/cancelled refreshes. swift build --jobs 2 passed.

Local Swift validation used an isolated copy of the Swift Testing suites because this machine has Command Line Tools without XCTest. macOS CI subsequently passed the full suite: 129 XCTest tests and 457 Swift Testing tests, plus release packaging.

All 18 CI checks passed on 98ad43fe, including Windows tests and packaging (the release-only asset check is skipped).

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