Repository navigation
feat(mobile): show Antigravity quota windows on Accounts screen - #36417
ian-nocturne wants to merge 2 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3c957b4a-95f6-4208-b9c5-65d2b923c2c1
Files selected for processing: 16-
config/mobile-localization-coverage-allowlist.jsonmobile/src/components/accounts-snapshot.tsmobile/src/home/MobileHomeAccountUsageCards.test.tsxmobile/src/home/MobileHomeAccountUsageCards.tsxmobile/src/home/use-mobile-home-data.tsmobile/src/i18n/locales/de.jsonmobile/src/i18n/locales/en.jsonmobile/src/i18n/locales/es.jsonmobile/src/i18n/locales/fr.jsonmobile/src/i18n/locales/ja.jsonmobile/src/i18n/locales/ko.jsonmobile/src/i18n/locales/pt.jsonmobile/src/i18n/locales/ru.jsonmobile/src/i18n/locales/tr.jsonmobile/src/i18n/locales/zh-Hant.jsonmobile/src/i18n/locales/zh.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
5d38640c-7bca-4dc2-beed-b573807a0b6a
Files selected for processing: 2-
mobile/src/home/MobileHomeAccountUsageCards.test.tsxmobile/src/home/MobileHomeAccountUsageCards.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
-
5da50b7 to
94b53f8
Compare
…Accounts screen migration
…36417 Accounts screen migration
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
21417e0f-5a64-4f20-ae6a-b14de4aa490a
Files selected for processing: 16-
mobile/src/accounts/MobileAccountsScreen.tsxmobile/src/accounts/MobileAntigravityUsageSection.test.tsxmobile/src/accounts/MobileAntigravityUsageSection.tsxmobile/src/accounts/mobile-accounts-screen-reset-credit.test.tsmobile/src/components/accounts-snapshot.test.tsmobile/src/i18n/locales/de.jsonmobile/src/i18n/locales/en.jsonmobile/src/i18n/locales/es.jsonmobile/src/i18n/locales/fr.jsonmobile/src/i18n/locales/ja.jsonmobile/src/i18n/locales/ko.jsonmobile/src/i18n/locales/pt.jsonmobile/src/i18n/locales/ru.jsonmobile/src/i18n/locales/tr.jsonmobile/src/i18n/locales/zh-Hant.jsonmobile/src/i18n/locales/zh.json
Files skipped from review as they are similar to previous changes: 11-
- mobile/src/i18n/locales/zh.json
- mobile/src/i18n/locales/pt.json
- mobile/src/i18n/locales/de.json
- mobile/src/i18n/locales/tr.json
- mobile/src/i18n/locales/ko.json
- mobile/src/i18n/locales/ja.json
- mobile/src/i18n/locales/en.json
- mobile/src/i18n/locales/fr.json
- mobile/src/i18n/locales/zh-Hant.json
- mobile/src/i18n/locales/es.json
- mobile/src/i18n/locales/ru.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
-
94b53f8 to
67df1dc
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Minor · Clamp pre-epoch Antigravity reset timestamps to null. · accounts-snapshot.ts:181-219
mobile/src/components/accounts-snapshot.ts:181-219
Minor · Data Integrity & Integration · Quick win Clamp pre-epoch Antigravity reset timestamps to
null.
parseResetsAtaccepts any parseable date string. A date before 1970 yields a negativeresetsAt. The mobileTimestampSchemarequires a nonnegative integer. The newantigravityvalidation therefore rejects the wholeaccounts.listsnapshot.MobileAccountsScreenthen clears the snapshot and shows "Invalid accounts snapshot from host". Claude and Codex usage disappear with the Antigravity section.Return
nullfor negative values at the producer. The mobile renderer already handles null reset times.Suggested fix
function parseResetsAt(value: unknown): number | null { const text = readString(value) if (!text) { return null } const parsed = new Date(text).getTime() - return Number.isFinite(parsed) ? parsed : null + return Number.isFinite(parsed) && parsed >= 0 ? parsed : null }

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
73efeea5-b551-433d-88f2-d9da5419a648
Files selected for processing: 3-
mobile/src/accounts/MobileAccountsScreen.tsxmobile/src/accounts/mobile-accounts-screen-reset-credit.test.tsmobile/src/i18n/locales/en.json
Files skipped from review as they are similar to previous changes: 1-
- mobile/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
65255e4 to
a276260
Compare
a276260 to
93fa74b
Compare
|
Thanks for working on this! #38187 just merged and shows usage on mobile for every provider the desktop tracks, so I'm closing this in favour of it. Your work here helped shape that change. |
ELI5
The Orca desktop host already tracks Antigravity quota windows (such as 5-hour and 7-day usage per model group), and following #36520 provider quota usage lives on each desktop's Accounts screen (
MobileAccountsScreen). Previously, the mobile Accounts screen only showed Claude and Codex sections. Now it also shows your Antigravity model-group quota bars and reset countdowns right below Claude and Codex when active Antigravity usage is available.What Changed
mobile/src/components/accounts-snapshot.ts,mobile/src/components/accounts-snapshot.test.ts&config/mobile-localization-coverage-allowlist.json:rateLimits.antigravity(ProviderRateLimitsSchema.nullable().optional()) toAccountsSnapshotSchemawith provider-identity validation (provider === 'antigravity'), and added the internal validation diagnostic message tomobile-localization-coverage-allowlist.jsonalongside existing Claude/Codex diagnostics.ProviderRateLimitsSchemabucketsitems with optionalidandwindowMinutes(nonnegative) fields so zero-duration/unknown-window buckets validate cleanly.mobile/src/accounts/MobileAntigravityUsageSection.tsx,mobile/src/accounts/MobileAccountsScreen.tsx&mobile/src/i18n/locales/*.json(all 11 locales):MobileAntigravityUsageSectionand rendered it onMobileAccountsScreenbelowClaudeandCodexwheneverhasActiveProviderUsage(snapshot.rateLimits.antigravity ?? null)holds.MobileAgentIcon(agentId="antigravity"), localizedaccounts.screen.antigravityacross all 11 locale files, deduplicated React keys across colliding bucket IDs/names, and rendered per-bucketUsageBarmeters with5h/7dlabels andformatResetCountdownreset countdowns (falling back tosessionandweeklysummary windows whenbucketsare omitted).mobile/src/accounts/MobileAntigravityUsageSection.test.tsx&mobile/src/accounts/mobile-accounts-screen-reset-credit.test.ts:windowMinutes: 0) buckets, omitted/inactive Antigravity limits, colliding bucket React key disambiguation, wrong-provider rejection, andMobileAccountsScreenliveaccounts.subscriberendering.Before:
AccountsSnapshotSchemastrippedrateLimits.antigravity, andMobileAccountsScreenrendered only Claude and Codex sections.After:
AccountsSnapshotSchemavalidates optionalrateLimits.antigravity, andMobileAccountsScreenrenders localized Antigravity model-group quota bars (5h/7d) and reset countdowns when active Antigravity usage is present.Why
Following #36520 consolidating provider usage onto each desktop's Accounts screen, users orchestrating Antigravity sessions from Orca mobile need visibility into 5-hour and weekly model-group quota consumption on
MobileAccountsScreenwithout opening desktop Settings. MakingrateLimits.antigravityoptional preserves full backwards compatibility with older hosts that do not emit the field.Linked Issue
Fixes #36416
Visual Proof
Rendered the Accounts screen (
mainvs. this PR) at 390×844 dark theme (deviceScaleFactor: 2) using the mobile-web-app React Native Web + Playwright render harness against the realMobileAntigravityUsageSection,accounts-snapshot,mobile-accounts-screen-styles,mobile-theme, andmobile-i18nmodules with synthetic demo account data ([email protected], zero personal data, zero page errors, zero bridge faults). Note: local iOS Simulator Expo prebuild was skipped on this Mac because thepod(CocoaPods) CLI is not installed locally.main, Claude & Codex only)Testing
Verification performed on macOS:
pnpm --dir mobile exec vitest run src/accounts/MobileAntigravityUsageSection.test.tsx src/accounts/mobile-accounts-screen-reset-credit.test.ts src/accounts/mobile-accounts-route.test.ts src/components/accounts-snapshot.test.ts src/components/account-usage-state.test.ts(46/46 tests passed across 5 suites).pnpm --dir mobile typecheckandpnpm verify:mobile-localizationacross all 11 locale files (3727 call sites, 3394 English entriesverified).oxfmt,oxlint, and pre-commitlint-staged(oxlint+ast-grep+oxfmt) — 0 warnings, 0 errors.AI Disclosure
gpt-6.1-sol) authored the initialaccounts-snapshotschema and bucket deduplication tests.gemini-4-argon) rebased ontomainafter feat(mobile): rebuild Home around what needs you, with actions pinned at the bottom #36520, migrated the Antigravity quota display ontoMobileAccountsScreen(MobileAntigravityUsageSection), verifiedvitest,typecheck,oxlint, andverify:mobile-localization, and captured the updated Accounts screen visual proof.Review
AI review summary (
gemini-4-argon):View,Text,MobileAgentIcon,UsageBar) and Zod schema validation; behaves identically on iOS, Android, and mobile-web-app.orcadhosts becauserateLimits.antigravityis.nullable().optional().hasActiveProviderUsageand maps a small boundedbucketsarray (typically 2–3 entries) only when the Accounts screen receives host snapshot updates.mobile-accounts-screen-styles, dark/light theme tokens, bundled offlineantigravityicon,formatResetCountdown, and 11-locale translations.Provenance
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)