Skip to content

fix(status-bar): show Antigravity's model-group pools instead of an empty segment - #24074

Merged
nwparker merged 1 commit into
mainfrom
nwparker/agy-quota-visible
Oct 1, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/agy-quota-visible

Conversation

@nwparker

@nwparker nwparker commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​123 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​123
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​16

ELI5

Stacked on #24073. Once Orca reads Antigravity's real pools, the status bar has to actually draw them — today it throws them away and shows an icon with no number.

What Changed

Before: in verbose mode the segment filtered buckets through an allowlist of three Gemini model names (Flash, Pro, 1.5 Pro) plus Cursor's pool names, then fell back to session ?? monthly. Antigravity's pools are named after model groups, so every one was filtered out; and a tier metered weekly only has no session window, so the fallback was null too. Net result for a signed-in account with an exhausted pool: an icon and nothing else.

After: Antigravity's pools render by name with their percentages, and the fallback chain includes weekly.

  • Antigravity bypasses the bucket allowlist by provider, not by name. Its group names come from the account's own tier — "Gemini Models" and "Claude and GPT models" today — so there is no list to enumerate.
  • Cursor deliberately stays name-matched. A Cursor pool Orca does not recognise is still filtered so the segment falls back to the plan total rather than showing an unlabelled row; the existing test for that behaviour is what caught my first, too-broad version of this change.
  • The verbose fallback window is now session ?? monthly ?? weekly.
  • Antigravity's pending snapshot is bucket-shaped like Gemini's and Cursor's, so the segment does not change shape when the first reading lands.

Why

This is the renderer half of #24073. Without it the main-process fix is invisible: Orca would hold a correct reading ("Gemini Models 100% used, resets in 7d") and draw nothing. The fallback chain is a latent bug on its own — any weekly-only provider hits it — and Antigravity is the first provider to have that shape.

Matching by provider rather than by adding names to the allowlist is the point: an allowlist of tier-specific group names would need editing every time Google renames a model group, and would silently blank the segment again when it happened.

Linked Issue

Refs #22511
Refs #16704

Depends on #24073.

Visual Proof

Verbose segment, rendered from the record a live agy 1.2.11 produced for an account whose Gemini pool is genuinely exhausted:

Rendered
Before (icon only — both pools filtered out, session and monthly both null)
After Gemini Models 100% used · Claude and GPT models 0% used

Live app, this branch, CDP screenshot of the real status bar (Orca dev instance nwparker/agy-quota-visible, reading fetched from the installed agy — not a fixture):

Antigravity pools in the live status bar

The rendered DOM text, read back through CDP: ["Gemini Models 100% used", "Claude and GPT models 0% used"]. On main the same account renders the Antigravity icon with no text at all.

Testing

  • pnpm test src/renderer/src/components/status-bar/ — 56 files, 407 tests, all passing.

  • 4 new tests: both pools render by name; the weekly fallback fires when a tier has no session pool; the same when buckets is absent entirely; and Gemini's experimental buckets are still filtered, so the allowlist was narrowed rather than abandoned.

  • pnpm tc:web, oxlint, pnpm run check:code-quality:changed, design-system gate — clean.

  • Fixture is the verbatim record captured from agy 1.2.11 on macOS, not an invented one.

  • I manually tested these changes locally

  • Automated tests added/updated

Review

Renderer-only. No wire change, no new state, no IPC. Cross-platform and SSH are unaffected — this is presentation of a record that already crosses those boundaries.

Worth a reviewer's eye on one judgement call: Antigravity bypasses the allowlist entirely, which means if agy ever reports a junk bucket name it will be displayed. I think that is the right trade — a wrong label is recoverable, a blank meter on an exhausted account is what sent users into 429s in #22511.

Agent skill upstream boundary

  • Not applicable.

Notes

Credit for identifying that Antigravity's pools are per-model-group and must be shown as such, rather than squeezed into a single session number:

Co-authored-by: rsuzukimktdigital rsuzukimktdigital@users.noreply.github.com
Co-authored-by: bluetomlee bluetomlee@users.noreply.github.com
Co-authored-by: artile artile@users.noreply.github.com
Co-authored-by: andrecristodev andrecristodev@users.noreply.github.com

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Visual proof: before/after table plus assertions; reason given above
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (N/A — presentation only)
  • oxlint, pnpm tc:web, status-bar suite pass locally

@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Status bar now shows Antigravity model-group pools.

The PR appears safe to merge; the outstanding concern is a non-blocking test-coverage gap.

Findings

  1. P2 Weekly fallback remains untested ▶

Summary

The PR renders Antigravity model-group usage pools in the verbose status bar, adds a weekly fallback, and gives pending Antigravity readings a bucket-shaped snapshot. The changes to this PR’s three files are unchanged since the previous review.

Reviews (3) · Last reviewed commit: "fix(status-bar): show Antigravity's mode..."

const { ProviderSegment } = await import('./StatusBar')
const markup = renderToStaticMarkup(
<ProviderSegment
p={antigravityLimits({ buckets: [] })}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Weekly fallback remains untested The empty bucket list takes the no-buckets branch, so this test never reaches the new weekly fallback. The 100% assertion can also pass from the MiniBar’s width even if no percentage label is shown. Use nonempty buckets that are all filtered out and assert the visible label, so a fallback regression fails the test.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Minor suggestions only.

Reviewed changes

  • Antigravity's pools bypass the bucket allowlist — isVisibleStatusBarBucket now takes the provider and returns true for antigravity, so its model-group pools ("Gemini Models", "Claude and GPT models") render by name in verbose mode instead of being filtered out by the Gemini/Cursor name match.
  • Verbose fallback chain gains weekly — when buckets exist but are all filtered, the fallback is now session ?? monthly ?? weekly.
  • Bucket-shaped pending snapshot for Antigravity — createPendingProviderSnapshot emits buckets: [] for antigravity, matching Gemini and Cursor. No behavior change: hasUsageData ignores empty buckets.
  • New test file — 4 tests covering both pools rendering by name, the weekly-window path, and the Gemini allowlist guard.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏


it('shows the weekly window when a tier reports no session pool', async () => {
// Why: the verbose fallback chain was `session ?? monthly`, so a weekly-only provider with a
// real limit rendered an empty segment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rationale here doesn't match the code path this test takes. With buckets: [] (and buckets: undefined in the next test), VerboseProviderUsage skips the p.buckets.length > 0 branch and goes to the second branch, which already rendered p.weekly before this PR. I verified this: reverting the changed session ?? monthly ?? weekly line to session ?? monthly still leaves all four tests passing, so the new ?? p.weekly fallback has no coverage.

To actually pin it, a fixture needs buckets present but all filtered (e.g. an unrecognised name) with session and monthly null and weekly set — only then does execution reach the fallback line.

Technical details
# `weekly` fallback in the bucket branch is untested

## Affected sites
- `src/renderer/src/components/status-bar/status-bar-antigravity-segment.test.tsx:66` — "shows the weekly window when a tier reports no session pool" passes `buckets: []`, taking the `visibleWindows` branch.
- `src/renderer/src/components/status-bar/status-bar-antigravity-segment.test.tsx:82` — "still renders a reading when only the weekly window is known" passes `buckets: undefined`, same branch.
- `src/renderer/src/components/status-bar/StatusBarProviderSegment.tsx:197` — `session ?? monthly ?? weekly` is only reached when `p.buckets.length > 0` and every bucket is filtered out.

## Required outcome
- Either add a test that reaches the fallback line (buckets present but all filtered, `session`/`monthly` null, `weekly` set), or correct the comments to describe the path actually taken.

## Note
- After this PR's provider bypass, Antigravity buckets are always visible, so the fallback line is also unreachable for the provider it was added for in the first place.

@nwparker
nwparker force-pushed the nwparker/agy-quota-visible branch from f7a2ee2 to 1a13654 Compare October 1, 2026 02:24
@nwparker
nwparker changed the base branch from nwparker/agy-real-quota to main October 1, 2026 02:37
…mpty segment

The verbose bucket allowlist was written for Gemini's experimental models, and
its fallback window was session-or-monthly. Antigravity reports one pool per
model group and some tiers meter weekly only, so a signed-in account with an
exhausted pool rendered an icon and no number.

Antigravity bypasses the allowlist by provider, because its group names come
from the account's tier and cannot be enumerated. Cursor stays name-matched so
an unrecognised pool still falls back to the plan total.

Refs #22511
Refs #16704
@nwparker
nwparker force-pushed the nwparker/agy-quota-visible branch from 1a13654 to 14816cb Compare October 1, 2026 02:38
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Repository guideline files applied to this review (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 26d0a6e5-4413-4b37-8a6a-0ba518d59a84

📥 Commits

Reviewing files that changed from the base of the PR and between a76a0bc and 14816cb.

📒 Files selected for processing (3)
  • src/renderer/src/components/status-bar/StatusBarProviderSegment.tsx
  • src/renderer/src/components/status-bar/status-bar-antigravity-segment.test.tsx
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The status bar now displays every Antigravity bucket and falls back to session, monthly, then weekly windows when no bucket is visible. Pending Antigravity snapshots now include an empty bucket list. New tests check Antigravity pool rendering and bucket states, plus Gemini bucket visibility.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 14816

The change displays Antigravity model pools while preserving other providers’ filtering. No actionable merge-blocking risk is established; the previously noted weekly-fallback test gap remains a bounded follow-up.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: displaying Antigravity model-group pools in the status bar.
Description check ✅ Passed The description is detailed and follows the required structure. It explains the user-visible behavior, implementation, rationale, linked issues, visual proof, tests, scope, and checklist status.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@nwparker
nwparker merged commit 78daf71 into main Oct 1, 2026
57 of 59 checks passed
lurunzi added a commit to lurunzi/orca that referenced this pull request Oct 1, 2026
Merge stablyai/orca main up to 78daf71 on top of the 2026-10-01 sync and fork/main 49d4264.

- Antigravity quota: upstream stablyai#24073/stablyai#24074 land their own agy-CLI quota reader and
  model-group pools; the fork's earlier implementation, its configured-command override and its
  status-bar extras (grouped compact metrics, reset countdown, grouped tooltip/roster) are removed
  in favour of upstream's.
- Agent exit confirmation: keep the fork rule that only a shell in the foreground closes chat,
  with Windows PTY job proof (07da011, 7a40146), on top of upstream's hook-presence verdicts;
  upstream's wsl.exe/tmux and owner-less silence cases are adapted to that rule.
- Claude adapter: prompt suggestion bookkeeping folded into upstream's child-record observation.
- Coordinator identity loader opens the orchestration database only if it exists; upstream's
  idle-edge mail lookup otherwise created it for every structured session.
- Fork capabilities advertised via shared/agent-provider-runtime-capabilities.ts, prompt-suggestion
  reducer wrapper and frame-field alias keep upstream files under max-lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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