Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
66c7d2a to
a1812e6
Compare
ApprovabilityVerdict: Needs human review This PR modifies billing/usage cost presentation logic, changing how costs are displayed when API rate matching is incomplete. Changes to billing-related display warrant human review to ensure the new presentation (using '—' and '≥' indicators) accurately conveys pricing information to users. You can customize Macroscope's approvability policy. Learn more. |
a1812e6 to
ddbc724
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ddbc7240621222df81c9f9fa64c03a77de65fe38. Configure here.
ddbc724 to
9920f0e
Compare
Dismissing prior approval to re-evaluate 9920f0e
|
Closing as part of the open-PR backlog sweep (wave 1). Reason: Unpriced-cost UI targets a usage page that has since been rewritten Reopen if this is still wanted and you’re willing to rebase onto current |

What Changed
—and mixed priced/unpriced usage as a lower bound (≥$X) instead of an exact$0.00or$X.Why
The aggregation layer already knows when a model has no matching API rate, but the UI formatted that missing price as zero. That made unknown cost look like a genuine free result and made mixed totals look exact. This keeps the existing API-rate estimate model while making its coverage honest.
Fixes #5799.
Focused verification:
@t3tools/weband@t3tools/mobiletypechecksUI Changes
All screenshots use isolated synthetic transcripts and rates.
Web / desktop
Mobile summary and providers
Mobile model breakdown
Checklist
Note
Distinguish unpriced usage from zero cost across web and mobile usage views
unpricedShareto provider, model, day, and per-provider-day totals inusageMerge.ts, tracking the fraction of records with no matching API rate.formatCostEstimateinusageFormat.tsto render—for fully unpriced,≥$for partial, and plain USD for fully priced costs.UsagePage.tsx,UsageProviderChart.tsx) and mobile (UsageRouteScreen.tsx) to use coverage-aware formatting throughout headlines, chart tooltips, provider rows, and breakdown tables.≥and—explanations) inline when any unpriced records are present.$0.00for unpriced models or providers now displays—or≥$X.XXdepending on pricing coverage.Macroscope summarized 9920f0e.
Note
Low Risk
Presentation-only changes to usage cost formatting with shared helpers and broad test coverage; no auth, billing, or aggregation logic beyond exposing existing unpriced record counts.
Overview
Usage cost UI no longer treats missing API rates as $0.00 or exact totals when coverage is incomplete.
Shared:
formatCostEstimatereturns—when everything is unpriced,≥$…when only part of usage has rates, and unchanged dollar amounts when fully priced.mergeUsagenow surfacesunpricedShareon providers, models, daily rows, and per-provider day cells so clients can format honestly.Web: Headlines, provider rows, model/day breakdowns, and chart hovers use those rules; partial windows get (partial) labels, a short cost guide, and “share of priced cost” where relevant. Missing provider-days show — (no activity), not priced zero.
Mobile:
presentUsageCost/presentUsageCostSharemirror the same copy for the chart card, providers, and models, including the cost guide when any usage is unpriced.Regression tests cover all-priced, mixed, and fully-unpriced cases on shared, web, mobile, and chart helpers.
Reviewed by Cursor Bugbot for commit 9920f0e. Bugbot is set up for automated code reviews on this repo. Configure here.