Skip to content

Add dropDate/droppedAfter, local-midnight bare dates, and task sequential field - #5

Closed
vishae wants to merge 3 commits into
steveardis:mainfrom
vishae:tech-017-drop-defer-sequential
Closed

Add dropDate/droppedAfter, local-midnight bare dates, and task sequential field#5
vishae wants to merge 3 commits into
steveardis:mainfrom
vishae:tech-017-drop-defer-sequential

Conversation

@vishae

@vishae vishae commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Stacked on #2 — this branch is built on top of list-tasks-completion-date (already open as #2), so this diff currently includes that commit too. Once #2 merges, this PR's diff will shrink to just the two commits below; happy to rebase at that point if useful.

Three additions, following the existing completionDate/completedAfter pattern from #2:

  • dropDate / droppedAfter. list_tasks/get_task/create_task/edit_task/drop_task/complete_task now return dropDate (via effectiveDropDate), and list_tasks gains a droppedAfter filter — so "dropped since X" can be queried the same way "completed since X" can, instead of scanning every dropped task ever.
  • Bare-date defer/planned/due. create_task/edit_task now accept a bare YYYY-MM-DD in addition to a full ISO datetime for deferDate/plannedDate/dueDate. A bare date resolves to local midnight on the machine running the connector — previously new Date("2026-07-17") parsed as UTC midnight, so a task deferred to "today" could stay Blocked for several hours after midnight local time (until the UTC-offset hour), rather than being Available immediately.
  • Task sequential. create_task/edit_task can now set a task's own sequential (whether its subtasks must be completed in order), surfaced on all task-detail responses. The underlying OmniFocus API already supports this via task.sequential — it just wasn't exposed as a connector field before.

Also fixed move_task's inline response, which was missing completionDate/dropDate entirely (a gap once #2 made completionDate a required TaskSummary field).

Test plan

  • npm test — 151 unit tests pass
  • npm run test:integration — 96/96 pass, including new coverage for all three changes (bare-date-to-local-midnight, sequential set/read, dropDate/droppedAfter)
  • Rebuilt, packed, and installed the .mcpb locally; verified live against a real OmniFocus database — bare-date defer produced status: "available" immediately with deferDate at exact local midnight; sequential: true set and read back correctly; dropDate populated on drop and droppedAfter correctly narrowed results

vishae added 3 commits July 10, 2026 04:22
…erId null on completed tasks

list_tasks didn't expose a completed task's completionDate (only get_task
did), and there was no way to filter by completion date server-side.
Added completionDate to list_tasks' output and a completedAfter (ISO
datetime) filter, following the existing dueBeforeDate pattern.

Separately, list_tasks and get_task both resolved a task's containerId/
containerType via assignedContainer, which comes back null for completed
tasks. Other write-path snippets (move_task, complete_task, create_task,
edit_task, drop_task) already avoid this via parentTask/containingProject
instead -- move_task.js even has a comment noting assignedContainer
"doesn't update after moveTasks". Applied the same fix to list_tasks and
get_task so completed tasks resolve their container correctly too.

package-lock.json also resyncs to package.json's current name/version
(0.1.0 -> @scardis/omnifocus-mcp@0.1.2), which had drifted.
…tial field

Closes TECH-017 Gaps 1 & 2:
- list_tasks/get_task/create_task/edit_task/drop_task/complete_task now
  return dropDate (via effectiveDropDate); list_tasks gains a droppedAfter
  filter, mirroring the completionDate/completedAfter pattern.
- create_task/edit_task deferDate/plannedDate/dueDate accept a bare
  YYYY-MM-DD date, resolved to local midnight instead of JS's default of
  UTC midnight — a defer-today task is now Available immediately rather
  than only after the local UTC-offset hour.
- create_task/edit_task can set a task's own sequential (parallel/ordered
  subtasks); surfaced on all task-detail responses.
- move_task's inline response object was missing completionDate/dropDate
  entirely (a pre-existing gap once TaskSummary made completionDate
  required); added both for consistency.
@steveardis

Copy link
Copy Markdown
Owner

Closing in favour of #6, which contains every commit in this branch plus the effective-completion-date work. Keeping both open guarantees a conflict between them, and #6 is the one carrying the extra test coverage.

Nothing here is rejected — the substance of this PR (bare-date handling resolved to local midnight, dropDate/droppedAfter, and the sequential field) is exactly what I reviewed in #6, and my comments there apply to this code. The bare-date change in particular answers a real complaint documented in #7, where an evaluator found that requiring a Z-suffixed UTC datetime pushes the local-midnight calculation onto the caller.

Two things from that review that will need addressing on #6 and originate in these commits:

  • droppedAfter returns nothing unless status is also passed, because the default status filter strips dropped tasks before it runs. Your integration test passes status: ["dropped"], but the tool description does not tell the model to.
  • This branch's package.json still pins "vitest": "^2.1.0", which is the version with CVE-2025-24964 that 0.2.0 fixed. That file is the only merge conflict against main, so resolution must keep main's copy.

Please continue on #6.

@steveardis steveardis closed this Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants