Skip to content

fix: render one Antigravity lane per quota bucket on the dashboard - #2963

Closed
urda wants to merge 1 commit into
steipete:mainfrom
urda:urda/agy-dashboard-rows
Closed

fix: render one Antigravity lane per quota bucket on the dashboard#2963
urda wants to merge 1 commit into
steipete:mainfrom
urda:urda/agy-dashboard-rows

Conversation

@urda

@urda urda commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

The dashboard snapshot builder emits primary, secondary, tertiary, and every entry in extraRateWindows. That is correct for providers whose primary and secondary are real, distinct windows.

Antigravity is not one of those providers. It reports one bucket per quota family and window, and AntigravityStatusProbe then copies the most-used Gemini bucket into primary and the most-used Claude/GPT bucket into secondary, so the icon, the menu bar, and the notification paths have standard slots to read. Those two slots hold copies, not new data.

The dashboard printed the slots and the bucket list together, so a four-window account rendered six rows. The two extra rows carried the generic sessionLabel and weeklyLabel from provider metadata, which made the copies look like separate quotas.

Before, with four real windows:

Row Used Resets
Gemini Models 7.3% 4d 23h
Claude and GPT 0% 4h 59m
Gemini 5-hour 3% 2h 45m
Gemini weekly 7.3% 4d 23h
Claude/GPT 5-hour 0% 4h 59m
Claude/GPT weekly 0% 6d 23h

Rows 1 and 4 are one window. Rows 2 and 5 are one window. The identical reset times show it.

After, one row per bucket:

Row Used Resets
Gemini 5-hour 3% 2h 45m
Gemini weekly 7.3% 4d 23h
Claude/GPT 5-hour 0% 4h 59m
Claude/GPT weekly 0% 6d 23h

Every family stays visible. The dashboard is a detail surface, so it follows Preferences > Providers > Antigravity, which also shows all four lanes. Compact surfaces keep their existing behavior: the menu card and the widget still hide a family whose lanes all report zero, per #2875.

GET /dashboard/v1/snapshot and codexbar dashboard share this builder, so both transports change together. Antigravity snapshots without quota-summary lanes, and every other provider, take the existing path unchanged.

AntigravityStatusSnapshot.isQuotaSummaryWindowID becomes public so CodexBarCLI can identify the summary lanes. The check already exists and is already used inside CodexBarCore.

Commands run

  • swift build
  • make check (SwiftFormat and SwiftLint strict): 0 violations
  • make test: 864 selections in 72 groups, 0 failures, 0 retries

Tests

Tests/CodexBarTests/DashboardAntigravityWindowTests.swift builds the four-bucket shape the probe produces, with primary and secondary set to copies of two buckets, and covers:

  • The snapshot renders one lane per quota bucket.
  • The generic representative labels do not appear as rows.
  • An Antigravity snapshot without quota-summary lanes keeps the standard session and weekly rows.

These tests use a fixture snapshot. They run no live provider probe.

Known related issue, not in this change

codexbar cards has the opposite defect on the same provider. CLIRenderer renders primary and secondary, then asks the descriptor for extra windows through extraRateWindowSelector. Antigravity declares no selector, so the default returns an empty array, and terminal cards show only the two copies and none of the real buckets.

The fix there is not symmetrical with this one: the same selector feeds MenuDescriptor, so adding it would change the app menu as well. That belongs in its own change with its own coverage.

The dashboard snapshot emitted primary, secondary, and every extra
window. Antigravity copies its busiest Gemini and Claude/GPT buckets
into primary and secondary so the icon and menu bar have standard
slots to read, so the web card repeated two buckets as extra
"Gemini Models" and "Claude and GPT" rows: six rows for four windows.

Render the quota-summary lanes alone when the snapshot carries them,
one row per bucket. Every family stays visible, since the dashboard
is a detail surface. Snapshots without summary lanes are unchanged.
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 15, 2026, 10:51 PM ET / August 16, 2026, 02:51 UTC.

ClawSweeper review

What this changes

The PR makes Antigravity dashboard snapshots emit only real quota-summary buckets instead of also emitting copied primary and secondary representative windows.

Merge readiness

Blocked until real behavior proof from a real setup is added - 6 items remain

Keep open: the duplicate-row bug is source-backed, but the patch changes the documented dashboard-v1 window contract without a compatibility path and needs real after-fix behavior proof.

Priority: P2
Reviewed head: f9686dfeb536d0e162a6d09a5e89114a755889e9
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The targeted fix has focused fixture coverage, but API compatibility remains unresolved and no real after-fix output is attached.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR provides fixture tests only; add a redacted after-fix codexbar dashboard or HTTP snapshot transcript showing the real bucket rows, then update the PR body for re-review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR provides fixture tests only; add a redacted after-fix codexbar dashboard or HTTP snapshot transcript showing the real bucket rows, then update the PR body for re-review.
Evidence reviewed 5 items Copied representatives are current behavior: Current main populates primary and secondary from selected quota-summary windows while also storing every named quota bucket in extraRateWindows.
Dashboard v1 is a documented stable contract: The dashboard documentation calls this a stable display contract shared by the CLI and HTTP API, documents schemaVersion 1, and shows session window kinds.
Patch removes v1 representative kinds: The new early return emits only provider-specific quota IDs whenever summary windows exist, omitting the previous session and weekly rows while schemaVersion remains 1.
Findings 1 actionable finding [P1] Preserve the v1 session and weekly window contract
Security None None.

How this fits together

The Antigravity probe turns provider quota buckets into a shared usage snapshot used by compact app surfaces and dashboard consumers. The dashboard builder serializes that snapshot for both codexbar dashboard and the local HTTP dashboard API.

flowchart LR
  A[Antigravity quota summary] --> B[Status probe]
  B --> C[Usage snapshot]
  C --> D[Dashboard snapshot builder]
  D --> E[CLI dashboard JSON]
  D --> F[HTTP dashboard API]
  C --> G[Menu and widget]
Loading

Decision needed

Question Recommendation
Should Antigravity’s bucket-only output be a versioned dashboard-contract change, or should dashboard-v1 retain its existing session and weekly rows? Version bucket-only output: Add a new documented snapshot version or endpoint for bucket-only Antigravity lanes while preserving v1 clients.

Why: The documented v1 API is shared by the one-shot CLI and HTTP consumers, so accepting a removed window kind requires an explicit compatibility decision.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR provides fixture tests only; add a redacted after-fix codexbar dashboard or HTTP snapshot transcript showing the real bucket rows, then update the PR body for re-review.
  • Preserve the v1 session and weekly window contract (P1) - The dashboard is documented as a stable schema-v1 contract, and current output emits generic session and weekly representatives. This early return removes both for quota-summary Antigravity data and replaces them with provider-specific IDs without a version or migration path, breaking existing v1 scripts that select those window kinds.
  • Resolve merge risk (P1) - Existing dashboard-v1 clients can rely on kind: session and kind: weekly; this change removes those rows for quota-summary Antigravity snapshots without changing schema version.
  • Resolve merge risk (P1) - The PR has only fixture-based validation, so the claimed real CLI and HTTP dashboard output remains unproven.
  • Complete next step (P2) - A maintainer must choose the v1 compatibility policy before a safe implementation path can be selected; contributor-supplied real output is also required before merge.

Findings

  • [P1] Preserve the v1 session and weekly window contract — Sources/CodexBarCLI/DashboardSnapshotBuilder.swift:293-294
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Diff footprint production +19/-1, tests +131, changelog +1 Most of the patch is focused fixture coverage around a small dashboard serialization change.
Shared outputs 2 transports The same builder serves both the one-shot CLI JSON and the HTTP dashboard snapshot, so the compatibility decision applies to both.

Merge-risk options

Maintainer options:

  1. Version bucket-only output (recommended)
    Preserve v1 session and weekly rows, then publish bucket-only Antigravity lanes through a documented versioned contract and update the built-in dashboard.
  2. Keep v1 API semantics
    Restrict the visual deduplication to a consumer that can keep v1 JSON rows available to scripts and adapters.
  3. Accept the API change
    Approve the removal of v1 representative rows as an intentional compatibility break and document the required client migration.

Technical review

Best possible solution:

Expose the bucket-only representation through an explicitly versioned dashboard contract, preserving v1 output for existing clients and updating the built-in dashboard to consume the new shape.

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

Yes—current main directly constructs copied primary and secondary representatives alongside named quota-summary buckets, while the existing dashboard builder serializes both.

Is this the best way to solve the issue?

Unclear—the deduplication is appropriate for a detail view, but changing the documented v1 API without a versioned migration is not yet the safest solution.

Full review comments:

  • [P1] Preserve the v1 session and weekly window contract — Sources/CodexBarCLI/DashboardSnapshotBuilder.swift:293-294
    The dashboard is documented as a stable schema-v1 contract, and current output emits generic session and weekly representatives. This early return removes both for quota-summary Antigravity data and replaces them with provider-specific IDs without a version or migration path, breaking existing v1 scripts that select those window kinds.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This corrects duplicated Antigravity detail rows with limited provider-specific blast radius.
  • add merge-risk: 🚨 compatibility: The patch changes documented dashboard-v1 window kinds and cardinality while retaining schema version 1.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides fixture tests only; add a redacted after-fix codexbar dashboard or HTTP snapshot transcript showing the real bucket rows, then update the PR body for re-review.

Label justifications:

  • P2: This corrects duplicated Antigravity detail rows with limited provider-specific blast radius.
  • merge-risk: 🚨 compatibility: The patch changes documented dashboard-v1 window kinds and cardinality while retaining schema version 1.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides fixture tests only; add a redacted after-fix codexbar dashboard or HTTP snapshot transcript showing the real bucket rows, then update the PR body for re-review.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: The available current-main blame attributes the dashboard and Antigravity snapshot lines to the release commit; earlier feature history is unavailable in this shallow checkout. (role: current-line provenance lead; confidence: low; commits: 0e453c4a5b2a; files: Sources/CodexBarCLI/DashboardSnapshotBuilder.swift, Sources/CodexBarCore/Providers/Antigravity/AntigravityStatusProbe.swift)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Get a maintainer decision on dashboard-v1 compatibility.
  • Add redacted real CLI or HTTP dashboard output that shows the corrected Antigravity rows.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@steipete

Copy link
Copy Markdown
Owner

Thanks @urda! Your branch went CONFLICTING against main after today's merge train and the fork isn't maintainer-editable, so I carried this forward as #2966 with your commits and a changelog credit. Closing this one in favor of that refresh — the code is unchanged.

@steipete steipete closed this Aug 16, 2026
@urda
urda deleted the urda/agy-dashboard-rows branch August 16, 2026 04:38
Finesssee added a commit to nesszer/Win-CodexBar that referenced this pull request Aug 18, 2026
…n-zero history, Antigravity dashboard lanes, Claude OAuth revoked detection

steipete#2946 Codex routed models pricing — codex_routed_provider() + strip_route_prefix()
    in cost_pricing.rs; deepseek/, kimi/, opencode/ routes price against
    matching models.dev provider; unknown provider/ prefixes return None.
steipete#2944 Codex auth.json read-only during refresh — codex_external_oauth_sources_allowed
    setting (default OFF); is_external_oauth + last_refresh fields on
    CodexCredentials; enforce_external_oauth_gate (8-day staleness window).
steipete#2932 Codex known-zero history — known_zero field on CostSummary; set in both
    cache-debounce and full-scan paths (history_coverage_established &&
    sessions_count == 0); knownZero JSON field + CLI text update.
steipete#2963 Antigravity dashboard lanes — quota-bucket dedup in parse_user_status;
    models sharing the same (remaining_fraction, reset_time) collapse to one
    lane.
steipete#2516 Claude revoked vs missing OAuth — ProviderError::OAuthRevoked variant;
    revocation detection (401/403 with revoked/invalid_grant/token_revoked);
    15-min CLI result cache (LazyLock<Mutex<Option<CachedCliResult>>>);
    fetch_via_auto returns cached CLI result when OAuth revoked, and stale
    cache when all live sources fail.
Finesssee added a commit to nesszer/Win-CodexBar that referenced this pull request Aug 18, 2026
…n-zero history, Antigravity dashboard lanes, Claude OAuth revoked detection

steipete#2946 Codex routed models pricing — codex_routed_provider() + strip_route_prefix()
    in cost_pricing.rs; deepseek/, kimi/, opencode/ routes price against
    matching models.dev provider; unknown provider/ prefixes return None.
steipete#2944 Codex auth.json read-only during refresh — codex_external_oauth_sources_allowed
    setting (default OFF); is_external_oauth + last_refresh fields on
    CodexCredentials; enforce_external_oauth_gate (8-day staleness window).
steipete#2932 Codex known-zero history — known_zero field on CostSummary; set in both
    cache-debounce and full-scan paths (history_coverage_established &&
    sessions_count == 0); knownZero JSON field + CLI text update.
steipete#2963 Antigravity dashboard lanes — quota-bucket dedup in parse_user_status;
    models sharing the same (remaining_fraction, reset_time) collapse to one
    lane.
steipete#2516 Claude revoked vs missing OAuth — ProviderError::OAuthRevoked variant;
    revocation detection (401/403 with revoked/invalid_grant/token_revoked);
    15-min CLI result cache (LazyLock<Mutex<Option<CachedCliResult>>>);
    fetch_via_auto returns cached CLI result when OAuth revoked, and stale
    cache when all live sources fail.
Finesssee added a commit to nesszer/Win-CodexBar that referenced this pull request Aug 18, 2026
* Port upstream 0.50.1: Cursor rename + Ollama cookie stripping (steipete#2951, steipete#2949)

* Port upstream 0.50.1: OpenCode Go session+weekly pace in CLI (steipete#2957)

* Port upstream 0.50.1: chart axis label centering (steipete#2974)

* Port upstream 0.50.1: Kiro re-authenticate via kiro-cli login (steipete#2340)

* Port upstream 0.50.1: serve identity follows app redaction per-request (steipete#2960)

* Port upstream 0.50.1: Codex routed pricing, auth.json read-only, known-zero history, Antigravity dashboard lanes, Claude OAuth revoked detection

steipete#2946 Codex routed models pricing — codex_routed_provider() + strip_route_prefix()
    in cost_pricing.rs; deepseek/, kimi/, opencode/ routes price against
    matching models.dev provider; unknown provider/ prefixes return None.
steipete#2944 Codex auth.json read-only during refresh — codex_external_oauth_sources_allowed
    setting (default OFF); is_external_oauth + last_refresh fields on
    CodexCredentials; enforce_external_oauth_gate (8-day staleness window).
steipete#2932 Codex known-zero history — known_zero field on CostSummary; set in both
    cache-debounce and full-scan paths (history_coverage_established &&
    sessions_count == 0); knownZero JSON field + CLI text update.
steipete#2963 Antigravity dashboard lanes — quota-bucket dedup in parse_user_status;
    models sharing the same (remaining_fraction, reset_time) collapse to one
    lane.
steipete#2516 Claude revoked vs missing OAuth — ProviderError::OAuthRevoked variant;
    revocation detection (401/403 with revoked/invalid_grant/token_revoked);
    15-min CLI result cache (LazyLock<Mutex<Option<CachedCliResult>>>);
    fetch_via_auto returns cached CLI result when OAuth revoked, and stale
    cache when all live sources fail.

* Port upstream 0.50.1: Mistral PAYG spend, cost-summary display style, per-provider accent color

Item 1 — Mistral PAYG current-month API spend (steipete#2821, steipete#2947):
- Add MonthlyPlan variant to MetricPreference enum
- Add currency_symbol field to CostSnapshot with with_currency_symbol builder
- Set currency_symbol from Mistral billing API response
- Add MonthlyPlan to bridge label/parse, tray selected_metric_percent (None = no bar)
- Show formatted cost amount in provider_status_label for MonthlyPlan
- Add format_cost_amount helper in bridge.rs
- Add Mistral monthly spend row in MenuCardDetails
- Add monthlyPlan option to MenuBarMetricSection for Mistral

Item 2 — Menu cost-summary display style per provider (steipete#2976):
- Add CostSummaryDisplayStyle enum (Compact/Detailed/Hidden) in types.rs
- Add cost_summary_display_style field to Settings + Default + RawSettings round-trip
- Add to SettingsSnapshot bridge + SettingsUpdate + apply in Tauri commands
- Add bridge label/parse functions
- Apply in MenuCardDetails: hidden hides cost section, compact shows used/limit only
- Update describeCard to filter hasCost for hidden style
- Add Select control in UsageSpendTab

Item 3 — Per-provider accent color override (steipete#2972):
- Add accent_color field to ProviderConfig
- Add brand_color(ProviderId) function in provider.rs (mirrors frontend registry)
- Add accent_color/set_accent_color/effective_accent_color accessors in Settings
- Add set/get/get_effective Tauri commands + normalize_hex_accent_color validator
- Add providerAccentColors map to SettingsSnapshot bridge
- Add setProviderAccentColor/getProviderAccentColor/getProviderEffectiveAccentColor to tauri.ts
- Create AccentColorSection component (hex input, color picker, reset button)
- Inject --provider-accent CSS variable on MenuCard article and ChartsSection
- Update menu-metric__bar-fill and chart colors to use --provider-accent fallback
- Update chartPalette providerCostColor/providerCreditsColor fallback chain
- Pass providerAccentColors through TrayPanel/PopOutPanel/ProvidersTab/ProviderDetailPane

Also:
- Add 11 new locale keys to all 7 .ftl files + keys.ts
- Add costSummaryDisplayStyle + providerAccentColors to all test mock SettingsSnapshot
- Update chartPalette tests for --provider-accent fallback

* Resolve merge conflicts and fix gate checks

* Thermo-nuclear: extract ollama cookies, codex pricing, simplify accent color

* fix: correct serde attribute placement on currency_symbol after rebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants