Skip to content

Bulk: batch-delete selected items from the collection list #163

Description

@mforce

FOLLOW-UP from issue #89 / PR #161 review. Issue #89 section 2 listed a bulk Delete action in the action bar (batch DELETE via the existing per-id endpoint). PR #161 shipped the bulk update bar (Edit selected + clear) but not batch delete. Carry as a follow-up: add a confirm-delete flow that issues DELETE per selected id (reusing DELETE /api/:type/:id) with atomic-ish handling.

Placement refinement

The batch-delete action should be reachable from the "Edit selected" modal (the bulk-action modal on the collection list), not only as a separate action-bar button. So the modal gets a second path alongside the update/clear actions: a "Delete selected" option that opens a confirm step before issuing the deletes.

  • Client: add a delete branch to the existing bulk modal on the collection list (the modal already knows the selected ids); confirm step due to destructiveness.
  • Server: reuse the existing per-id DELETE /api/:type/:id per selected id (the per-id endpoint already enforces ownership). A dedicated bulk-delete endpoint is optional; per-id deletes keep it simple and atomic per item. If a batch endpoint is added, mirror the atomic 404-on-any-unknown-id semantics and ownership isolation of the bulk update path.
  • The collection list endpoint already caps at 500 (CollectionEndpoints.cs:85); a delete-selected flow should clear the selection and refresh the list after completion.
  • Tests: cover ownership isolation (a foreign owner's id must not delete) and that selected ids are actually removed.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions