Repository navigation
fix(dashboard): always show time-range rows at 0 and disabled Extra Usage as no data - #1555
Merged
Merged
Conversation
…sage as no data Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 72fadeae-d275-45ae-88e1-1a243b8797be) |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the full diff and traced the zero-value fallbacks through history aggregation, dashboard visibility, Priority classification, and CLI export.
- Display fallbacks: Unreported time ranges and Claude, Cursor, and Copilot Extra Usage now display zero in their declared units without overriding reported values or changing balance behavior.
- History details: Empty windows receive breakdowns for the existing no-data popup, and OpenRouter uses the shared fallback instead of seeded totals.
- Coverage and documentation: Regression tests cover units, visibility, pinning, disabled Extra Usage, and failed history reads; documentation describes the changed behavior. GitHub's Build and Test check passed. I did not run the macOS suite locally because this runner is Linux.
gpt-6-astra | 𝕏
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.

TL;DR
Time-range rows (Today, Yesterday, This Week, This Month, Last/Prior 30 Days) now always show. When the provider reports nothing for a range, the row reads 0 in its usual unit and its popup says " didn't report any data for this range." When Claude, Cursor, or Copilot reports Extra Usage as off, that row now shows too: Claude and Cursor read
$0 spentwith no bar, and Copilot reads 0. The account page's switch is now the only way to hide one of these rows.What was happening
noSpend), so those rows always showed. Its Yesterday and Prior 30 Days still dropped when the activity read was empty or failed. That is why the two providers behaved differently.extra_usage.is_enabledwas false. Cursor dropped it when on-demand was off or $0, and Copilot dropped it when overage wasn't permitted.What this changes
WidgetDescriptor.unreportedValues: one shared fallback. When a snapshot has no line for a descriptor that has this fallback,WidgetDataStore.data(for:)shows it as a values row (0 in the row's units, with no bar). Every.windowhistory descriptor gets it from its own measures, so no provider needs its own patch.noSpendseeding is removed. ItslistedKeysSpendstarts from nothing and relies on the shared fallback.UsageBreakdown, even with nothing read.UsageBreakdown.isEmptyis true when nothing was reported, so the popup shows the shared empty state from fix(openrouter): drop BYOK from saved rows, share one popup empty state, name every account #1552.extra, CursoronDemand, and Copilotextrause.showingWhenUnreported(...), so a disabled Extra Usage reads 0.Heads-up
No new rows and no new positions. Every row this PR now shows already existed in
widgetDescriptorsand keeps its place. Two cases now show where they used to hide:Robin may want those two hidden by default instead. That is a defaults question for Robin.
Not changed: open balances still follow their existing rules. These are ChatGPT Extra Usage credits (hidden at a $0 balance by an explicit rule from feat(dashboard): rebuild the panel around Priority and All Usage #1535), Devin and Ollama Extra Usage balances, and Grok's pay-as-you-go badge, which already reads "Disabled". A balance at $0 also lists under Used Up in Priority, so making those show at $0 is a separate call.
The CLI's
limitsexport still sends only what the provider reported. The zero fallback applies to the dashboard only.Tests
All run on the Mac mini (macOS 15.7.7) with
nice -n 10 script/test_quiet.sh --filter ….UnreportedRowsTestscovers five cases:$0 spentwith no bar and stays on the card.Screenshots
I made these offscreen on the Mac mini with an uncommitted render test, from the same fixtures before and after. Before this change, an unreported range had no row, so it had no popup either.
ChatGPT, no use today. Before: Today is missing. After:



0 tokens.Today popup after:
OpenRouter, empty activity read. Before: Yesterday and Prior 30 Days are missing. After: every range is $0.



Yesterday popup after:
Claude, Extra Usage disabled. Before: the row is hidden. After:


$0 spentwith no bar.Account page (ChatGPT, no data read). It lists Today, Yesterday, and Last 30 Days, each on by default. This page was the same before. The switches look grey only because the render window was never key.

Note
Medium Risk
Changes central display logic in
WidgetDataStoreand history aggregation across many providers, which can affect what users see after failed refreshes though behavior is intentional and well-tested.Overview
Dashboard metrics that used to disappear when a provider had nothing to say now stay visible at 0, with account-page switches as the only way to hide them.
Shared fallback:
WidgetDescriptor.unreportedValuesplusWidgetDataStore.data(for:)synthesize a values row when the snapshot has no line. History window descriptors get zero fallbacks from their usual measures (e.g.$0 · 0 tokensfor Cursor). Claude, Cursor, and Copilot Extra Usage use.showingWhenUnreported(...)so disabled or off plans show$0 spentor0instead of omitting the row.History / breakdowns:
HistoryRow.appendstill builds usage breakdowns even when no line is appended, andUsageBreakdownno longer requires totals—empty ranges drive the existing “didn’t report any data” popup. OpenRouter drops the oldnoSpendpre-seed and relies on the same fallback (notably standard keys now show Yesterday and Prior 30 Days at$0).Docs and CHANGELOG describe the behavior; tests add
UnreportedRowsTestsand update history/metrics expectations for zero rows on failed or quiet reads.Reviewed by Cursor Bugbot for commit f031ea1. Bugbot is set up for automated code reviews on this repo. Configure here.