fix: show no budget instead of unlimited for empty group AI budget (#27993)

An empty per-member AI budget on the group settings page previously
displayed "unlimited budget" with a "Members in this group have no
spending cap." alert. Unlimited spend only applies when the everyone
group is the sole group, so this messaging was misleading everywhere
else.

## Changes

- Empty budget now shows "This group has **no budget** set. View docs"
with no info alert. "View docs" links to [Effective group
resolution](https://coder.com/docs/ai-coder/ai-gateway/cost-controls#effective-group-resolution)
using the versioned `docs()` helper.
- Removed the "Members in this group have no spending cap." alert
entirely.
- Input placeholder changed from `unlimited` to `no budget`.
- Updated the `AIBudgetUncapped` story expectations to match.

## Unchanged

- Entering an explicit `$0` still shows the "A $0 limit disables AI
access for this group." alert, as before.
- Saving with an empty field still sends `null` to the budget API;
backend semantics are untouched.

Story tests pass: `pnpm test:storybook
src/pages/GroupsPage/GroupSettingsPageView.stories.tsx` (7/7).

---

*This PR was generated by Coder Agents on behalf of @tracyjohnsonux.*
This commit is contained in:
TJ
2026-08-19 06:15:06 -07:00
committed by GitHub
parent da99941099
commit 97cb722fb8
3 changed files with 72 additions and 22 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ member can spend $200 USD and the group has a total spend limit of $2,000 USD.
Budget values behave as follows:
- An empty field means no limit. The field displays `unlimited`.
- An empty field means no budget is set. The field displays `no budget`.
- `$0 USD` blocks every request routed via AI Gateway from members whose
effective group is this group.
- The maximum is `$1,000,000 USD` per member per budget period.