GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||
GeezerVison is showing github.com — feat: track provider usage and project weekly quota by Aditya190803 · Pull Request #1605 · pingdotgg/t3code Conversation
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 11eab91d87
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const mergedUsage = mergeProviderUsage(cachedUsage, provider.usage); | ||
| if (mergedUsage !== undefined) { | ||
| nextCache[provider.provider] = mergedUsage; | ||
| continue; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Drop stale usage cache when provider snapshot has no usage
In mergeUsageCacheFromProviders, stale entries are never evicted because mergeProviderUsage(cachedUsage, provider.usage) returns cachedUsage whenever the new snapshot omits usage, so the mergedUsage !== undefined branch always keeps the cache and bypasses shouldKeepCachedUsage. This means a newer provider snapshot (checkedAt later than cached updatedAt) can still be served with outdated quota buckets via serverGetConfig and server.providersUpdated.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (limit !== null && limit > 0) { | ||
| return normalizePercent((usage / limit) * 100); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Avoid double-scaling low usage percentages
derivePercentFromUsage converts absolute usage to percent with (usage / limit) * 100, then passes that result to normalizePercent, which multiplies any value <= 1 by 100 again. For low-but-valid percentages (for example usage=1, limit=1000), this reports 10% instead of 0.1%, causing major quota misreporting near the start of a window.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
2c50e2d to
6b8ed4d
Compare
|
I cleaned up the branch history to reduce review noise and make the change set easier to reason about. What changed:
Current commit structure:
Behavior/correctness included in this cleaned history:
Validation run locally:
No functional intent change; this is primarily a history hygiene pass for clearer review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please add screenshots |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
d9e0e20 to
00875eb
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Needs human review This PR introduces substantial new functionality for tracking and displaying provider usage quotas across Claude and Codex providers. There are unresolved review comments identifying potential bugs in usage percentage calculations and cache staleness handling that warrant human attention before merging. You can customize Macroscope's approvability policy. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
… provider usage normalization
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@juliusmarminge this branch got pretty janky and inconsistent so i rebuilt it cleanly new PR here: #1732 closing this one to avoid confusion |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
feat: add usage / quota visibility for Codex sessions and accounts
There was an error while loading. Please reload this page.