You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pace polish: per-provider pace capability, Copilot tray tint, Notion Monthly - #832
Pace polish from the 2026-10-12 Mac parity decisions. Four scoped commits:
Per-provider pace capability (c00b43e01). Each provider that opts in declares PACE_CAPABILITY in its own module (providers/<name>/mod.rs), as the upstream provider descriptors do. provider_factory::pace_capability dispatches with an exhaustive match, so a new ProviderId without an arm doesn't compile. ProviderId::pace_capability now delegates to it. Nothing changes for users.
Amp: pin tests, no behaviour change (2da288cdf). This corrects the earlier summary. Upstream does not use a flat 30 days for Amp. AmpUsageSnapshot.swift:121-131 (v0.69 to v0.73) sizes a renewing window from the period span, or else uses calendarMonthResetWindow.resolvedResetWindowForPace, which is the real calendar month (28 days for a February cycle). Windows amp/subscription.rs already does the same. The new test legacy_renewal_window_uses_the_real_calendar_month_length pins it.
Copilot: no tray pace colour (6554f158b). The Mac skips menu-bar pace for a non-Codex window without a length (UsageStore+HistoricalPace.swift:47, guard window.windowMinutes != nil). Before this change, Windows fell back to a 7-day length for snapshot.pace and tinted Copilot's tray icon. PaceSnapshot.window_has_length is a typed flag (not serialized). tray_pace_color filters on it, and the card's pace line is unchanged.
Notion: "Monthly" label (bde474e54). The Mac labels it weeklyLabel: "Monthly" (NotionProviderDescriptor.swift:32). Notion now sets secondary_label_key = ProviderLabelMonthly, which crosses the bridge as secondaryLabelKey. The card prefers that key, and other monthly lanes keep the shared "30-Day" label.
src-tauri/src/tray_presentation_tests.rs: tray_pace_tint_skips_pace_from_a_window_without_a_length. This is the RGBA-level check; tray pixels can't be captured by the proof rig.
Tray tint for other lengthless windows. The tint is now skipped for every provider whose tray window has no length, not only Copilot. That matches the Mac's generic guard. A rough grep suggests this also affects bedrock, claude (lengthless lanes only), codebuddy, doubao, kilo, kiro, manus, mistral, openaiapi, opencode, opencodego, qoder, sub2api, synthetic, v0, warp and zed. Default: follow the Mac. The card pace line is untouched.
Notion label scope. Only Notion says "Monthly". Other providers' monthly lanes keep the shared "30-Day" key. Default: the smallest change.
Summary by CodeRabbit
Bug Fixes
Pace indicators no longer tint tray icons when a usage window has no defined duration.
Corrected pace calculations for monthly subscription windows to reflect their actual calendar length.
Improvements
Monthly usage lanes now display provider-appropriate labels, such as “Monthly” or “30-Day.”
Improved pace handling across providers with different reset schedules and window formats.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
📝 Walkthrough
Walkthrough
Provider pace capabilities are declared in provider modules and dispatched through the factory. Pace snapshots now expose whether the selected window has a length, which affects tray tint. Secondary-window locale keys pass through snapshots and can determine menu-card labels.
Changes
Pace reporting
Layer / File(s)
Summary
Provider pace capability lookup rust/src/core/pace_capability.rs, rust/src/core/provider.rs, rust/src/core/provider_factory.rs, rust/src/providers/*/mod.rs
Provider modules declare pace capabilities. The factory maps provider IDs to these declarations or to UNSUPPORTED. Amp tests cover 28-day and 31-day renewal windows.
Pace window metadata and tray tint apps/desktop-tauri/src-tauri/src/commands/bridge.rs, apps/desktop-tauri/src-tauri/src/commands/bridge/pace.rs, apps/desktop-tauri/src-tauri/src/tray_presentation*
Pace snapshots record whether the selected primary window has a length. Tray tint is skipped when the pace window has no length. Tests cover lengthless and length-bearing windows.
Usage snapshots can carry a secondary label key. The bridge passes it through when a secondary window exists. Notion sets ProviderLabelMonthly for its secondary billing window.
Menu cards translate secondaryLabelKey when present and otherwise use the existing label fallback. Tests verify the distinct Notion and Augment monthly labels.
The Notion Monthly label has a matching translation key, and no actionable merge-blocking risk is established. Merge after normal checks.
Pre-merge checks | 7 | 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Title check
The title accurately summarizes the main changes, but it is a descriptive phrase rather than the required short imperative summary.
Rewrite the title as an imperative, such as "Polish per-provider pace, Copilot tray tint, and Notion monthly labels".
✅ Passed checks (7 passed)
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Provider Data Stays Siloed
No provider-data silo violation is introduced. UsageSnapshot::secondary_label_key carries only a locale key, and ProviderUsageSnapshot::from_fetch_result copies it from the same provider snapshot;…
Secrets Handled Safely
PASS. The reviewed diff adds only pace metadata, locale-key fields, provider capability constants, tests, and fixture initialization. The new bridge fields contain booleans, numeric pace data, or the …
No Unapproved Dependencies
The pull-request diff changes only Rust and TypeScript source and test files. It does not modify any Cargo.toml or package.json, add an npm/yarn lockfile, or change the pnpm packageManager version. No…
Ui Changes Include Windows Proof
The PR changes visible UI behavior in MenuCard.tsx and tray presentation. The description includes a fresh-build proof note: the author rebuilt a debug app from the reviewed head, drove the proof ri…
Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
🔧 React Doctor (0.9.14)
Project "apps/desktop-tauri" is not a workspace project or a directory. Available projects: desktop-tauri
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.
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
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.
Summary
Pace polish from the 2026-10-12 Mac parity decisions. Four scoped commits:
c00b43e01). Each provider that opts in declaresPACE_CAPABILITYin its own module (providers/<name>/mod.rs), as the upstream provider descriptors do.provider_factory::pace_capabilitydispatches with an exhaustivematch, so a newProviderIdwithout an arm doesn't compile.ProviderId::pace_capabilitynow delegates to it. Nothing changes for users.2da288cdf). This corrects the earlier summary. Upstream does not use a flat 30 days for Amp.AmpUsageSnapshot.swift:121-131(v0.69 to v0.73) sizes a renewing window from the period span, or else usescalendarMonthResetWindow.resolvedResetWindowForPace, which is the real calendar month (28 days for a February cycle). Windowsamp/subscription.rsalready does the same. The new testlegacy_renewal_window_uses_the_real_calendar_month_lengthpins it.6554f158b). The Mac skips menu-bar pace for a non-Codex window without a length (UsageStore+HistoricalPace.swift:47,guard window.windowMinutes != nil). Before this change, Windows fell back to a 7-day length forsnapshot.paceand tinted Copilot's tray icon.PaceSnapshot.window_has_lengthis a typed flag (not serialized).tray_pace_colorfilters on it, and the card's pace line is unchanged.bde474e54). The Mac labels itweeklyLabel: "Monthly"(NotionProviderDescriptor.swift:32). Notion now setssecondary_label_key = ProviderLabelMonthly, which crosses the bridge assecondaryLabelKey. The card prefers that key, and other monthly lanes keep the shared "30-Day" label.Tests added
rust/src/providers/amp/mod.rs:legacy_renewal_window_uses_the_real_calendar_month_lengthsrc-tauri/src/commands/bridge/pace.rs:copilot_provider_pace_is_marked_lengthless_for_the_trayprovider_pace_from_a_window_with_a_length_keeps_the_tray_tintsrc-tauri/src/tray_presentation_tests.rs:tray_pace_tint_skips_pace_from_a_window_without_a_length. This is the RGBA-level check; tray pixels can't be captured by the proof rig.src-tauri/src/commands/bridge.rs:secondary_label_key_crosses_the_bridge_only_when_the_provider_sets_itMenuCard.test.tsx: "names Notion's billing lane Monthly while other monthly lanes keep 30-Day"Commands (run on head bde474e)
cargo fmt --all -- --checkcargo test --manifest-path rust/Cargo.tomlcargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warningscargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.tomlcargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warningspnpm --config.verify-deps-before-run=false testpnpm exec tsc --noEmitpnpm run buildProof
W:/mac-parity/report/lane-r/pr1/Notion/{panel.png,result.json,mac-card.png}W:/mac-parity/report/lane-r/pr1/Copilot/{panel.png,result.json,mac-card.png}W:/mac-parity/report/lane-r/pr1/checks.txtOpen questions (default chosen)
Summary by CodeRabbit
Bug Fixes
Improvements