-
Notifications
You must be signed in to change notification settings - Fork 949
chore: add managed ai usage consumption to license view #18934
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
base: main
Are you sure you want to change the base?
Conversation
site/src/pages/DeploymentSettingsPage/LicensesSettingsPage/ManagedAgentsConsumption.stories.tsx
Show resolved
Hide resolved
site/src/pages/DeploymentSettingsPage/LicensesSettingsPage/ManagedAgentsConsumption.tsx
Outdated
Show resolved
Hide resolved
site/src/pages/DeploymentSettingsPage/LicensesSettingsPage/ManagedAgentsConsumption.tsx
Outdated
Show resolved
Hide resolved
site/src/pages/DeploymentSettingsPage/LicensesSettingsPage/ManagedAgentsConsumption.tsx
Show resolved
Hide resolved
site/src/pages/DeploymentSettingsPage/LicensesSettingsPage/ManagedAgentsConsumption.tsx
Outdated
Show resolved
Hide resolved
site/src/pages/DeploymentSettingsPage/LicensesSettingsPage/ManagedAgentsConsumption.tsx
Outdated
Show resolved
Hide resolved
1bb6714
to
bcb7faa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Video looks great! Deferring to a frontend person to approve, though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The "Disabled" story shows NaN on the page which seems like a bug
- I would expect the "near limit" bar to not be green anymore. Maybe yellow or orange instead.
- You've got a mixture of Tailwind styles and Emotion styles in the
ManagedAgentsConsumption
component. New use of Emotion is discouraged, please just use Tailwind (but using thestyle
prop for the percentage math is correct) - It feels weird the have the bar "full" when it's only visually 50% filled. I wonder if the usage bar should be non-linear. For example the first 80% could always be in the range
[0, softLimit]
and the last 20% could be in the range[softLimit, hardLimit]
.
const managedAgentLimitStarts = managedAgentFeature?.usage_period?.start; | ||
const managedAgentLimitExpires = managedAgentFeature?.usage_period?.end; | ||
const managedAgentFeatureEnabled = managedAgentFeature?.enabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only place these variables are used is to be passed in to ManagedAgentsConsumption
. Why does that component take all of the values individually rather than just taking a Feature
?
usage={managedAgentFeature.actual || 0} | ||
included={managedAgentFeature.soft_limit || 0} | ||
limit={managedAgentFeature.limit || 0} | ||
startDate={managedAgentLimitStarts || ""} | ||
endDate={managedAgentLimitExpires || ""} | ||
enabled={managedAgentFeatureEnabled} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and then we don't need to do this defaulting here. we should do some validation inside of this component and return null
or an <ErrorAlert>
if the feature
passed in is incorrect.
Managed agents are counted based on the amount of successfully | ||
started workspaces with an AI agent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Managed agents are counted based on the amount of successfully | |
started workspaces with an AI agent. | |
Managed agents are counted based on the amount of running | |
workspaces with an AI agent. |
className="rounded-[2px] bg-highlight-green size-3 inline-block" | ||
aria-label="Legend for current usage in the chart" | ||
/> | ||
Amount of started workspaces with an AI agent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amount of started workspaces with an AI agent. | |
Running workspaces with an AI agent |
I feel like legend items don't usually have punctuation at the end
className="rounded-[2px] bg-content-disabled size-3 inline-block" | ||
aria-label="Legend for included allowance in the chart" | ||
/> | ||
Included allowance from your current license plan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Included allowance from your current license plan. | |
Allowance |
Customers with licenses not supporting managed AI agents will receive the following information:

Customers with active licenes for managed AI agents will see:
