useTaskSelection
Source:hooks/commits/useTaskSelection.ts
The useTaskSelection hook manages multi-select state for bulk task operations on the Dashboard commits screen.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Multi-select state for bulk task operations on the Dashboard.
hooks/commits/useTaskSelection.ts
The useTaskSelection hook manages multi-select state for bulk task operations on the Dashboard commits screen.
const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set());
| Action | Behavior |
|---|---|
| toggleSelect(id) | Adds or removes a task from the selection set |
| selectAll(tasks) | Adds all visible task IDs to the selection set |
| clearSelection() | Empties the selection set and exits multi-select mode |
| bulkDelete() | Iterates through selected IDs, calling deleteTask() via Triple-Write for each |
for (const id of selectedIds) {
await deleteTask(id); // Convex → SQLite → Re-arm alarms
}