Add Things-style planner scheduling actions #119

Closed
opened 2026-05-27 12:39:37 +00:00 by steve · 0 comments
Owner

Add planner-specific scheduling actions and a compact When picker for moving tasks between Today, This Evening, future dates, Someday, and unscheduled states.

Problem

The existing schedule menu mutates scheduled, but the planner needs semantic placement actions that coordinate scheduled and when without conflating scheduled/start dates with due/deadline dates.

Goal

Provide a reusable planner scheduling API and UI that moves tasks between planner buckets predictably while preserving existing scheduling behavior elsewhere.

Scope

  • Add a central planner planning/scheduling mutation API on TasksPlugin.
  • Add UI actions for Today, This Evening, Tomorrow, This Weekend, Next Week, Pick Date, Someday, and Clear.
  • Persist Today as scheduled=today with no explicit when unless implementation proves otherwise.
  • Persist This Evening as scheduled=today plus when=this-evening.
  • Persist Someday as when=someday and no scheduled date.
  • Clear removes planner placement and scheduled date while leaving due dates untouched.
  • Add commands where practical for moving the current task row or task note.
  • Add unit and e2e coverage for bucket transitions.

Non-goals

  • No natural-language parsing.
  • No recurring-instance planner override model.
  • No manual order writes.
  • No area assignment.

Acceptance Criteria

  • Planner row actions can move a task to Today, This Evening, Tomorrow, Someday, and Clear.
  • Bucket changes are visible immediately after frontmatter writes refresh the task index.
  • Due dates are never changed by planner scheduling actions.
  • Existing generic scheduled-date menu behavior remains compatible.
  • This Evening tasks remain date-queryable through the scheduled field.
  • Commands and UI actions share the same mutation helper.

Implementation Notes

  • Reuse task-card-scheduled-date-helpers.ts and DateTimePickerDialog where possible.
  • Avoid duplicating frontmatter-write logic in Svelte components.
  • Make planner-specific actions clear conflicting when values when setting ordinary scheduled dates.

Suggested Files or Specs To Inspect

  • packages/plugins/plugin-tasks/src/core/plugin.ts
  • packages/plugins/plugin-tasks/src/editor/task-card-scheduled-date-helpers.ts
  • packages/plugins/plugin-tasks/src/editor/task-card-overflow-menu.svelte
  • packages/plugins/plugin-tasks/src/core/ui.ts
  • packages/plugins/plugin-tasks/src/planner/planner-model.ts
  • packages/workspace/e2e/tasks.spec.ts

Validation Commands

  • pnpm --filter @lapis-notes/tasks test
  • pnpm --filter @lapis-notes/tasks check
  • pnpm --filter @lapis-notes/workspace check
  • make spec-lint
  • pnpm test:smoke

Follow-up Tasks

  • TASK-PLUGIN-057
  • TASK-PLUGIN-060

Implementation Summary

Duplicate of #109.

Add planner-specific scheduling actions and a compact When picker for moving tasks between Today, This Evening, future dates, Someday, and unscheduled states. ## Problem The existing schedule menu mutates `scheduled`, but the planner needs semantic placement actions that coordinate `scheduled` and `when` without conflating scheduled/start dates with due/deadline dates. ## Goal Provide a reusable planner scheduling API and UI that moves tasks between planner buckets predictably while preserving existing scheduling behavior elsewhere. ## Scope - Add a central planner planning/scheduling mutation API on `TasksPlugin`. - Add UI actions for Today, This Evening, Tomorrow, This Weekend, Next Week, Pick Date, Someday, and Clear. - Persist Today as `scheduled=today` with no explicit `when` unless implementation proves otherwise. - Persist This Evening as `scheduled=today` plus `when=this-evening`. - Persist Someday as `when=someday` and no scheduled date. - Clear removes planner placement and scheduled date while leaving due dates untouched. - Add commands where practical for moving the current task row or task note. - Add unit and e2e coverage for bucket transitions. ## Non-goals - No natural-language parsing. - No recurring-instance planner override model. - No manual order writes. - No area assignment. ## Acceptance Criteria - Planner row actions can move a task to Today, This Evening, Tomorrow, Someday, and Clear. - Bucket changes are visible immediately after frontmatter writes refresh the task index. - Due dates are never changed by planner scheduling actions. - Existing generic scheduled-date menu behavior remains compatible. - This Evening tasks remain date-queryable through the scheduled field. - Commands and UI actions share the same mutation helper. ## Implementation Notes - Reuse `task-card-scheduled-date-helpers.ts` and `DateTimePickerDialog` where possible. - Avoid duplicating frontmatter-write logic in Svelte components. - Make planner-specific actions clear conflicting `when` values when setting ordinary scheduled dates. ## Suggested Files or Specs To Inspect - `packages/plugins/plugin-tasks/src/core/plugin.ts` - `packages/plugins/plugin-tasks/src/editor/task-card-scheduled-date-helpers.ts` - `packages/plugins/plugin-tasks/src/editor/task-card-overflow-menu.svelte` - `packages/plugins/plugin-tasks/src/core/ui.ts` - `packages/plugins/plugin-tasks/src/planner/planner-model.ts` - `packages/workspace/e2e/tasks.spec.ts` ## Validation Commands - `pnpm --filter @lapis-notes/tasks test` - `pnpm --filter @lapis-notes/tasks check` - `pnpm --filter @lapis-notes/workspace check` - `make spec-lint` - `pnpm test:smoke` ## Follow-up Tasks - TASK-PLUGIN-057 - TASK-PLUGIN-060 ## Implementation Summary Duplicate of #109. <!-- backlog:task_id=TASK-PLUGIN-056 source_spec=spec/src/20-packages/plugins/tasks/index.md#things-like-planner-workflow -->
Sign in to join this conversation.
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
lapis-notes/lapis#119
No description provided.