feat: hide untouched Antigravity model families - #2875
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper ready |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da5ede2283
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Codex review: needs maintainer review before merge. Reviewed August 12, 2026, 11:36 PM ET / August 13, 2026, 03:36 UTC. ClawSweeper reviewWhat this changesFilters Antigravity quota families with no known usage from menu cards and widgets while keeping all reported lanes in provider settings. Merge readinessKeep open for a maintainer product decision. The implementation is scoped and appears correct, but it intentionally changes menu-card and widget semantics from complete plan inventory to curated active-usage views. Priority: P2 Review scores
Verification
How this fits togetherAntigravity quota snapshots feed CodexBar’s menu card, widget snapshot, and provider-settings usage view. The PR adds a shared family-level display filter between quota parsing and the curated presentation surfaces. flowchart LR
A[Antigravity quota snapshot] --> B[Quota family grouping]
B --> C{Any family has usage?}
C -->|Yes| D[Hide idle families]
C -->|No| E[Keep all families]
D --> F[Menu card and widget]
E --> F
A --> G[Provider settings]
G --> H[Show every lane]
Decision needed
Why: The patch is technically coherent, but the visibility change is a user-facing presentation policy with no maintainer approval in the discussion. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: If the curated-display policy is accepted, retain the shared family filter and the provider-settings complete-inventory escape hatch exactly as implemented. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes a display-policy change rather than fixing a failing current behavior; its rendered before/after scenarios are supplied as proof. Is this the best way to solve the issue? Yes conditionally: one core filter shared by menu and widget, with provider settings retaining all lanes, is the narrowest maintainable implementation if maintainers accept the curated-display policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 208016687098. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
|
@steipete Like a lot of agy users I only really use gemini, this helps "streamline" the UI. |
Drop a quota family from menu cards and widgets when no lane reports known usage; keep every family when all are untouched; pair an unfamiliar family's lanes by title so a reset lane never hides beside an active sibling; keep provider details listing every family as the diagnostic surface.
Problem
Antigravity's
RetrieveUserQuotaSummaryreports every model family the plancovers, not just the ones the account uses. An account that only runs Gemini
still receives a Claude/GPT group, so the menu card, the provider settings
Usage list, and the widget each carry two rows pinned at 0% used that will never
move. On a small widget, where the row limit is 2, those dead rows can crowd out
the lanes that matter.
Fix
Hide a model family once no lane in it reports known usage above zero.
Hiding is per family, never per lane, so a family in use keeps its full 5-hour
and weekly pair even when one of them happens to sit at zero. That matters every
week: a weekly lane resets to 0% while the 5-hour lane is still active, and
per-lane hiding would drop the weekly row until the next call.
When every family is untouched, nothing hides, so the card never renders empty.
An "unavailable" lane (bucket
disabled, or noremainingFraction) counts asnot used.
AntigravityQuotaFamilyVisibilityinCodexBarCoreowns the rule so the menucard and the widget cannot drift apart. Family grouping uses the bucket ID first
(
gemini,3p,third-party), which matches the widget's existing rowresolver, because the ID survives a display-text change. A group with neither
signal uses the rendered title without its
5-hourorweeklysuffix, so anunfamiliar family still pairs its lanes.
Provider settings opts out through a new
showsAllUsageLanesflag on the cardmodel input, set at exactly one call site. It is the diagnostic surface and
always lists every family, the same principle the pane already applies to cost
data:
The change is display-only. The snapshot, CLI output, and diagnostics still
carry every window. Menu-bar text and icon selection rank by highest used, so an
untouched family never won there anyway, and quota warnings fire on low
remaining, so an untouched family never triggered one. No new setting: no
UserDefaultskey, no provider config field, no sync field, no toggle. The ruleis computed from the snapshot at render time.
Behavior
Screenshots
Menu card, both usage-bar modes.
Provider settings, same payload as the Gemini-only row above, showing all four
lanes.
Every image above is the real SwiftUI view rendered through
ImageRendererfroma synthetic snapshot. No account data.
Side benefit
The Antigravity widget row limit is 2 on small and 3 on medium
(
AntigravityProviderDescriptor.swift). With four lanes the medium widgettruncated the last row. With the untouched family gone, both Gemini lanes fit.
Proof
swift test --filter "MenuCardAntigravityTests|UsageStoreWidgetSnapshotTests"— 27/27 tests.swift test --filter ProviderArchitectureGatekeeperTests— 38/38 tests.make test— 70/70 groups, 840 selections.New cases cover hiding an untouched family, hiding a family whose only known
lane is untouched, keeping every family when all are untouched, provider
settings keeping every family, and the widget dropping untouched families.
The allowlist in
ProviderArchitectureGatekeeperTestspins exact line numbers,so inserting lines into
MenuCardView+ModelHelpers.swiftshifted five anchors.Those entries move by three; anchors, provider sets, reference counts, and
fingerprints are unchanged. The new
CodexBarCorefile also carries aProvider-specific by design:marker, since the scanner reads thegeminiandclaudestring literals in the family match as provider references.