Skip to content

feat(web): show each user's groups in the admin users list - #1923

Merged
joshunrau merged 1 commit into
mainfrom
feat/admin-users-groups
Nov 18, 2026
Merged

joshunrau merged 1 commit into
mainfrom
feat/admin-users-groups

Conversation

@thomasbeaudry

Copy link
Copy Markdown
Collaborator

Admins can now see which groups each user belongs to straight from /admin/users, without opening every user.

Changes

  • The users table has a sortable Groups column. It shows "None", the single group's name, or the first group alphabetically followed by +N for the rest.
  • Hovering (or focusing) the cell opens a tooltip listing every group the user belongs to.
  • The route loader prefetches /v1/groups alongside /v1/users, so the names render without a second waterfall.

Decisions

  • Group names are resolved on the client from the existing groups query rather than by adding names to the /v1/users response, so the change is web-only and the API contract is untouched.
  • A group id missing from the groups list is left out of the cell rather than shown as a raw id, matching how /admin/users/$userId already filters user.groupIds against the groups it can read. Such an id is legitimate: the route has no admin guard, so a group manager reaches it and reads only the groups they manage.
  • The libui Tooltip is used instead of TruncatedCell's native title, because it can show the list one group per line. The users table is small, so the per-row tooltip root is not the cost it is in record tables.

Adversarial review

Reviewed at commit 5d130eb. pnpm check: green.

Findings

  1. apps/web/src/routes/_app/admin/users/tests/index.test.tsx:105 — group fixtures make id order match name order, so the name-sort tests (and the e2e) would still pass if the code sorted by group id — reorder the fixtures so id and name orders differ, and create B Group before A Group in the e2e

Fixed

    1. Fixtures now map group-a→Gamma, group-b→Alpha, group-c→Beta with expectations updated, and the e2e creates the B group first; an id-sort mutation now fails the tests.

Attestation

I, Claude Opus 5.5, attest that the review block above reports the adversarial review as it ran on the commit named, with every finding it returned.

🤖 Generated with Claude Code

A Groups column lists the first group by name with a count of the rest,
and hovering it shows every group the user belongs to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the Status: Waiting on Review Automated: unreviewed, pushed since the last review, or review re-requested label Nov 18, 2026
@joshunrau
joshunrau merged commit bdf1edb into main Nov 18, 2026
7 checks passed
@joshunrau
joshunrau deleted the feat/admin-users-groups branch November 18, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Waiting on Review Automated: unreviewed, pushed since the last review, or review re-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants