feat(ai-accounts): show both Antigravity quota windows per group - #933
Merged
Conversation
The card showed only the 5-hour window. A group shares one weekly limit and one 5-hour limit, so hiding either leaves the account holder guessing which one is about to run out β the real client shows both, grouped, with weekly first, and now so does this. Rows are composed here rather than taken from the backend: the group name comes from the upstream, the window from WindowSeconds, so "Gemini Β· ε¨" is localised without translating anything the upstream owns. The group name loses its trailing "models", which carries nothing next to a window and a percentage. A group with only one window β the fallback model view is entirely 5h β gets no window suffix, since there is nothing to disambiguate against. The upstream describes each group in a full sentence. Printed inline it would push the numbers off the card, so it moves behind a hint icon next to the label, together with a short explanation of how the two limits interact. The description is taken off the item as well as out of the row, so it cannot reappear in the detail line reserved for the reset countdown. Sorting needed no change: resolveAuthFileQuotaRank ranks by the tightest quota the card actually shows, and it reuses resolveQuotaCardSlots, so the weekly bucket became eligible the moment the card began showing it. Its test now pins that an account at 3% weekly outranks its own roomier 5h window, which is the behaviour an operator reading the card expects. renderQuotaBar moves into quotaBar.tsx as useQuotaBarRenderer, for the same reason renderQuotaBarNode already lived there: the presentation hook is over the file-size limit and may only shrink. Both touched files ended up smaller than their baselines, which are updated to match. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Panel half of showing both Antigravity quota windows. Pairs with kittors/CliRelay#913 β merge that one first.
What was wrong
The card showed only the 5-hour window. But a group shares one weekly limit and one 5-hour limit, and hiding either leaves the account holder guessing which one is about to run out. The real Antigravity client shows both, grouped by model family, weekly first.
The layout now
Each label is composed here: the group name comes from the upstream, the window from
windowSeconds. So the window is localised without translating anything the upstream owns.Three deliberate simplifications:
Sorting needed no change
resolveAuthFileQuotaRankranks by the tightest quota the card actually shows, and it reusesresolveQuotaCardSlots. The weekly bucket became eligible the moment the card began showing it β one change, both behaviours consistent.Its test now pins the consequence: an account at 3% weekly outranks its own roomier 5h window. Ranking by the 5h number would put a nearly-exhausted account ahead of a healthy one while the card plainly shows 3%.
File-size gate
renderQuotaBarmoves intoquotaBar.tsxasuseQuotaBarRendererβ the same reasonrenderQuotaBarNodealready lived there: the presentation hook is over the limit and may only shrink. Both touched files ended up smaller than their baselines (AuthFilesFilesTab2579β2578,useAuthFilesFilesPresentation981β974), and the baselines are updated to lock that in.Verification
Full suite green: 167 files / 1231 tests. All four structure gates and lint pass.
Five new tests cover the grouped ordering, the shortened + localised label, the single-window case that must omit the suffix, and that the description reaches the hint while leaving the item.
π€ Generated with Claude Code