beardofedu / beardofedu/copilot-cli-fun-times

feat: bulk task operations (complete and delete)

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Summary
Add bulk operation endpoints so clients can complete or delete multiple tasks in a single request instead of issuing one request per task.

## Motivation
When managing many tasks (e.g., end-of-sprint cleanup), making individual HTTP requests for each task is slow and verbose. Bulk endpoints reduce round-trips and improve client efficiency.

## Proposed Behavior
- `POST /tasks/bulk-complete` — body: `{ ids: [1, 2, 3] }` — marks all specified tasks as `completed: true` and sets `completedAt`
- `POST /tasks/bulk-delete` — body: `{ ids: [1, 2, 3] }` — deletes all specified tasks
- Both endpoints return a summary: `{ succeeded: [...], notFound: [...] }`
- IDs that do not exist are reported in `notFound` but do not cause the request to fail
- HTTP 400 if `ids` is missing, not an array, or empty

## Acceptance Criteria
- [ ] `POST /tasks/bulk-complete` marks all found tasks as completed and returns summary
- [ ] `POST /tasks/bulk-delete` deletes all found tasks and returns summary
- [ ] `notFound` contains IDs that had no matching task
- [ ] HTTP 400 for missing/invalid `ids` field
- [ ] Bulk logic extracted into utility functions in `utils.js`
- [ ] Unit tests written for both bulk utilities

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.