feat: convert soft_limit to limit (cherry-pick/v2.29)#22207
feat: convert soft_limit to limit (cherry-pick/v2.29)#22207f0ssel merged 3 commits intorelease/2.29from
soft_limit to limit (cherry-pick/v2.29)#22207Conversation
soft_limit to limitsoft_limit to limit (cherry-pick/v2.29)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82d4c7628d
ℹ️ 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".
| ): Pick<React.ComponentProps<typeof Link>, "href" | "children" | "target"> => { | ||
| if (message === LicenseManagedAgentLimitExceededWarningText) { | ||
| return { | ||
| href: docs("/ai-coder/ai-governance"), |
There was a problem hiding this comment.
Point managed-agent warning CTA to a valid docs path
The new managed-agent warning CTA uses docs("/ai-coder/ai-governance"), but there is no matching route in this repo’s docs index (docs/manifest.json) or docs/ai-coder content, so users who hit this warning are sent to a dead page instead of remediation guidance. Please switch this link target to an existing AI governance/tasks document path.
Useful? React with 👍 / 👎.
In relation to [`internal#1281`](coder/internal#1281) Managed agent workspace build limits are now advisory only. Breaching the limit no longer blocks workspace creation — it only surfaces a warning. - Removed hard-limit enforcement in `checkAIBuildUsage` so AI task builds are always permitted regardless of managed agent count. - Updated the license warning to remove "Further managed agent builds will be blocked." verbiage. - Updated tests to assert builds succeed beyond the limit instead of failing. - Removed the "Limit" display from the `ManagedAgentsConsumption` progress bar — the bar is now relative to the included allowance (soft limit) only, and turns orange when usage exceeds it. Bonus: - De-MUI'd `LicenseBannerView` — replaced Emotion CSS and MUI `Link` with Tailwind classes. - Added `highlight-orange` color token to the Tailwind theme. (cherry picked from commit 2038997)
In relation to [`internal#1281`](coder/internal#1281) Remove the `soft_limit` field from the `Feature` type and simplify license limit handling. This change: - Removes the `soft_limit` field from the API and SDK - Uses the soft limit value as the single `limit` value in the UI and API - Simplifies warning logic to only show warnings when the limit is exceeded - Updates tests to reflect the new behavior - Updates the UI to use the single limit value for display (cherry picked from commit 051ed34)
#21998 accidentally allowed `Managed Agents` usages whilst being on an `Enterprise` license. This was incorrect, it should work as the following (same as prior to #21998). | Scenario | Before your PRs | After your PRs (bug) | After this fix | |---|---|---|---| | Unlicensed (AGPL) | Permitted | Permitted | Permitted | | Licensed, no entitlement | **Blocked** | Permitted | **Blocked** | | Licensed, explicitly disabled (limit=0) | **Blocked** | Permitted | **Blocked** | | Licensed, entitled, under limit | Permitted | Permitted | Permitted | | Licensed, entitled, over limit | Blocked | Permitted (advisory) | Permitted (advisory) | | Any license, stop/delete | Permitted | Permitted | Permitted | | Any license, non-AI build | Permitted | Permitted | Permitted |
7caed3b to
c96a230
Compare
Related
internal#1281Cherry picks two pull-requests in
release/2.29.soft_limittolimit#22048Managed AgentsonEnterprise#22210