Improve AI credit balance meter - #4681
Open
shaunandrews wants to merge 4 commits into
Open
Conversation
nightnei
reviewed
Aug 25, 2026
| } | ||
|
|
||
| const remaining = ( quota.allowanceRemaining ?? 0 ) + ( quota.purchasedRemaining ?? 0 ); | ||
| const usedFraction = quota.costCap > 0 ? quota.costUsage / quota.costCap : 0; |
Contributor
There was a problem hiding this comment.
costCap and costUsage - store info only about free allowance. We don't have functionality on the backend yet to return info costCapFOR_PURCHASED_CREDITS and costUsageFOR_PURCHASED_CREDITS.
Also, I remember you wanted to have this p1787155322763389/1787154068.417469-slack-C0BM2EL2Q7Q, which may even require effort from the Shilling team.
That's why I didn't include it in the initial release, since it's not a quick feature, it requires more effort than UI changes.
I propose closing this branch, and I will work on it later.
Collaborator
📊 Performance Test ResultsComparing 5bfc5c3 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
nightnei
force-pushed
the
improve-ai-credits-meter
branch
from
August 31, 2026 14:55
f7dba99 to
ba8ca13
Compare
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.
Related issues
Fixes STU-2334
How AI was used in this PR
Assisted
Proposed Changes
With this PR we are adding AI credits balance meter to composer, which reflects the state from Settings -> Usage
Testing Instructions