Dashboard Bulk Operations
Purpose
Plan multi-item admin actions (bulk edit, delete, export, status change) so they are explicit, permissioned per item, executed server-side as batches, and honest about partial failure. Bulk operations are the dashboard's highest-blast-radius feature — designed, not improvised.
When to Use
- When admins need to act on many rows at once from
dashboard-tables selections.
- When an existing dashboard loops client-side requests or has ambiguous "select all" semantics.
- Not for single-row actions or report exports (
dashboard-reporting).
Inputs
- The bulk-action inventory: which entities, which actions, typical/maximum batch sizes.
- Selection semantics from
dashboard-tables; permission model from dashboard-permissions.
- Backend batch capabilities (
web-api-integration).
Discovery Questions
- Which bulk actions are needed, and which are destructive or irreversible?
- Does "select all" need to mean all matching the filter (server-defined set) or just the loaded page?
- What batch sizes are realistic — and can the backend process them synchronously, or is a job queue needed?
- What does recovery look like: undo window, soft delete, restore from audit?
Responsibilities
- Define selection scope precisely: page selection vs all-matching-filter, with the UI stating the exact count and scope before any action.
- Require explicit confirmation proportional to risk: count + action + scope restated; destructive actions get stronger friction (typed confirmation) — never a silent one-click mass delete.
- Plan server-side batch endpoints: one request describing the set (ids or filter + snapshot criteria), not N client-side calls; long batches become async jobs with status polling (
web-server-state).
- Enforce permissions per item server-side — a batch containing one forbidden item either fails that item explicitly or rejects, per a decided policy (never silently skips).
- Design progress + partial-failure reporting: what succeeded, what failed, why, and what the admin can retry — no "some items may have failed."
- Plan idempotency (operation keys so retries don't double-apply) and undo where feasible (soft delete/restore window) — and say explicitly when an action is irreversible.
- Audit-log every bulk operation: actor, action, item set (or filter), outcome counts (
dashboard-permissions).
Required Workflow
- Inventory bulk actions with risk levels and batch sizes.
- Fix selection-scope semantics with
dashboard-tables.
- Design batch endpoints (sync vs async job) with the backend.
- Define confirmation UX, partial-failure reporting, idempotency, and undo policy per action.
- Record the plan; align per-item enforcement and audit with
dashboard-permissions.
Decision Rules
- Filter-scoped operations execute against the server's evaluation of the filter at execution time — the plan states how drift between "what the admin saw" and "what executes" is handled.
- Async job when the batch can exceed a few seconds or the request-size limit; sync otherwise.
- Prefer soft delete + restore for bulk destructive actions unless storage/compliance forbids it.
- Partial failure is a first-class outcome with per-item results — all-or-nothing only where the domain demands a transaction.
Rules
- No bulk action ships without confirmation UX, per-item server enforcement, and audit logging.
- Client-side loops issuing hundreds of single-item requests are not a batch implementation.
- Failed items are reported with reasons and remain retryable; success messages state exact counts.
Anti-Patterns
- "Select all" that silently means the current page (or silently means everything).
- One ambiguous confirm dialog ("Are you sure?") before deleting 10,000 records.
- Swallowing partial failures behind a green toast.
- Retried batches double-applying because nothing was idempotent.
Validation Checklist
Definition of Done
A recorded bulk-operations plan — exact selection semantics, confirmation UX, server-side batch/job design, per-item enforcement, partial-failure and undo policy, and audit logging — under which no admin can unknowingly perform a mass action.
Related Skills
dashboard-tables, dashboard-permissions, web-server-state, web-api-integration, web-error-handling, ../../security-review.
Related Knowledge
../../../knowledge/ (entity lifecycle, retention/compliance rules).
Related References
../../../references/web/dashboard/ (bulk-op specs — when populated).
Context Loading Guidance
- Requires: bulk-action inventory, selection semantics, backend batch capabilities.
- Does not require: report/chart detail, customer-app features.
- May load:
dashboard-permissions for enforcement/audit; web-error-handling for failure surfacing.
- Stop when: per-action semantics and safeguards are recorded.
Token Efficiency Guidance
One row per action: entity → action → scope → sync/async → undo → audit. Reserve prose for the destructive cases.
1---2name: dashboard-bulk-operations3description: Use to plan dashboard bulk operations — selection scope (page vs all-matching-filter), explicit confirmation with counts, server-side batch endpoints, per-item permission checks, progress and partial-failure reporting, idempotency, undo where feasible, and audit logging.4---56# Dashboard Bulk Operations78## Purpose910Plan multi-item admin actions (bulk edit, delete, export, status change) so they are explicit, permissioned per item, executed server-side as batches, and honest about partial failure. Bulk operations are the dashboard's highest-blast-radius feature — designed, not improvised.1112## When to Use1314- When admins need to act on many rows at once from `dashboard-tables` selections.15- When an existing dashboard loops client-side requests or has ambiguous "select all" semantics.16- **Not** for single-row actions or report exports (`dashboard-reporting`).1718## Inputs1920- The bulk-action inventory: which entities, which actions, typical/maximum batch sizes.21- Selection semantics from `dashboard-tables`; permission model from `dashboard-permissions`.22- Backend batch capabilities (`web-api-integration`).2324## Discovery Questions2526- Which bulk actions are needed, and which are destructive or irreversible?27- Does "select all" need to mean **all matching the filter** (server-defined set) or just the loaded page?28- What batch sizes are realistic — and can the backend process them synchronously, or is a job queue needed?29- What does recovery look like: undo window, soft delete, restore from audit?3031## Responsibilities3233- Define **selection scope** precisely: page selection vs all-matching-filter, with the UI stating the exact count and scope before any action.34- Require **explicit confirmation** proportional to risk: count + action + scope restated; destructive actions get stronger friction (typed confirmation) — never a silent one-click mass delete.35- Plan **server-side batch endpoints**: one request describing the set (ids or filter + snapshot criteria), not N client-side calls; long batches become **async jobs** with status polling (`web-server-state`).36- Enforce **permissions per item** server-side — a batch containing one forbidden item either fails that item explicitly or rejects, per a decided policy (never silently skips).37- Design **progress + partial-failure reporting**: what succeeded, what failed, why, and what the admin can retry — no "some items may have failed."38- Plan **idempotency** (operation keys so retries don't double-apply) and **undo** where feasible (soft delete/restore window) — and say explicitly when an action is irreversible.39- **Audit-log** every bulk operation: actor, action, item set (or filter), outcome counts (`dashboard-permissions`).4041## Required Workflow42431. Inventory bulk actions with risk levels and batch sizes.442. Fix selection-scope semantics with `dashboard-tables`.453. Design batch endpoints (sync vs async job) with the backend.464. Define confirmation UX, partial-failure reporting, idempotency, and undo policy per action.475. Record the plan; align per-item enforcement and audit with `dashboard-permissions`.4849## Decision Rules5051- Filter-scoped operations execute against the **server's** evaluation of the filter at execution time — the plan states how drift between "what the admin saw" and "what executes" is handled.52- Async job when the batch can exceed a few seconds or the request-size limit; sync otherwise.53- Prefer soft delete + restore for bulk destructive actions unless storage/compliance forbids it.54- Partial failure is a first-class outcome with per-item results — all-or-nothing only where the domain demands a transaction.5556## Rules5758- No bulk action ships without confirmation UX, per-item server enforcement, and audit logging.59- Client-side loops issuing hundreds of single-item requests are not a batch implementation.60- Failed items are reported with reasons and remain retryable; success messages state exact counts.6162## Anti-Patterns6364- "Select all" that silently means the current page (or silently means everything).65- One ambiguous confirm dialog ("Are you sure?") before deleting 10,000 records.66- Swallowing partial failures behind a green toast.67- Retried batches double-applying because nothing was idempotent.6869## Validation Checklist7071- [ ] Bulk actions inventoried with risk and size profiles.72- [ ] Selection scope semantics exact and surfaced in the UI with counts.73- [ ] Server-side batch (or async job) design per action; no client-side fan-out.74- [ ] Per-item permission policy and audit logging defined.75- [ ] Partial-failure reporting, idempotency, and undo/irreversibility policy recorded per action.7677## Definition of Done7879A recorded bulk-operations plan — exact selection semantics, confirmation UX, server-side batch/job design, per-item enforcement, partial-failure and undo policy, and audit logging — under which no admin can unknowingly perform a mass action.8081## Related Skills8283`dashboard-tables`, `dashboard-permissions`, `web-server-state`, `web-api-integration`, `web-error-handling`, `../../security-review`.8485## Related Knowledge8687`../../../knowledge/` (entity lifecycle, retention/compliance rules).8889## Related References9091`../../../references/web/dashboard/` (bulk-op specs — when populated).9293## Context Loading Guidance9495- **Requires:** bulk-action inventory, selection semantics, backend batch capabilities.96- **Does not require:** report/chart detail, customer-app features.97- **May load:** `dashboard-permissions` for enforcement/audit; `web-error-handling` for failure surfacing.98- **Stop when:** per-action semantics and safeguards are recorded.99100## Token Efficiency Guidance101102One row per action: entity → action → scope → sync/async → undo → audit. Reserve prose for the destructive cases.