feat(site/src/pages/GroupsPage): link Budget group name to the group page - #28137
Draft
ssncferreira wants to merge 2 commits into
Draft
feat(site/src/pages/GroupsPage): link Budget group name to the group page#28137ssncferreira wants to merge 2 commits into
ssncferreira wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On the group members page, the Budget group column shows which group (or individual override) governs a member's AI budget. This makes the group name in that column a link to the corresponding group page.
Example: viewing the Everyone group, a member whose effective budget group is
testnow showstestas a link that navigates straight to thetestgroup page.Details
(individual)and(not allocated)remain plain text and are excluded from the link, as requested./organizations/{org}/groups/{effective_group_id}. The:groupNameroute segment accepts a group id or name, so linking by the effective group id is unambiguous and works for the Everyone group (whose id equals the organization id), the current group, and any other named group.Testing
make lintequivalents ran via pre-commit hooks:lint/ts,lint/go,lint/emdash, and the slim build all pass.GroupMemberBudgetCells.stories.tsxwere updated to assert the link target (href) and that the suffix text stays outside the link.@coder/pixel-storybook/storyapiexport resolution error unrelated to this change (it fails to import the story file even on an unmodified tree). CI should run these stories.Implementation notes
The rendering was refactored into a small
BudgetGroupBadgehelper that takes aname, an optionalhref, and an optionalsuffix. The name is wrapped in aRouterLinkwhen anhrefis available; the suffix is rendered as sibling inline text within a single innerspanso the badge's flexgapdoes not add spacing between the name and the suffix.This PR was generated by Coder Agents on behalf of @ssncferreira.