Mark expected usage on the bars, and unhide Cursor on-demand (1.5.24) - #205
Conversation
The pace prediction existed but never reached the app window: the verdict added in #203 lives in MenuCard, which only the tray renders. The window uses ProviderDetailView, which nothing in that change touched. - Mark where usage should be on every weekly/monthly bar, in the overview and in a provider's detail view. The marker is where the bar's edge should be right now, and it mirrors for bars that show remaining, so it reads the same either way. Overspending fills the span between edge and marker with a striped band, so the question is "how far ahead" rather than "which side of a line". - Derive it from elapsed time against the window's own duration, not from PaceSnapshot. It therefore needs no provider support and applies to every long window, instead of the one window pace is computed for. - Skip windows under 12h. A 5-hour session is not spent evenly, so a marker there would sweep across the bar and mean nothing. - Stop filtering Cursor's on-demand lane out of the detail view. It is the only Cursor lane that bills real money and now carries that money beside its bar, so 1.5.23's overdraft work can finally reach the main window. Verified by running the app against live accounts, which caught two things tests could not: `.usage-bar` collided with an existing flex component and collapsed every bar to zero width, and a red marker on an exhausted red bar was invisible. The marker and band are now drawn in the text colour.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ceiling | 168d6eb | Commit Preview URL Branch Preview URL |
Aug 05 2026, 04:53 AM |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 30 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (18)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR prepares the 1.5.24 release and makes “expected by now” pacing visible in the main (Tauri) window by overlaying a time-based marker directly on weekly/monthly usage bars. It also ensures Cursor’s On-demand lane (the only real-money Cursor lane) is no longer filtered out in the provider detail view, and surfaces its dollar amount alongside the bar.
Changes:
- Add a shared expected-usage overlay (tick marker + optional overspend band) derived from
elapsed / duration, skipping windows under 12 hours. - Unhide Cursor On-demand in
ProviderDetailViewand display its monetary amount beside the bar; update tests accordingly. - Bump versions + add release notes/changelog entries for 1.5.24.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| version.env | Bump marketing/build numbers to 1.5.24/126. |
| rust/src/locale/zh-CN.ftl | Add UsageExpectedByNow localization key (zh-CN). |
| rust/src/locale/en-US.ftl | Add UsageExpectedByNow localization key (en-US). |
| rust/src/locale.rs | Register UsageExpectedByNow in the locale key enum/macro list. |
| rust/Cargo.toml | Bump Rust crate version to 1.5.24. |
| CHANGELOG.md | Add 1.5.24 changelog entry describing the marker + Cursor on-demand visibility fix. |
| Cargo.lock | Update locked package versions for 1.5.24 crates. |
| apps/desktop-tauri/src/surfaces/ProviderDetailView.tsx | Add pace overlay to bars and remove on-demand filtering; render per-window amount. |
| apps/desktop-tauri/src/surfaces/ProviderDetailView.test.tsx | Update fixture to include on-demand window amount and assert it renders. |
| apps/desktop-tauri/src/styles.css | Add .pace-overlay* styles and required positioning for overlays. |
| apps/desktop-tauri/src/lib/expectedPace.ts | New helper for computing expected usage marker/gap based on window timing. |
| apps/desktop-tauri/src/lib/expectedPace.test.ts | New unit tests asserting overlay logic consistency across “used” vs “remaining” modes. |
| apps/desktop-tauri/src/lib/capacityPresentation.ts | Plumb optional per-window amount through non-primary window construction. |
| apps/desktop-tauri/src/i18n/keys.ts | Add UsageExpectedByNow to the frontend locale key list. |
| apps/desktop-tauri/src/components/PlanStatusCard.tsx | Render pace overlay in overview meters using localized tooltip text. |
| apps/desktop-tauri/src-tauri/tauri.conf.json | Bump Tauri app version to 1.5.24. |
| apps/desktop-tauri/src-tauri/Cargo.toml | Bump Tauri Rust crate version to 1.5.24. |
| apps/desktop-tauri/package.json | Bump frontend package version to 1.5.24. |
| .github/release-notes-1.5.24.md | Add release notes describing the marker + on-demand detail view fix. |
Suppressed comments (1)
apps/desktop-tauri/src/surfaces/ProviderDetailView.tsx:162
- This newly added amount string uses a hardcoded "of", but the app already has a localized "PanelAmountOf" key used for the same pattern in other surfaces. Using the locale key keeps the amount display translatable and consistent.
{metric.amount.formattedLimit
? `${metric.amount.formattedUsed} of ${metric.amount.formattedLimit}`
: metric.amount.formattedUsed}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Both the marker tooltip and the amount row hardcoded English in ProviderDetailView, while the same strings already had locale keys used elsewhere. Reuse UsageExpectedByNow and PanelAmountOf so the window matches the overview and does not drift from the translations.
|
Right on both counts, fixed in the latest commit. The tooltip in One knock-on: 801 rust / 375 vitest, clippy and tsc clean. |
Follow-up to #203 and #202, prepared as 1.5.24.
Why this exists
#203 put a pace verdict in
MenuCard.<MenuCardrenders in exactly one place —TrayPanel.tsx:466. The main app window isPopOutPanel, which rendersProviderDetailView, a component that change never touched. So the pace answer, and the Cursor on-demand dollars from #202, never appeared in the window most people use.The marker
Every weekly and monthly bar in the Overview and in a provider's detail view now shows where usage should be. One rule everywhere: the marker is where the bar's edge should be right now.
Overspending fills the span between edge and marker with a striped band, so it reads as a distance rather than as a line you have to decode. Bars showing remaining capacity mirror the marker, and
aheadis computed from usage rather than bar geometry so it means the same thing in both modes — pinned by a test asserting both modes agree on the same window.Derived from
elapsed / duration, not fromPaceSnapshot. That means no provider support is needed and it applies to every long window, rather than the single window pace is computed for. Windows under 12h are skipped: a 5-hour session is not spent evenly, so a marker there would sweep across the bar and mean nothing.Cursor on-demand
ProviderDetailViewfiltered it out by name:So #202's plumbing was landing correctly and being discarded at the last step. Filter removed; the On-demand row now shows with its spend beside it. (
promotionalno longer exists at all after #204.)Two bugs only running the app could find
.usage-barcollided with an existing component atstyles.css:1831, which setsdisplay: flex. My bar became a flex item, collapsed to zero width, and vanished — while the absolutely-positioned marker kept rendering, leaving markers floating with no bars. Renamed to.pace-overlay*.Neither was reachable from unit tests or a static mock.
Verification
Run against live provider accounts and screenshotted, plus 801 rust / 375 vitest, clippy clean, tsc clean, and
local-check.ps1 -All -Version 1.5.24green.One stale test updated:
ProviderDetailView.test.tsxasserted the filtered lane was absent. Its fixture now carries an on-demand window with money and asserts it renders.