Skip to content

Feature: Update task (title/deadline) + UI edit modal + quick deadline #59

Description

@manucompiles

What we're building

Phase 2 of the MCP+UI proposal (v2.10.2): give tasks a real edit path. Title and deadline previously had NO edit capability (set only at creation); project/labels/completion each had a sub-resource PATCH. This adds title+deadline editing across all three surfaces plus a full-edit modal and a quick-deadline popover.

Scope

In scope:

  • Backend: new PATCH /api/tasks/{id} (root) - true partial update of title + deadline via JsonElement present-key detection. Omit=keep, null=clear, value=set. Empty title -> 400, malformed date -> 400.
  • MCP: new update_task(id, { title?, deadline? }) tool + api.updateTask. Sends only provided keys; deadline: null clears. Tool count 15 -> 16.
  • Web UI: EditTaskModal (full edit: title, deadline, project, labels) - title+deadline via new PATCH, project/labels via existing endpoints, only changed fields fire, then getTask for the canonical result.
  • Web UI: DeadlinePopover on the deadline pill - presets Today / Tomorrow / This weekend / Next week / None(clear).

Plan

docs/plans/_archive/P59-update-task-and-edit-modal.md

Outcome

What was built:

  • PATCH /api/tasks/{id} with JsonElement present-key detection (omit=keep, null=clear, value=set); 400 on empty title / bad date; 404 on unknown id.
  • MCP update_task tool + api.updateTask (relies on JSON.stringify omitting undefined / keeping null - no read-modify-write).
  • EditTaskModal (diff-and-fan-out save across PATCH + assign-project + set-labels, then getTask) and DeadlinePopover + pure deadlinePresets.resolvePreset.
  • Docs synced: architecture, engineering-guidelines (JsonElement partial-PATCH pattern), product-design, README, CHANGELOG, coverage.

Verified:

  • 63 backend / 65 MCP / 47 frontend unit tests pass; clean production next build; clean tsc.
  • Deployed to the phone (exit 0, all 4 services restarted fresh).
  • Live curl against the deployed backend: title set, deadline set, deadline clear (null), empty-title 400, bad-date 400, unknown-id 404, cleanup 204. Present-key semantics confirmed at the real HTTP-binding layer.
  • The flagged Block (deadline-clear not detected) was investigated and disproven; review fixes R1/R2/R5/R7 applied inline.
  • Deferred: Step 6.3 hands-on connector + browser acceptance spot-check (user-only, non-blocking).

Issues raised during this work:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions