Conversation
… page for more information.` messaging
…coder/ai-governance")`
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b1113a2d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| const usagePercentage = Math.min((usage / limit) * 100, 100); | ||
| const includedPercentage = Math.min((included / limit) * 100, 100); | ||
| const remainingPercentage = Math.max(100 - includedPercentage, 0); | ||
| const usagePercentage = Math.min((usage / included) * 100, 100); |
There was a problem hiding this comment.
Guard against zero included allowance in usage percentage
The new usagePercentage formula divides by included, but soft_limit can legitimately be 0 (for licenses with no included allowance). In that case, usage=0 yields NaN, which is then passed to style.width as NaN%, so the progress bar renders incorrectly and is treated as exceeded (NaN < 100 is false). Please handle included === 0 explicitly before computing the percentage.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is being fixed in a follow-up PR, #22048
site/src/modules/dashboard/LicenseBanner/LicenseBannerView.stories.tsx
Outdated
Show resolved
Hide resolved
Documentation CheckUpdates Needed
AnalysisThis PR changes managed agent limits from hard enforcement to soft enforcement (advisory warnings only). After reviewing the current documentation: ✅ Documentation is already accurate:
Minor consideration (optional enhancement):
Conclusion: No documentation changes are required. The existing documentation already accurately reflects the advisory-only nature of managed agent limits. Automated review via Coder Tasks |

In relation to
internal#1281Managed agent workspace build limits are now advisory only. Breaching the limit no longer blocks workspace creation — it only surfaces a warning.
checkAIBuildUsageso AI task builds are always permitted regardless of managed agent count.ManagedAgentsConsumptionprogress bar — the bar is now relative to the included allowance (soft limit) only, and turns orange when usage exceeds it.Bonus:
LicenseBannerView— replaced Emotion CSS and MUILinkwith Tailwind classes.highlight-orangecolor token to the Tailwind theme.