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
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)frontend/src/users/state.tsbulkChangeRolewas 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/bulkAddToGroupfunctions.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
bulkDeleteUsers()bulkAddToGroup(groupId)frontend/src/__tests__/users.test.tscovers the checkbox → toolbar → action wiringFiles likely touched
frontend/src/users.tsor wherever the Users tab template livesfrontend/src/users/handlers.tsfrontend/src/users/state.ts(only if state shape needs adjustment)frontend/src/__tests__/users.test.ts