Skip to content

Feature: Subtasks (checklist items under a task) #78

Description

@manucompiles

What we're building

Lightweight subtasks: one-line checklist items nested under a parent task, each with a title, a done state, an optional deadline, and a manual order. The parent shows progress (2/5). Modeled as a small dedicated Subtask table (mirrors TaskComment/CheckIn), not full child tasks.

Scope

Delivered: Subtask table + CRUD/reorder/search endpoints; subtaskCount/completedSubtaskCount + subtasks[] on tasks; inline tickable checklist clubbed under the parent on every surface (desktop table sub-row, mobile card, board card, detail modal + /tasks/:id); parent-completion dialog (complete-all vs pull-out-as-tasks); recurrence resets the checklist on the next occurrence; date filters match on subtask deadlines; drag-reorder via @dnd-kit; compact due-date picker; MCP subtask tools + unified find.

Out of scope (backlog): per-subtask priority/labels; a dedicated event/notification log.

Plan

docs/plans/_archive/P78-subtasks.md

Outcome

What was built:

  • Backend: Subtask table (cascade FK, Position, nullable Deadline); SubtasksController (create/update/delete/reorder + global GET /api/subtasks search); TaskModel gains subtaskCount/completedSubtaskCount + subtasks[] (loaded on detail, and on the list via includeSubtasks=true); complete supports subtaskMode completeAll/pullOut; recurring occurrences spawn with the checklist reset.
  • Frontend: SubtaskChecklist (inline clubbed list on card/table/board), SubtaskSection (full editor + @dnd-kit drag-reorder + compact DueDatePicker), CompleteWithSubtasksDialog; date filters match subtask deadlines.
  • MCP: 6 subtask tools + unified find (searches tasks AND subtasks by name, tags each hit, subtasks carry parent) - 36 tools total.

Verified:

  • Backend 306 tests, MCP 106 tests green; frontend production build clean.
  • Manually verified in-app on desktop + mobile: inline checklist, 2/5 progress, drag-reorder, completion dialog, this-week filter surfacing a task via its subtask, and GET /api/subtasks?text= resolving a subtask to its parent.

Issues raised during this work: none (the "recurring task needs a deadline" behaviour was confirmed intentional, not a bug).

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