feat(admin): list-plus-detail redesign of the admin users screen (BUNYIP-405) #403
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/BUNYIP-405-admin-user-detail"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Redesigns the admin users screen into the requested list-plus-detail pattern. The list was cluttered with 7 inline action buttons per row (View, Entitlements, Make Admin/Demote, Reset Password, Lifetime, Suspend, Delete); those actions now live only in the per-user detail view.
Key finding
The detail view (
/admin/users/{id}) already existed and already hosts every management action - entitlements, promote/demote, reset password, lifetime grant/revoke, suspend, delete - plus identity/security and active-rate-limit cards. So no detail changes were needed; the work is the list.List changes
Extracted a
user_list_rowhelper (unit-testable):find_by_id(deleted_at IS NULL), so the detail view is unreachable for them. This matches the ticket, whose detail-action list omits reactivate and asks to keep the Active/Suspended split.Added a
chevron-righticon glyph.Acceptance criteria
/admin/users/{id}).Verification
just check-containergreen: fmt + clippy-D warnings+ all test binaries (119 web tests). Three new render tests: active row links to detail with no inline forms; unverified row shows the indicator; suspended row keeps Reactivate and is not a detail link.🤖 Generated with Claude Code
The admin users list rendered every management action inline on each row - View, Entitlements, Make Admin/Demote, Reset Password, Lifetime, Suspend, Delete - which was cluttered and gave no stable per-user URL. Reorganized into the requested list-plus-detail pattern. The per-user detail view (`/admin/users/{id}`) already existed and already hosts every action (entitlements, promote/demote, reset password, lifetime grant/revoke, suspend, delete) plus the identity/security and active-rate-limit cards, so no detail changes were needed - the work is the list. List changes (new `user_list_row` helper, so it is unit-testable): - Active rows are now lightweight and the WHOLE row is a link into the detail view. Each shows identity, the Admin badge, and an explicit verified/unverified indicator (green check "Verified" / amber "Unverified"), with a disclosure chevron and a hover highlight. No action buttons on the row. - Suspended rows keep their single inline Reactivate action and are intentionally NOT links: a soft-deleted user 404s on `find_by_id` (which filters `deleted_at IS NULL`), so the detail view is not reachable for them. This matches the ticket, whose detail-action list omits reactivate and asks to keep the Active/Suspended split. - The Active/Suspended tabs, search, and pagination are unchanged. Added a `chevron-right` icon glyph and three render tests: an active row links to the detail with no inline action forms, an unverified row shows the Unverified indicator, and a suspended row keeps Reactivate and is not a detail link. Verified: `just check-container` green (fmt + clippy -D warnings + all test binaries, 119 web tests). Actions are unchanged handlers already reachable from the detail view, so their behaviour and redirects are as before. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5dcYueNHByRnWJDYoDX1W