Skip to content

Update Antigravity quota UI to sync with backend payload display names - #1584

Merged
steipete merged 2 commits into
steipete:mainfrom
Yuxin-Qiao:fix-1548-antigravity-quota-ui
Jun 18, 2026
Merged

Update Antigravity quota UI to sync with backend payload display names#1584
steipete merged 2 commits into
steipete:mainfrom
Yuxin-Qiao:fix-1548-antigravity-quota-ui

Conversation

@Yuxin-Qiao

@Yuxin-Qiao Yuxin-Qiao commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

This PR addresses an Antigravity quota UI issue where CodexBar was overriding dynamic displayName fields from the quota summary payload with hardcoded strings like "Gemini Session" or "Claude + GPT Weekly".

This change updates AntigravityStatusProbe and related UI formatting logic to use the real strings provided by the Google AI Studio backend, matching the web dashboard terminology.

Note: this PR is about Antigravity quota display names and menu-bar quota selection. It is not the Safari / ChatGPT Atlas cookie-import issue from #1548.

Changes Made

  • Removed hardcoded overrides for "Gemini" and "Claude + GPT" in AntigravityStatusProbe and replaced them with backend payload names such as "Gemini Models" and "Claude and GPT models".
  • Refactored quotaSummaryRepresentative predicate matching to rely on broad keywords instead of exact prefixes.
  • Updated AntigravityProviderDescriptor default labels to "Gemini Models" and "Claude and GPT".
  • Added coverage for the exhausted-bucket menu-bar case, where one 5-hour bucket is at 0% remaining but another 5-hour bucket is still usable.
  • Updated small/medium widget quota row selection to preserve one Gemini row and one Claude/GPT row using quota IDs or current backend names instead of stale display prefixes.
  • Updated unit test assertions and fixtures to reflect the dynamic formatting logic.

Before & After Evidence

The CodexBar status menu now aligns with the Antigravity web dashboard terminology:

CodexBar UI (After) Web Dashboard (Reference)
CodexBar UI Web Dashboard

Testing

  • swift test --filter CodexBarWidgetProviderTests
  • swift test --filter MenuBarMetricWindowResolverTests
  • swift test --filter Antigravity (197 tests passed)
  • Verified UI rendering locally via widget build.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bb3126a91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Yuxin-Qiao
Yuxin-Qiao force-pushed the fix-1548-antigravity-quota-ui branch from 77c8229 to 8fb0850 Compare June 17, 2026 15:45
@clawsweeper

clawsweeper Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed June 17, 2026, 12:29 PM ET / 16:29 UTC.

Summary
The PR updates Antigravity quota parsing, default labels, menu-bar selection, widget row grouping, and related tests to display backend-provided quota group and bucket names.

Reproducibility: yes. Source inspection shows current main receives backend displayName values in the quota-summary fixture but rewrites them to stale hardcoded labels; I did not run live provider probes because AGENTS.md warns against validation that may trigger account or Keychain prompts.

Review metrics: 2 noteworthy metrics.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

Maintainer options:

  1. Decide the mitigation before merge
    Land this focused backend-name fix after maintainer approval, keeping the stable ID/keyword family grouping and coordinating only the small overlap with the adjacent model-label PR if it lands first.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No automated repair is needed because the current PR appears coherent, proof-backed, and has no blocking findings; remaining action is normal maintainer review.

Security
Cleared: The diff changes Swift parsing/UI selection code, tests, and one test comment; it does not touch dependencies, workflows, secrets, signing, or package resolution.

Review details

Best possible solution:

Land this focused backend-name fix after maintainer approval, keeping the stable ID/keyword family grouping and coordinating only the small overlap with the adjacent model-label PR if it lands first.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection shows current main receives backend displayName values in the quota-summary fixture but rewrites them to stale hardcoded labels; I did not run live provider probes because AGENTS.md warns against validation that may trigger account or Keychain prompts.

Is this the best way to solve the issue?

Yes. Using backend displayName values for quota-summary groups and buckets, while keeping family selection on stable quota IDs or broad family keywords, is the narrow maintainable fix for this UI mismatch.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 05545feba362.

Label changes

Label changes:

  • add P2: This fixes a real visible Antigravity quota display bug with limited blast radius to one provider and focused parser/widget/menu coverage.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes screenshots that directly show the after-fix CodexBar Antigravity menu labels alongside the matching web-dashboard terminology.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes screenshots that directly show the after-fix CodexBar Antigravity menu labels alongside the matching web-dashboard terminology.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body includes screenshots that directly show the after-fix CodexBar Antigravity menu labels alongside the matching web-dashboard terminology.

Label justifications:

  • P2: This fixes a real visible Antigravity quota display bug with limited blast radius to one provider and focused parser/widget/menu coverage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body includes screenshots that directly show the after-fix CodexBar Antigravity menu labels alongside the matching web-dashboard terminology.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes screenshots that directly show the after-fix CodexBar Antigravity menu labels alongside the matching web-dashboard terminology.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes screenshots that directly show the after-fix CodexBar Antigravity menu labels alongside the matching web-dashboard terminology.
Evidence reviewed

What I checked:

  • Current main hardcodes quota-summary display names: Current main converts backend quota group display names containing Gemini, Claude, or GPT into fixed labels and normalizes bucket names to Session/Weekly, which explains the stale UI terminology this PR targets. (Sources/CodexBarCore/Providers/Antigravity/AntigravityStatusProbe.swift:296, 05545feba362)
  • Current tests lock in the stale labels: Current main’s quota-summary fixture already uses backend names such as Gemini Models and Claude and GPT models, but the assertions still expect Gemini Session and Claude + GPT Weekly. (Tests/CodexBarTests/AntigravityQuotaSummaryTests.swift:39, 05545feba362)
  • PR preserves backend display strings: The PR removes the group and bucket title overrides, returns trimmed backend displayName values, and keeps quota representative matching by family keywords instead of old prefixes. (Sources/CodexBarCore/Providers/Antigravity/AntigravityStatusProbe.swift:299, 8fb0850e8873)
  • Widget grouping feedback is addressed: The current PR head groups compact widget rows by Antigravity quota family using quota IDs or backend-name keywords, and adds a regression case for preserving the Claude/GPT family when fallback rows are more constrained. (Sources/CodexBarWidget/CodexBarWidgetViews.swift:605, 8fb0850e8873)
  • Real UI proof inspected: Downloaded and inspected the PR’s CodexBar UI and web-dashboard screenshots; the after-state menu shows Gemini Models and Claude and GPT models labels matching the dashboard terminology. (8fb0850e8873)
  • Checks are green on the current head: GitHub reports successful CI lint/build/test, both Linux CLI builds, and GitGuardian checks for head 8fb0850. (8fb0850e8873)

Likely related people:

  • steipete: Merged and authored much of the recent Antigravity quota detection, edge handling, and current v0.36.1 implementation history affecting the files changed here. (role: recent area contributor and merger; confidence: high; commits: 06fea2c897cc, e4641510eabf, 6f7faaf0afdf; files: Sources/CodexBarCore/Providers/Antigravity/AntigravityStatusProbe.swift, Sources/CodexBar/MenuBarMetricWindowResolver.swift, Sources/CodexBarWidget/CodexBarWidgetViews.swift)
  • Zihao-Qi: Authored the merged Antigravity quota detection work that added and revised the quota-summary parser/status probe paths this PR now adjusts. (role: introduced adjacent quota detection behavior; confidence: medium; commits: aa4c4a9c094f, 9264fbbd18dc, 3e9aeb0ff24d; files: Sources/CodexBarCore/Providers/Antigravity/AntigravityStatusProbe.swift, Sources/CodexBarCore/Providers/Antigravity/AntigravityQuotaSummaryParser.swift, Tests/CodexBarTests/AntigravityQuotaSummaryTests.swift)
  • akunzai: Authored the merged resetTime quota-summary work that touched the same quota-summary parser, status probe, menu rendering, and tests shortly before this PR. (role: adjacent quota-summary contributor; confidence: medium; commits: 6e9bea695669; files: Sources/CodexBarCore/Providers/Antigravity/AntigravityStatusProbe.swift, Sources/CodexBarCore/Providers/Antigravity/AntigravityQuotaSummaryParser.swift, Tests/CodexBarTests/AntigravityQuotaSummaryTests.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. labels Jun 17, 2026
@steipete

Copy link
Copy Markdown
Owner

Maintainer proof for exact head 227d6c00fbb13c7e8acde398c1c70180ed0e4dc6:

  • Focused Antigravity suites: 109 tests passed.
  • make check: passed (SwiftFormat, strict SwiftLint, locale validation).
  • Autoreview: no actionable findings.
  • Ad-hoc packaged CodexBar.app; codesign --verify --deep --strict passed.
  • Authenticated live probe against the current signed Antigravity 2.1.4 app returned all four backend-native quota labels through the packaged CLI, with percentages and reset timestamps:
    • Gemini Models Five Hour Limit
    • Gemini Models Weekly Limit
    • Claude and GPT models Five Hour Limit
    • Claude and GPT models Weekly Limit
  • Public model identifier gate: passed. Changed/package/live surfaces contain only public generic Gemini/Claude/GPT families and Gemini 3.1 Pro.

The ad-hoc GUI bundle triggered macOS Chrome Safe Storage/cross-app-data privacy prompts before menu interaction, even with browser cookie sources disabled, so I am not presenting a misleading fresh menu screenshot. Provider E2E above used the exact candidate and current Antigravity account/session. Existing PR screenshots plus focused menu/widget regression coverage remain applicable.

@steipete
steipete merged commit 70f37af into steipete:main Jun 18, 2026
4 checks passed
@Yuxin-Qiao
Yuxin-Qiao deleted the fix-1548-antigravity-quota-ui branch June 25, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants