Conversation
Adds the Raycast AI credits provider (cookie-backed frontend_api/current_user/ai_credits), its cookie-source options, icons, catalog registration, and docs.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
Thermo-nuclear reviewScope: head 4c68ec9 against the Fix in this review:
Left as-is, with reasons:
No UI-visible change comes from the fixes. |
Thermo-nuclear review follow-upReviewed by Codex gpt-6-luna (xhigh); verified and validated by Claude. Fixes landed at d16c04d. Fixed:
Left out:
Commands run: |
CUA proofBuild commit: Blocker found while building (PR code, not proof-only): unpatched head fails Proof-only patches (uncommitted, restored afterwards):
Commands:
Screenshots (local, not committed), |
Summary
Adds the Raycast AI credits provider (upstream CodexBar 0.67.0). It reads monthly credits from the signed-in
www.raycast.comsession and shows credits left, plan, and renewal date.Upstream reference
frontend_api/current_user/ai_credits.Ported
ProviderId::Raycast(raycast, aliasraycast-ai, cookie domainwww.raycast.com, brand#FF6363), factory arm, no-token-account entry.rust/src/providers/raycast/: request (Cookie,Accept,Origin,Referer, ChromeUser-Agent), parse rules (numeric or numeric-string amounts; negative/invalid amounts, bad dates, non-object funding_subscription are parse failures), cookie filtering (only__raycast_sessionandcsrf_token, exact host first), classified errors (missing/expired session, 403, 429, 5xx).Deferred / caveats
credits/detailsare not fetched.toFixed.Validation
cargo fmt --all: clean.cargo clippy --workspace --all-targets -- -D warnings: pass.cargo test -p codexbar raycast: 29 passed.cargo test -p codexbar(full): 2189 passed, 0 failed, 1 ignored.cargo test -p codexbar-desktop-tauri: 464 passed, 1 failed (commands::tests::bootstrap_payload_exposes_every_provider_variant: catalog 80 vs 79 active). That test callsget_bootstrap_state(), which loads this machine's real settings, so a deprecated provider that is enabled locally adds one catalog entry. It is environment-dependent and unrelated to the Raycast change; the three new Raycast shell tests pass.pnpm test(vitest): 67 files, 402 tests passed.pnpm run build: pass.Affected areas
Shared:
ProviderId, provider factory, token accounts,providers/mod.rs(newbrowser_cookies_from_browserhelper). Shell: cookie-source options. Frontend: icon registry, tray dashboard set, settings source hint.UI proof
Pending: coordinator will capture CUA proof on a fresh build. This PR is a draft for that reason.