Skip to content

feat(antigravity): add quota burndown chart and Claude/GPT history lanes - #5290

Open
Volutionn wants to merge 3 commits into
steipete:mainfrom
Volutionn:feat/antigravity-quota-burndown
Open

Volutionn wants to merge 3 commits into
steipete:mainfrom
Volutionn:feat/antigravity-quota-burndown

Conversation

@Volutionn

@Volutionn Volutionn commented Dec 4, 2026 •

Copy link
Copy Markdown

Enables the Plan Usage quota burndown chart (QuotaBurndownChartMenuView) for Antigravity and records Claude/GPT 5-hour and weekly quota summaries in separate series so Gemini and Claude/GPT histories don't collide.

Changes

  • Add antigravityClaudeGPTSession (300m) and antigravityClaudeGPTWeekly (10080m) series in PlanUtilizationHistoryStore while keeping Gemini 5-hour/weekly on existing session / weekly lanes for full backward compatibility with saved antigravity.json histories.
  • Record Claude/GPT structured summary windows alongside Gemini in AntigravityQuotaHistory / UsageStore+PlanUtilization using AntigravityQuotaFamilyVisibility.knownFamily(windowID:title:).
  • Enable QuotaBurndownChartMenuView for Antigravity in StatusItemController+UsageHistoryMenu when structured history is active (cadence-less pool observations still suppress burndown).
  • Use compact tab labels that fit the 310pt menu popover cleanly without clipping (5h, Weekly, Claude/GPT 5h, Claude/GPT), matching Codex/Claude's convention and naturally keeping legacy weekly-only histories neutrally labeled (66ae09a25b30). Use .controlSize(.small) on the segmented control when more than 3 tabs are shown.
  • Add unit tests covering multi-family burndown, legacy weekly-only Starter refreshes and migration (AntigravityQuotaHistoryTests), real StatusItemController Plan Usage submenu wiring for structured vs pool snapshots (StatusMenuHostedSubmenuRefreshTests), and 310pt synthetic render proof (QuotaBurndownRenderProofTests).

Runtime & upgrade compatibility proof (redacted)

Live packaged CodexBar.app refresh recording separate family lanes in antigravity.json (redacted)
{
  "version": 1,
  "preferredAccountKey": "<redacted-account-key>",
  "accounts": {
    "<redacted-account-key>": [
      {
        "name": "antigravityClaudeGPTSession",
        "windowMinutes": 300,
        "entries": [
          { "capturedAt": "2026-12-04T23:59:53Z", "usedPercent": 0 },
          { "capturedAt": "2026-12-05T00:05:53Z", "usedPercent": 0 }
        ]
      },
      {
        "name": "session",
        "windowMinutes": 300,
        "entries": [
          { "capturedAt": "2026-12-04T23:59:53Z", "resetsAt": "2026-12-05T01:27:58Z", "usedPercent": 13.695170000000005 },
          { "capturedAt": "2026-12-05T00:05:53Z", "resetsAt": "2026-12-05T01:27:58Z", "usedPercent": 14.403116999999995 }
        ]
      },
      {
        "name": "antigravityClaudeGPTWeekly",
        "windowMinutes": 10080,
        "entries": [
          { "capturedAt": "2026-12-04T23:59:53Z", "resetsAt": "2026-12-10T10:46:13Z", "usedPercent": 50 },
          { "capturedAt": "2026-12-05T00:05:53Z", "resetsAt": "2026-12-10T10:46:13Z", "usedPercent": 50 }
        ]
      },
      {
        "name": "weekly",
        "windowMinutes": 10080,
        "entries": [
          { "capturedAt": "2026-12-04T23:59:53Z", "resetsAt": "2026-12-08T06:06:42Z", "usedPercent": 44.012004000000005 },
          { "capturedAt": "2026-12-05T00:05:53Z", "resetsAt": "2026-12-08T06:06:42Z", "usedPercent": 44.188994 }
        ]
      }
    ]
  }
}
  • Submenu integration (StatusMenuHostedSubmenuRefreshTests): Verified StatusItemController.makeUsageHistorySubmenu(provider: .antigravity) + menuWillOpen mounts NSHostingView<QuotaBurndownChartMenuView> + separator + NSHostingView<PlanUtilizationHistoryChartMenuView> after recording structured snapshots, and collapses back to utilization-only on cadence-less pool observations.
  • Upgrade compatibility (AntigravityQuotaHistoryTests, AntigravityHistoryUpgradeTests): Verified a saved legacy weekly-only history (80% provider-wide max, no session) refreshed by weekly-only Starter summaries retains the 80% record with a neutral Weekly label alongside Claude/GPT, and cleanly migrates when a full Gemini session/weekly pair arrives.

Rendered proof (synthetic fixture at 310pt menu width, dark & light)

Dark Light
Antigravity burndown dark Antigravity burndown light

Commands run

  • swift test --filter 'QuotaBurndownChartMenuViewTests|QuotaBurndownRenderProofTests|AntigravityQuotaHistoryTests|AntigravityHistoryUpgradeTests|PlanUtilizationHistoryChartMenuViewTests|ProviderArchitectureGatekeeperTests' (80 tests in 6 suites passed)
  • swift test --filter StatusMenuHostedSubmenuRefreshTests (passed)

@clawsweeper

clawsweeper Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

🦞👀
Pull request received.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T23:54:20.450643Z 5e9b6ac PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:feature Preliminary submission classification; full source review pending. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Dec 4, 2026
@clawsweeper

clawsweeper Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge.

What this changes

This PR enables Antigravity quota burndown charts and records Claude/GPT quota history separately from Gemini.

Example: An Antigravity refresh reports Gemini weekly usage at 42% and Claude/GPT weekly usage at 50%.

  • Before: Claude/GPT has no dedicated structured history lane, and Antigravity has no quota burndown chart.
  • After: The percentages occupy separate weekly history lanes, and active saved windows appear in the shared burndown chart.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused implementation has useful boundary evidence and no identified blocking defect; unresolved feature approval caps overall readiness.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live output): Supplied packaged-app refresh output shows separate Gemini and Claude/GPT history lanes; the reported production-submenu integration run covers structured-to-observation switching, and directly inspected synthetic dark/light artifacts show the compact chart labels at the declared menu width.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Antigravity users cannot inspect recorded remaining quota through the shared burndown chart or retain dedicated structured Claude/GPT quota history.
Reason: The capability has clear utility and bounded scope, but repository policy requires feature sign-off and the overlapping implementation needs a landing decision.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: the focused feature is coherent and has no identified blocking code defect, but its direction and landing path need maintainer approval.

Reviewed head: e5918d25e8b90f90798e1e359a934d94ff35da99
Owner decision: Required. See Decision needed.

Decision needed

Before merge

  • Await maintainer action - Approve or defer this Antigravity chart feature under VISION.md and select one landing path for the overlapping implementations.

Findings

None.

Agent review details

How this fits together

Antigravity usage snapshots enter the account-scoped history recorder; saved quota samples then feed the Plan Usage submenu's burndown and utilization views.

flowchart TD
 A[Antigravity snapshot] --> B[Quota sample extraction]
 B --> C[Account scoped history]
 C --> D[Plan Usage submenu]
 D --> E[Quota burndown chart]
 D --> F[Utilization history chart]
Loading

Technical review

Best possible solution:

Approve one shared Antigravity chart implementation and coordinate its landing with #5188.

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

This is a feature addition; current-main source confirms the absent Antigravity burndown wiring and structured Claude/GPT history lanes.

Is this the best way to solve the issue?

Reusing the existing history recorder, family classifier, and shared chart views is a bounded implementation; consolidation with the overlapping PR remains an owner choice.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 44839248b5ba.

Provenance checked

  • Shared burndown and preserved utilization chart keeps the original intent (Add recorded quota burndown alongside plan usage history #4085: Show recorded quota depletion with explicit capture age while retaining utilization history and account-scoped data.)
  • Cadence-less Antigravity observations keeps the original intent (1dc02d0: Retain observations without inventing reset cadence and prefer the most recently captured history format.)
  • Legacy Gemini-pinned session and weekly history keeps the original intent (66ae09a: Keep complete Gemini session/weekly pairs distinct from unidentified legacy provider-wide weekly history.)
  • Compact Antigravity chart titles changes intended behavior with a stated reason (Clarify five-hour quota wording in Simplified Chinese #3070: Shared quota titles derive from semantic labels and actual durations; this PR uses compact Antigravity titles because longer family labels clipped in the menu.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 1dc02d0 adds Sources/CodexBar/Providers/Antigravity/AntigravityQuotaHistory.swift:25 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1dc02d07da16; files: Sources/CodexBar/Providers/Antigravity/AntigravityQuotaHistory.swift)
  • Dohyeon Park: Raw commit 7a279fa adds Sources/CodexBar/QuotaBurndownChartMenuView.swift:74 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7a279fa06eab; files: Sources/CodexBar/QuotaBurndownChartMenuView.swift)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production and test scope Production +126/-16 lines; tests +392/-12 lines The larger test addition covers distinct recording, legacy-history, submenu-refresh, and rendering boundaries.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-12-05T00:03:28.055Z sha 5e9b6ac :: needs real behavior proof before merge. :: [P2] Preserve neutral labels for unidentified legacy weekly histories
  • reviewed 2026-12-05T00:16:09.889Z sha cfb81de :: blocked before merge. :: none

Reviewed December 4, 2026, 8:48 PM ET / December 5, 2026, 01:48 UTC (Revision 3).

@Volutionn

Copy link
Copy Markdown
Author

Fixed the legacy weekly-only label issue by gating the Gemini weekly label on the presence of a non-empty session series (preserving neutral Weekly for legacy weekly-only histories, matching 66ae09a25b30). Added regression coverage for weekly-only Starter refreshes + migration, end-to-end StatusItemController submenu tests for structured vs pool snapshots, and redacted packaged-app antigravity.json runtime output to the PR description.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Dec 5, 2026
@Volutionn

Copy link
Copy Markdown
Author

Shortened the Antigravity segmented tab labels to 5h, Weekly, Claude/GPT 5h, and Claude/GPT (matching Codex/Claude) after testing in the live 310pt menu popover where the longer Gemini weekly + Claude/GPT weekly labels clipped at the right edge. Updated the render proof test to use StatusItemController.menuCardBaseWidth (310pt).

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

🦞👀

Re-review progress:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant