Fix release profile, Devin percent scale, and window alert coverage - #201
Conversation
These changes were already in the working tree; they are split out here so the pace and Cursor work lands on a reviewable base. - Move the release profile to the workspace root. Cargo only reads profiles from there, so `rust/Cargo.toml` held a block cargo ignored and warned about on every build: shipped binaries had no LTO, no symbol stripping, and 16 codegen units. `panic = "abort"` is deliberately not carried over, since it has never applied to a shipped build and would turn a panic in a background refresh into an immediate process kill. - Resolve Devin's percent scale across all reported windows at once. A single value cannot say whether `0.23` means 23% or 0.23%, so a response holding `0.4` beside `32` now reads the `0.4` as 0.4% instead of rescaling it to 40%. - Let a model pool raise usage alerts alongside the session and weekly windows. Claude's Opus allowance could sit at 99% in silence. Monthly windows stay out on purpose: crossing a threshold mid-cycle is normal there, not news. - Key threshold alerts by cadence rather than slot, so a promoted weekly window is never reported as a session. - Taskbar flyout: give the strip marker the right edge so chips line up across rows.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 54 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 selected for processing (13)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ceiling | c66156b | Commit Preview URL Branch Preview URL |
Aug 05 2026, 01:29 AM |
There was a problem hiding this comment.
Pull request overview
This PR factors out foundational changes for upcoming usage/alert improvements by (1) fixing where Cargo release profiles are defined so shipped binaries get the intended release optimizations, (2) correcting Devin’s percent-scale interpretation across windows, and (3) expanding/solidifying alert + history/run window identity so “model” and third windows behave consistently (including OpenCode Go label/id migrations) in the Tauri desktop app.
Changes:
- Move
[profile.release]configuration to the workspace rootCargo.toml(and remove the ignored per-crate profile block). - Normalize Devin usage percentages by detecting fraction-vs-whole scale once per response; add targeted tests.
- Extend alert/window identity handling to include model pools and correctly key windows by cadence/identity (plus OpenCode Go label/id alignment across UI + persisted history/run records).
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
Cargo.toml |
Defines the workspace-level release profile so Cargo actually applies LTO/strip/codegen-units settings to release builds. |
rust/Cargo.toml |
Removes the previously-ignored [profile.release] block from the rust/ crate manifest. |
rust/src/providers/devin/mod.rs |
Detects percent scale across windows per response; adds tests for mixed-scale payloads and used/limit fallback behavior. |
rust/src/providers/opencodego/mod.rs |
Updates OpenCode Go’s session label to “Rolling (5h)” to reflect the actual 5-hour window semantics. |
rust/src/notifications.rs |
Allows usage toasts for the "model" window key (in addition to session/weekly) and adds a regression test. |
apps/desktop-tauri/src-tauri/src/commands/providers.rs |
Refactors threshold alert planning to consider tertiary/model windows and stabilize keys (cadence-based plus explicit "model"). |
apps/desktop-tauri/src-tauri/src/capacity_events.rs |
Prevents model/tertiary cadence collisions from overwriting core windows in the observed-windows map. |
apps/desktop-tauri/src-tauri/src/usage_history.rs |
Uses tertiary label when present for window ids/labels; bumps store version and migrates OpenCode Go historical ids/labels to keep chart series continuous. |
apps/desktop-tauri/src-tauri/src/quota_run_history.rs |
Aligns tertiary labeling with usage history and prevents window-id collisions (e.g., model vs weekly) from overwriting runs. |
apps/desktop-tauri/src/lib/capacityPresentation.ts |
Generalizes “pinned companions” logic so certain providers always show defining companion lanes (now including OpenCode Go). |
apps/desktop-tauri/src/lib/capacityPresentation.test.ts |
Adds a glance-meter test ensuring OpenCode Go shows weekly + monthly beside rolling. |
apps/desktop-tauri/src/surfaces/TaskbarFlyout.tsx |
Reorders chips in the provider topline so reset credits sit by the name and the strip marker can align consistently. |
apps/desktop-tauri/src/styles.css |
Adjusts flyout layout rules to keep chip alignment stable and right-align the reset column for consistent meter rows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #191. > I have reached 100% of my plan and now just seeing this 100% and didn't find a way to view the overdraft meter (preferably not only in % but also in $). Stacked on #201. Review the second commit. ## What was wrong On-demand is the only Cursor lane that bills real money, and it had three ways to go missing: 1. **No dollars anywhere to put.** `RateWindow` is a percentage plus reset metadata, so a metered lane could not carry currency at all. `CostSnapshot` is one slot per provider and cannot describe individual windows. 2. **Dropped in the `overall` branch.** `individual.on_demand` was only read when a `plan` object was present, so accounts reporting `overall` lost the overdraft meter entirely. 3. **Dropped when uncapped.** Deriving a percentage needs a denominator. On-demand enabled with real spend but no cap produced no meter, and the spend went on the floor. ## Changes - Add an optional `WindowAmount` to `NamedRateWindow`, plumbed through the Tauri bridge to `MetricRow`. Any provider with a dollar-denominated lane gets this. - Read `individual.on_demand` in the `overall` branch, with the same team fallback as the plan branch. - Report uncapped on-demand spend as an explicit non-metering window instead of inventing a percentage. - Label on-demand cost `On-demand` rather than folding it into a generic `Monthly`. ## Deliberately not included Cursor's `plan.breakdown` carries a much larger figure (~$254 on my account). An exported usage report shows every such event as `Included` or `Free` with **no charge**, so that number is usage metered at internal rates, not money owed. Putting it in a cost card would tell users they owe hundreds of dollars when they owe nothing. Cursor is also mid-migration from dollar-denominated usage to tokens, so those cents fields are on their way out. ## Verification Against a live Cursor account the on-demand lane now reads `$0.00 of $1.00` against a $1 cap, which is the only real-money figure on that account. 796 rust, 473 tauri, 353 vitest, clippy clean. --------- Co-authored-by: tsouth89 <tsouth89@users.noreply.github.com>
Docs only. 1.5.23 was built but never published, so it shouldn't stand as its own changelog section — nobody can install it, and a reader upgrading from 1.5.22 would have to stitch two entries together to work out what they actually got. Everything is folded into a single 1.5.24 entry, grouped Added / Fixed / Internal, noting that it supersedes the unreleased 1.5.23. It also picks up the release-profile and provider fixes from #201, which shipped in this window with no user-facing entry. Contents now covered: the expected-usage marker, the tray pace verdict, opt-in predictive warnings, Cursor on-demand in dollars (and no longer filtered out of the app window), removal of the always-0% Promotional meter, the Opus model-pool alert fix, cadence-keyed threshold alerts, the Devin percent-scale fix, LTO/strip release builds, and the cost-scanner env race. --------- Co-authored-by: tsouth89 <tsouth89@users.noreply.github.com>
Groundwork split out of the #190 / #191 work so each lands on a reviewable base. These changes were already sitting in the working tree.
Release profile
Cargo only reads profiles from the workspace root. They lived in
rust/Cargo.toml, where cargo ignored them and said so on every build, so shipped binaries had no LTO, no symbol stripping, and 16 codegen units.panic = "abort"was in that ignored block and is deliberately not carried over. It has never actually applied to a shipped build, and enabling it would turn a panic in any background refresh task into an immediate process kill.Devin percent scale
Devin reports each window as either whole percentages (
23= 23%) or fractions (0.23= 23%), and a single value cannot tell them apart. The scale is now resolved once across every reported window, so a response holding0.4beside32reads the0.4as 0.4% instead of rescaling it to 40%.Alert coverage
primaryis never reported as a session.Verification
793 rust, 471 tauri, 351 vitest, clippy clean.