v0.3.0: task nesting (parent_id) + sibling ordering (sort_order) #4

Merged
ejlewis merged 0 commits from v0.3.0-nested-ordered-tasks into main 2026-06-18 10:56:03 -05:00
Owner

Adds task nesting and sibling ordering as thin, backward-compatible primitives, plus a dedicated set_task_parent tool. Nothing existing changes behavior.

What's new

  • set_task_parent(task_id, parent_id, project_id?) — attach / re-parent / detach a task. parent_id="" detaches.
  • parent_id / sort_order kwargs on create_task and update_task (client, handler, and tool layers).
  • Task model now surfaces parent_id and sort_order.

v2 mechanics (confirmed live 2026-06-18)

  • Q1 — parenting: inline parentId on the batch/task add payload is silently dropped. Parenting goes through a dedicated POST batch/taskParent (JSON array body): attach [{taskId, parentId, projectId}]; re-parent adds oldParentId; detach omits parentId, includes oldParentId. Standard {id2etag, id2error} envelope. So create_task/update_task accept parent_id as a convenience but route it through set_task_parentparentId never touches the batch/task payload.
  • Q2 — ordering: sort_ordersortOrder is honored at create time (no second pass). Large signed int; lower sorts higher; relative to siblings under the same parent.

All wire-level field names stay inside ticktick_mcp/client/ per the DESIGN.md §1 layering law.

Testing

  • 122 passed, 1 skipped (the skipped one is the opt-in live-credentials integration test). 19 new unit tests across client + server layers, including backward-compat (neither param → byte-identical batch/task payload, no parenting call), detach, re-parent, and the cross-project / missing-projectId error paths.
  • Live regression against a real account: built the 3-level Hire tree (root → 3 phases → steps) entirely through the new create_task(parent_id=…, sort_order=…) path; API read-back confirmed all parentId/childIds/sortOrder relationships, and nested+ordered rendering confirmed in the TickTick UI.

Docs

DESIGN.md §8 (new), CLIENT_METHODS.md, TOOLS.md, README.md (22→23 tools, compose tag → 0.3.0), pyproject version = "0.3.0".

🤖 Generated with Claude Code

Adds task nesting and sibling ordering as thin, backward-compatible primitives, plus a dedicated `set_task_parent` tool. Nothing existing changes behavior. ## What's new - **`set_task_parent(task_id, parent_id, project_id?)`** — attach / re-parent / detach a task. `parent_id=""` detaches. - **`parent_id` / `sort_order` kwargs** on `create_task` and `update_task` (client, handler, and tool layers). - **`Task` model** now surfaces `parent_id` and `sort_order`. ## v2 mechanics (confirmed live 2026-06-18) - **Q1 — parenting:** inline `parentId` on the `batch/task` add payload is **silently dropped**. Parenting goes through a dedicated `POST batch/taskParent` (JSON array body): attach `[{taskId, parentId, projectId}]`; re-parent adds `oldParentId`; detach omits `parentId`, includes `oldParentId`. Standard `{id2etag, id2error}` envelope. So `create_task`/`update_task` accept `parent_id` as a convenience but route it through `set_task_parent` — `parentId` never touches the `batch/task` payload. - **Q2 — ordering:** `sort_order` → `sortOrder` is honored at create time (no second pass). Large signed int; lower sorts higher; relative to siblings under the same parent. All wire-level field names stay inside `ticktick_mcp/client/` per the DESIGN.md §1 layering law. ## Testing - 122 passed, 1 skipped (the skipped one is the opt-in live-credentials integration test). 19 new unit tests across client + server layers, including backward-compat (neither param → byte-identical `batch/task` payload, no parenting call), detach, re-parent, and the cross-project / missing-projectId error paths. - **Live regression against a real account:** built the 3-level Hire tree (root → 3 phases → steps) entirely through the new `create_task(parent_id=…, sort_order=…)` path; API read-back confirmed all `parentId`/`childIds`/`sortOrder` relationships, and nested+ordered rendering confirmed in the TickTick UI. ## Docs DESIGN.md §8 (new), CLIENT_METHODS.md, TOOLS.md, README.md (22→23 tools, compose tag → 0.3.0), pyproject `version = "0.3.0"`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ejlewis/ticktick-mcp!4
No description provided.