Skip to content

feat(site/src/pages/GroupsPage): link Budget group name to the group page - #28137

Draft
ssncferreira wants to merge 2 commits into
mainfrom
ssncferreira/budget-group-link
Draft

feat(site/src/pages/GroupsPage): link Budget group name to the group page#28137
ssncferreira wants to merge 2 commits into
mainfrom
ssncferreira/budget-group-link

Conversation

@ssncferreira

Copy link
Copy Markdown
Contributor

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 test now shows test as a link that navigates straight to the test group page.

Details

  • Only the group name is linked. Trailing qualifiers such as (individual) and (not allocated) remain plain text and are excluded from the link, as requested.
  • The link targets /organizations/{org}/groups/{effective_group_id}. The :groupName route 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.
  • Cases that can't be resolved to a group page are unchanged: no budget data, an unresolved cross-organization group (em dash + tooltip), and the loading spinner remain link-free.

Testing

  • make lint equivalents ran via pre-commit hooks: lint/ts, lint/go, lint/emdash, and the slim build all pass.
  • Storybook interaction tests in GroupMemberBudgetCells.stories.tsx were updated to assert the link target (href) and that the suffix text stays outside the link.
  • Note: the Storybook vitest browser runner could not execute in this environment due to a pre-existing @coder/pixel-storybook/storyapi export 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 BudgetGroupBadge helper that takes a name, an optional href, and an optional suffix. The name is wrapped in a RouterLink when an href is available; the suffix is rendered as sibling inline text within a single inner span so the badge's flex gap does not add spacing between the name and the suffix.


This PR was generated by Coder Agents on behalf of @ssncferreira.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant