Repository navigation
perf(usage): the Usage page shows numbers in under a second and dims only what is still loading - #17147
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a large production behavior change introducing persistent Cursor account caching, background refresh coordination, concurrent scanning, shared query-runtime changes, and new stale/provisional Usage-page rendering. Its broad runtime and data-persistence impact goes beyond a self-contained performance fix and warrants human review. Notes:
No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
…only what is still updating Imported from #16376 (5 commits squashed onto current main): - perf(usage): the usage page loads in a fraction of a second and dims only what is still updating - refactor(usage): simpler loading states and Cursor cache - fix(usage): cache writes finish before the usage service shuts down - fix(usage): address review findings - fix(web): a window that fails everywhere keeps the last usage on screen Conflicts with main resolved: Antigravity scan cache (#17139) and the Usage provider filter (#16970). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Cursor paging goes back to main's ordered reader. The parallel `mapBounded` pager kept assigning pages after a failure; #17140 owns that speedup with a smaller reader change. The `CursorAccountReader` service stays. - Hidden providers no longer add a refreshing row or mute the totals. - The period label names the period on screen while the previous one is kept. - The kept-window test now switches windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dd79348 to
23a4c36
Compare
## What's Changed * feat(providers): run Muse Code as a native provider by @t3dotgg in pingdotgg/t3code#17082 * feat(web): compact-before-send is a chip that shows the token count by @t3dotgg in pingdotgg/t3code#17127 * fix(clients): copy button is back in its old spot, before fork by @t3dotgg in pingdotgg/t3code#17137 * fix(usage): repeat usage scans no longer decode unchanged Antigravity databases by @t3dotgg in pingdotgg/t3code#17139 * fix(server): shell snapshots no longer block other database reads while decoding by @t3dotgg in pingdotgg/t3code#17141 * perf(server): ACP tool updates no longer persist a snapshot per streamed chunk by @darjss in pingdotgg/t3code#16682 * feat(web): filter the Usage page to just the providers you want by @t3dotgg in pingdotgg/t3code#16970 * fix(usage): Cursor account history loads about 4x faster by @t3dotgg in pingdotgg/t3code#17140 * fix(server): threads settle as soon as branch status sees their PR merge by @t3dotgg in pingdotgg/t3code#17148 * perf(usage): the Usage page shows numbers in under a second and dims only what is still loading by @t3dotgg in pingdotgg/t3code#17147 * fix(server): an agent can settle its own thread when its turn ends by @t3dotgg in pingdotgg/t3code#17145 * feat(web): Add provider button sits with the provider list by @t3dotgg in pingdotgg/t3code#17152 ## New Contributors * @darjss made their first contribution in pingdotgg/t3code#16682 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261008.2813...v0.0.46-nightly.20261008.2819 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261008.2819
## What's Changed * feat(providers): run Muse Code as a native provider by @t3dotgg in pingdotgg/t3code#17082 * feat(web): compact-before-send is a chip that shows the token count by @t3dotgg in pingdotgg/t3code#17127 * fix(clients): copy button is back in its old spot, before fork by @t3dotgg in pingdotgg/t3code#17137 * fix(usage): repeat usage scans no longer decode unchanged Antigravity databases by @t3dotgg in pingdotgg/t3code#17139 * fix(server): shell snapshots no longer block other database reads while decoding by @t3dotgg in pingdotgg/t3code#17141 * perf(server): ACP tool updates no longer persist a snapshot per streamed chunk by @darjss in pingdotgg/t3code#16682 * feat(web): filter the Usage page to just the providers you want by @t3dotgg in pingdotgg/t3code#16970 * fix(usage): Cursor account history loads about 4x faster by @t3dotgg in pingdotgg/t3code#17140 * fix(server): threads settle as soon as branch status sees their PR merge by @t3dotgg in pingdotgg/t3code#17148 * perf(usage): the Usage page shows numbers in under a second and dims only what is still loading by @t3dotgg in pingdotgg/t3code#17147 * fix(server): an agent can settle its own thread when its turn ends by @t3dotgg in pingdotgg/t3code#17145 * feat(web): Add provider button sits with the provider list by @t3dotgg in pingdotgg/t3code#17152 ## New Contributors * @darjss made their first contribution in pingdotgg/t3code#16682 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261008.2813...v0.0.46-nightly.20261008.2819 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261008.2819
Brings in Theo's Usage work: progressive loading with a Cursor cache and the awaitRefresh follow-up (pingdotgg#17147), the provider filter (pingdotgg#16970), faster Cursor paging (pingdotgg#17140) and the Antigravity scan cache (pingdotgg#17139). Resolution: - Contract keeps both groupByThread and awaitRefresh. - Server: upstream's parallel source scans; transcript scans still carry the account, each session's folder and sub-agent labels; attribution runs alongside the scans. - Web: statuses carry upstream's isConnected next to the offline fields; the provider filter applies before saved usage is trimmed; the page keeps the previous period on screen while a new one loads, and the explorer mutes its totals, chart, by-type section and list while figures are still coming in, and each provider row while that provider refreshes. Also fixes a Macroscope finding: a resumed Claude scan no longer replaces a session's original folder with one from later records, which could move it to another project.
The Usage page waited on every source before it showed anything. Cursor's account API alone took 19–32s, and the only sign of loading was a tiny spinner, so it was hard to tell the numbers were stale.
Takeover of #16376 by @bmdavis419, rebased onto current
main. His work is imported as one commit with his authorship. My fixes are in a separate commit.What it does (from #16376)
refreshing. The client then sends one follow-up withawaitRefreshto get the fresh Cursor numbers. Older servers ignore the flag.client-runtime. Mobile gets the server speedups and keeps its current loading state.Revisits drop from ~19s to 60–80ms. After a server restart, the page answers in ~120ms from the Cursor cache.
What I changed
Screenshots (from #16376)
Before: a small spinner after "All environments" was the only sign of loading.
Cursor still loading: only Cursor's row and models, plus the totals, are dimmed.
Every figure updating, e.g. while a new period loads:
Verification
Usage tests (248) pass. Typecheck passes in server, web, mobile, client-runtime and contracts. I did not run the app in a browser for this rebase.
Original work by @bmdavis419 with Claude Opus 5.5 in T3 Code via Claude Code. Takeover by Claude Opus 5.5 in T3 Code via Claude Code.
🤖 Generated with Claude Code