Skip to content

fix: avoid error when AI usage is zero #19388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 20, 2025
Merged

Conversation

deansheather
Copy link
Member

Fixes a bug that prevents the managed AI agent usage from showing in the licenses page of the dashboard when the usage is zero. Adds a story with this case as well.

!usage is true when usage == 0.

image

Fixes a bug that prevents the managed AI agent usage from showing in the
licenses page of the dashboard when the usage is zero.
Comment on lines 41 to 43
const usage = managedAgentFeature.actual ?? 0;
const included = managedAgentFeature.soft_limit ?? 0;
const limit = managedAgentFeature.limit ?? 0;
Copy link
Member

@aslilac aslilac Aug 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not coercing these to 0 was intentional. if we get past the enabled check then these need to be some positive integer. (except usage, which can also be 0)

@deansheather deansheather enabled auto-merge (squash) August 20, 2025 07:16
@deansheather deansheather merged commit 67da780 into main Aug 20, 2025
31 of 32 checks passed
@deansheather deansheather deleted the dean/fix-agent-usage-0 branch August 20, 2025 07:22
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy