Skip to content

ux(users): bulk-action checkboxes have no visible target — wire up toolbar or remove #974

Description

@cristim

Symptom

In the Users section of Settings, each user row has a checkbox in front of it. Boxes can be checked / unchecked but nothing visible happens — no toolbar appears, no bulk-action button enables, no selection counter shows. The interaction is a dead end from the user's perspective.

What's actually in the code

The bulk-action infrastructure exists in frontend/src/users/:

  • bulkDeleteUsers() — wired to button id #bulk-delete-btn (handlers.ts:66-69)
  • bulkAddToGroup(groupId) — wired to button id #bulk-group-btn (handlers.ts:75-81)
  • Selected-user state lives in frontend/src/users/state.ts

bulkChangeRole was removed in PR #912 when the role concept was dropped, and its button (#bulk-role-btn) was deliberately removed (handlers.ts:71).

The handlers use document.getElementById('bulk-delete-btn') etc. with a null guard — when the elements aren't in the DOM they silently no-op. That's almost certainly what's happening today: the buttons are missing from the rendered HTML so the checkboxes look non-functional.

Two ways to fix

(a) Surface the bulk actions — render #bulk-delete-btn + #bulk-group-btn (plus a group-picker for the latter) in the Users tab toolbar, visible when ≥1 user is selected. Optionally add a selection counter. The wiring is already in place; this is just the HTML/template side. Recommended since the logic, tests, and API endpoints exist.

(b) Remove the checkboxes — strip the per-row checkbox from the Users table template if you don't want to expose bulk actions to admins. Also remove the now-dead selection state and the bulkDeleteUsers / bulkAddToGroup functions.

Recommendation

Option (a). The work to bring back the existing bulk actions is ~one PR (toolbar render + show-on-selection + group-picker dropdown). The state, action functions, and backend endpoints already exist.

Acceptance

  • Selecting ≥1 user row reveals a bulk-actions toolbar (or enables a previously-disabled toolbar)
  • "Delete N users" button visible, confirms then calls bulkDeleteUsers()
  • "Add to group..." dropdown visible, on selection calls bulkAddToGroup(groupId)
  • Unchecking all rows hides/disables the toolbar
  • Regression test in frontend/src/__tests__/users.test.ts covers the checkbox → toolbar → action wiring

Files likely touched

  • frontend/src/users.ts or wherever the Users tab template lives
  • frontend/src/users/handlers.ts
  • frontend/src/users/state.ts (only if state shape needs adjustment)
  • A new test in frontend/src/__tests__/users.test.ts

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/sHoursimpact/fewLimited audiencepr-createdA PR has been opened for this issue (dedup guard for the auto-PR loop)pr-mergedThe PR for this issue has been mergedpriority/p3Polish / idea / may never shipseverity/lowMinor harmtriagedItem has been triagedtype/bugDefecturgency/this-sprintWithin the current sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions