Skip to content

Add bulk delete for videos #19

@yusufipk

Description

@yusufipk

Summary

Allow project owners/admins to select and delete multiple videos at once from the project page, instead of deleting them one at a time from each video card.

Current behavior

  • Videos can only be deleted individually via the per-card menu (VideoCard → Delete).
  • The API supports single-video deletion only: DELETE /api/projects/[projectId]/videos/[videoId].
  • Deleting many videos in a large project is slow and tedious.

Expected behavior

  • Multi-select mode on the project video grid (checkboxes or similar).
  • A bulk action bar with Delete selected (and optionally select all / clear selection).
  • Confirmation dialog summarizing how many videos will be deleted and that versions, comments, and assets are included.
  • Progress/feedback while bulk deletion runs; partial failures reported clearly.
  • Reuse existing cleanup logic (Bunny stream, R2 media) per video.

Technical notes

  • Existing single-delete handler in app/api/projects/[projectId]/videos/[videoId]/route.ts already handles Bunny/R2 cleanup — bulk endpoint or batched calls should share that logic.
  • Project page UI lives in app/(dashboard)/projects/[projectId]/project-content-client.tsx with VideoCard components.
  • Authorization: same as single delete — project owner or admin (checkProjectAccess with intent: 'manage').

Acceptance criteria

  • User can enter selection mode and select multiple videos on the project page
  • Bulk delete requires confirmation before proceeding
  • Selected videos are removed from the UI after successful deletion
  • Media cleanup (Bunny/R2) runs for each deleted video; warnings surfaced if cleanup partially fails
  • Unauthorized users cannot bulk delete

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions