fix(status-bar): keep Antigravity usage visible - #7878
Conversation
📝 WalkthroughWalkthroughThis PR adds "antigravity" as a new provider across the codebase. Shared types (ProviderRateLimits, RateLimitState, StatusBarItem, PersistedUIState) and default status bar items were extended. The main-process rate-limit service and RPC UI schema now track antigravity state. Renderer changes include StatusBar rendering, provider icon/tooltip support, visibility/gating logic, usage-empty-state checks, a new usage-toggle search catalog module, and store/UI hydration adding a one-shot default-on migration flag. Localization strings for antigravity were added across en, es, ja, ko, and zh locale files, alongside corresponding test updates. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/status-bar/StatusBar.tsx (1)
1848-1857: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDuplicate computation of the Antigravity checked+detected condition.
antigravityUsageConfigured(Lines 1848-1850) andshowAntigravity(Lines 1880-1883) both independently computestatusBarItems.includes('antigravity') && isStatusBarItemAvailable('antigravity', detectedAgentIds). SinceshowAntigravityalready requiresvisibleAntigravity !== null, which in turn depends onantigravityUsageConfiguredviagetVisibleUsageProvider, the second occurrence is redundant and could just reuse the variable.♻️ Proposed simplification
const showAntigravity = visibleAntigravity !== null && - statusBarItems.includes('antigravity') && - isStatusBarItemAvailable('antigravity', detectedAgentIds) + antigravityUsageConfiguredAlso applies to: 1880-1883
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a046aebf-441d-4d7d-ab52-42ed2bf20c27
📒 Files selected for processing (31)
src/main/rate-limits/service.tssrc/main/runtime/rpc/methods/client-ui.test.tssrc/main/runtime/rpc/methods/client-ui.tssrc/renderer/src/components/settings/AppearancePane.test.tsxsrc/renderer/src/components/settings/AppearanceWindowSidebarSection.tsxsrc/renderer/src/components/settings/appearance-status-bar-search.test.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/settings/appearance-status-bar-usage-toggles.tssrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.test.tssrc/renderer/src/components/status-bar/status-bar-agent-gating.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.tssrc/renderer/src/components/status-bar/tooltip.test.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.test.tssrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/store/slices/rate-limits.test.tssrc/renderer/src/store/slices/rate-limits.tssrc/renderer/src/store/slices/ui.test.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/types.ts
|
Closed in favor of #7996 (combined Antigravity + Grok usage status). |
Summary
antigravityto rate-limit state shape, status-bar defaults/migrations, runtime UI RPC schema, provider icons/display copy, and Appearance status-bar toggles.Fixes #7809
Test Plan
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts src/renderer/src/store/slices/rate-limits.test.ts src/shared/rate-limit-types.test.ts src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts src/renderer/src/store/slices/ui.test.ts src/renderer/src/components/settings/appearance-status-bar-search.test.ts src/main/runtime/rpc/methods/client-ui.test.ts src/renderer/src/components/status-bar/usage-error-copy.test.ts src/renderer/src/components/status-bar/tooltip.test.ts src/renderer/src/components/settings/AppearancePane.test.tsxpnpm run typecheckpnpm run lintNote: local commands emit the existing engine warning because this shell uses Node v26.4.0 while package.json wants Node 24.