Skip to content

Match Amp card to the Mac - #812

Merged
Finesssee merged 1 commit into
mainfrom
fix/parity-amp
Oct 11, 2026
Merged

Finesssee merged 1 commit into
mainfrom
fix/parity-amp

Conversation

@Finesssee

@Finesssee Finesssee commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Match the Amp card to the Mac (CodexBar 0.70.0):

  • The free-tier bar title is "Amp Free" (was "Usage"); the fallback secondary label is "Balance" (was "Monthly").
  • No pace line under the Amp Free bar. Pace is kept only for a subscription window (known length and a "renews in ..." reset), as upstream does. The result is marked with_non_authoritative_pace() otherwise.
  • No "Status Page" menu row (upstream statusPageURL: nil).
  • Legacy subscriptions label their bars "Other usage" / "Orb usage".
  • Tier subscriptions get a "Monthly allowances" section: "Agent $18.57" and "Orb 732h" (secondary "a1.small-equivalent hours"; "< 1h" under one hour). The tier bar reset text is the plain "renews in 27 days"; the "· $18.57/$20.00 remaining" suffix moved into those rows.

Root cause

  • AmpProvider metadata used generic labels and a status page URL where upstream AmpProviderDescriptor has "Amp Free" / "Balance" and no status page.
  • The fetch result always allowed pace; upstream's descriptor pace closure only paces windows with windowMinutes and a "renews in " reset.
  • Allowance amounts were appended to the reset text instead of being upstream's "Monthly allowances" rows.

Mac reference

  • Sources/CodexBarCore/Providers/Amp/AmpProviderDescriptor.swift: labels, statusPageURL, pace rule, primary/secondary labels.
  • Sources/CodexBarCore/Providers/Amp/AmpUsageSnapshot.swift: "Monthly allowances" rows (Agent dollars, Orb whole hours, "< 1h").

Not changed (after card PR 3)

  • Credits rows styling (CREDITS caps heading, right-aligned values) is card rendering.
  • Pace is a whole-result flag on Windows. A subscriber who also has an Amp Free allowance keeps pace on every lane, so the Amp Free extra lane can still show a pace line that the Mac (per-window rule) would not. Fixing that needs per-lane pace in the shared bridge; the pack does not exercise it.
  • The subscription and allowance changes are covered by tests only; the parity pack is free tier, so the capture shows the label, pace and status-page changes.

Tests

  • New module mac_parity_tests: metadata_matches_upstream_descriptor, free_tier_has_no_pace, subscription_windows_keep_pace, pace_rule_needs_window_length_and_renewal_text, tier_reports_monthly_allowance_rows, orb_under_one_hour_reads_less_than_one, legacy_subscription_has_no_allowance_rows.
  • Updated: the legacy Megawatt test asserts "Other usage" / "Orb usage"; the invalid-tier test expects "renews in 27 days".

Commands

  • cargo fmt --all: ok
  • cargo test --manifest-path rust/Cargo.toml: pass (3809 passed, 0 failed, 1 ignored)
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings: pass
  • cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml: pass (637 passed)
  • cargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings: pass
  • Frontend files are unchanged, so pnpm test / pnpm run build were not rerun.

Proof

  • Before: W:/mac-parity/win-runs/Amp@followups-main/panel.png (main 44d5de3): "Usage 62% left", "25% in reserve · Lasts until reset", "Usage details", "Status Page".
  • After: W:/mac-parity/win-runs/Amp@parity-amp/panel.png (this branch f53288c, built with build-proof.sh): "Amp Free 62% left", no pace line or disclosure, no Status Page row.
  • Mac: W:/mac-parity/scenarios/providers/Amp/card.png.

Found by the Mac-parity rig (pack Amp).

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: nesszer/Win-CodexBar/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a26788bf-f661-4b58-ad8f-219105d0adee

📥 Commits

Reviewing files that changed from the base of the PR and between 44d5de3 and f53288c.


📒 Files selected for processing (3)
  • rust/src/providers/amp/display.rs
  • rust/src/providers/amp/mod.rs
  • rust/src/providers/amp/subscription.rs

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Finesssee
Finesssee merged commit 4d6b60d into main Oct 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant