Skip to content

Conversation

@ShivaGupta-14
Copy link
Contributor

Description

This PR introduces bulk task actions to CCSync, allowing users to efficiently manage multiple tasks at once. Users can now select multiple tasks via checkboxes and perform bulk operations like "Mark as Completed" or "Delete" through a floating action panel.

Key Enhancements

  • Added checkboxes to individual task rows and a "Select All" checkbox in the table header
  • Implemented a floating action panel that appears when tasks are selected
  • Added backend endpoints for bulk complete (POST /complete-tasks) and bulk delete (POST /delete-tasks)
  • Updated frontend state to efficiently track selected UUIDs
  • Added confirmation dialogs and loading states for better user experience
  • Added comprehensive tests for bulk selection logic, API integration, and UI interactions

Implementation Details

The bulk selection state is managed locally within the Tasks component using a Set of UUIDs to ensure O(1) lookups and efficient updates.

  • Frontend:
    • The selectedTaskUUIDs state tracks which tasks are currently selected.
    • A floating action bar is conditionally rendered when selectedTaskUUIDs.size > 0.
    • "Select All" logic toggles between adding all visible task UUIDs to the set or clearing it entirely.
  • Backend:
    • Two new endpoints were created to handle batch operations: /complete-tasks and /delete-tasks.
    • Both endpoints accept a JSON body containing an array of uuids.
    • The backend iterates through the provided UUIDs and performs the requested action (modify status or delete) transactionally where possible to ensure data consistency.

Fixes: #178


Checklist

  • Ran npx prettier --write . (for formatting)
  • Ran gofmt -w . (for Go backend)
  • Ran npm test (for JS/TS testing)
  • Added unit tests, if applicable
  • Verified all tests pass
  • Updated documentation, if needed

Additional Notes

Video: Click here to see

@ShivaGupta-14 ShivaGupta-14 force-pushed the feat/178-bulk-task-actions branch from f23ebbc to 93f0aa5 Compare November 28, 2025 22:32
- Added checkboxes to task rows and "Select All" in header
- Implemented floating action panel for selected tasks
- Added backend endpoints for bulk complete and delete
- Updated frontend state to track selected UUIDs
- Added confirmation dialogs and loading states
- Added comprehensive tests for bulk selection and actions

- Fixes: CCExtractor#178
@ShivaGupta-14 ShivaGupta-14 force-pushed the feat/178-bulk-task-actions branch from 93f0aa5 to 6014972 Compare November 28, 2025 22:36
Copy link
Collaborator

@its-me-abhishek its-me-abhishek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the current behavior might work, there are a couple of edge cases worth considering:

  1. If a task is already completed or deleted, and the user selects it again for deletion, the operation becomes a false positive-- the task is already gone, so it only adds unnecessary load on the server.
  2. Marking a deleted task as completed would also require switching its status back first, which creates an avoidable extra step.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bulk Task Actions: Select & Complete/Delete Multiple Tasks

2 participants