← All requests
0

nested subtasks on the kanban board with cascade move

OpenRainyPixel (GitHub) · · edited

Motivation

Right now, if a task has subtasks (via taskRelationTable with relationType = \"subtask\"), the parent/child relationship is only visible on the task detail page (apps/web/src/components/task/task-subtasks.tsx). On the kanban board the subtasks render as independent, top-level cards, so:

  1. The board gives no visual hint that a card is a subtask of another.
  2. Moving a parent between columns does not move its subtasks along with it, which is the expected Jira-style behaviour most users reach for.

Current state of the code

Good news — a lot of the plumbing is already there:

  • Backend relations — taskRelationTable exists in apps/api/src/database/schema.ts and the \"subtask\" relation type is already accepted by the validator in apps/api/src/task-relation/index.ts. CRUD controllers for relations are implemented.
  • Subtask panel on task detail — apps/web/src/components/task/task-subtasks.tsx already loads and filters relationType === \"subtask\" && sourceTaskId === taskId and has a UI for adding/removing subtasks.

What's missing:

  • apps/api/src/task/controllers/get-tasks.ts does not join taskRelationTable, so the board endpoint has no idea which tasks are subtasks of other tasks in the same project.
  • apps/web/src/components/kanban-board/column/column-dropzone.tsx renders every task in the column without filtering subtasks out.
  • apps/web/src/components/kanban-board/task-card.tsx has no concept of child cards.
  • apps/web/src/components/kanban-board/index.tsx handleDragEnd only updates the dragged task — no cascade to the subtasks.
  • apps/api/src/task/controllers/update-task-status.ts and the updateStatus branch of apps/api/src/task/controllers/bulk-update-tasks.ts also don't cascade.

Proposed approach

Option A — hide + cascade (MVP, smaller change)

  1. Extend get-tasks.ts to include parent-relation info per task (e.g. a parentTaskId field, derived from a join on taskRelationTable).
  2. In column-dropzone.tsx, skip rendering tasks whose parentTaskId is present and points to a task in the same project. They're still reachable from the parent's detail page.
  3. In update-task-status.ts (and the bulk-update-tasks status branch), cascade the status change to all subtasks whose parent is the task being updated.
  4. In kanban-board/index.tsx handleDragEnd, after updating the parent, fire the same update for each subtask so the optimistic cache stays in sync.

This is the recommendation for a first iteration — it's invasive but contained, and the UX is "subtasks live on the task page, move with the parent implicitly".

Option B — nested cards (what the requester actually asked for)

On top of option A:
5. In task-card.tsx, render a compact list of subtasks (titles + status dots + a progress ring) directly under the parent title — similar to how task-subtasks.tsx already renders them on the detail page.
6. Figure out drag behaviour for the inner list. Two reasonable rules:

  • A subtask is draggable only inside its parent card; dropping it outside re-parents it (or promotes it to a top-level task).
  • Or: subtasks are read-only on the board and can only be rearranged from the task detail page.
  1. Decide how to style nesting (indentation, hairline connector, collapsed/expanded state, localStorage for collapse per parent).

Option B is roughly 1–2 weeks of frontend work. Option A is 3–5 days.

UX questions worth answering before coding

  • Should subtasks keep an independent status, or should they always match the parent's column?
  • If a subtask is assigned to someone different from the parent, who gets the notification on status cascade — the subtask assignee, both, or neither?
  • If the parent is moved to a different project via move-task, should its subtasks follow? (Currently they wouldn't — move-task.ts only updates the dragged task.)
  • Collapsed state of parent cards: per-user setting, per-device (localStorage), or always expanded?

Acceptance criteria

  • Subtasks no longer appear as independent cards on the kanban board when their parent lives in the same project.
  • Dragging a parent card to a new column moves all its subtasks to the same column, both optimistically on the frontend and durably on the backend.
  • Bulk status updates on a parent cascade to subtasks.
  • (Option B) Subtasks render visually nested under their parent card on the board.
  • No regression on the existing subtasks panel in task-subtasks.tsx.

Related

  • Fix: #1165 (the task move popover crash this report was written against)
  • Feature: #1166 (task author sticker — independent but in the same sprint)

Originally requested by @RainyPixel on 2026-04-07. Original GitHub request #1170.

Issue #1170

Discussion 4

gencsemih (GitHub)

Kaneo is a beautiful project. I would use it if there was a way to see tasks-subtasks in a hierarchical way everywhere in backlog, tasks and gantt view, etc..

Original GitHub comment

neonfit (GitHub)edited

One small UX issue related to this:
the parent task does show its sub-task quite clearly in the Sub-tasks section, but on the sub-task side the parent is only shown as a small Subtask of <Parent Task> label above the title.
This is easy to miss, especially when opening a sub-task directly from the board or a link.
It would be helpful to make the parent reference more prominent and easier to discover, while keeping the UI simple.

Image

Original GitHub comment

Sign in to comment.

Keyboard shortcuts

Anywhere

Go to requests
gh
Go to changelog
gc
Go to notifications
gn
Next or previous page
norp
Leave a text field or close a menu
Esc
Show this list
?

Requests

Move to the next or previous request
jork
Open the selected request
oorEnter
Vote on the selected request
v
Search
/
New request
c

Request

Vote
v
Write a comment
c
Edit
e