Add manual ordering for Tasks Planner lists #122

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

Add persistent manual ordering for planner lists, starting with Today and project views, without rewriting unrelated task files.

Problem

A calm planner depends on manual sequencing, especially in Today and project outcomes. The current Tasks runtime sorts by status and updated time, while Fizzy drag writes a column property rather than a reusable planner order field.

Goal

Support stable manual ordering for planner task lists using sparse frontmatter-backed ranks and accessible reorder controls.

Scope

  • Add mapped order fields, likely todayOrder and projectOrder first.
  • Sort Today, This Evening, and project task lists by manual order when present.
  • Add drag-and-drop reordering using @dnd-kit/svelte patterns already used by Fizzy.
  • Add keyboard or menu-based reorder fallback actions.
  • Write only the moved task when sparse rank insertion is possible.
  • Renumber only the affected planner section when necessary.
  • Add unit tests for rank calculation and e2e coverage for reorder persistence.

Non-goals

  • No global priority replacement.
  • No wholesale rewrite of task files on every drag.
  • No Bases table column-order migration work.
  • No project sections unless TASK-PLUGIN-061 is in scope for the same implementation slice.

Acceptance Criteria

  • Today tasks can be reordered and remain stable after reload.
  • Reordering does not change due dates, scheduled dates, priority, status, or unrelated metadata.
  • Reordering writes the fewest practical task files.
  • Keyboard/menu controls can move tasks without pointer drag.
  • Manual order falls back gracefully when fields are absent or duplicated.
  • Existing Fizzy drag behavior remains unaffected.

Implementation Notes

  • Prefer sparse numeric ordering such as midpoint ranks.
  • Keep rank helpers pure and unit-tested.
  • Follow @dnd-kit/svelte usage in packages/plugins/plugin-tasks/src/bases/fizzy/.
  • Keep plugin-owned drag styling in the Tasks stylesheet artifacts.

Suggested Files or Specs To Inspect

  • packages/plugins/plugin-tasks/src/bases/fizzy/
  • packages/plugins/plugin-tasks/src/core/model.ts
  • packages/plugins/plugin-tasks/src/core/plugin.ts
  • packages/plugins/plugin-tasks/src/planner/
  • spec/src/30-cross-package-contracts/drag-drop-patterns.md
  • 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-061
  • TASK-PLUGIN-062

Implementation Summary

Duplicate of #112.

Add persistent manual ordering for planner lists, starting with Today and project views, without rewriting unrelated task files. ## Problem A calm planner depends on manual sequencing, especially in Today and project outcomes. The current Tasks runtime sorts by status and updated time, while Fizzy drag writes a column property rather than a reusable planner order field. ## Goal Support stable manual ordering for planner task lists using sparse frontmatter-backed ranks and accessible reorder controls. ## Scope - Add mapped order fields, likely `todayOrder` and `projectOrder` first. - Sort Today, This Evening, and project task lists by manual order when present. - Add drag-and-drop reordering using `@dnd-kit/svelte` patterns already used by Fizzy. - Add keyboard or menu-based reorder fallback actions. - Write only the moved task when sparse rank insertion is possible. - Renumber only the affected planner section when necessary. - Add unit tests for rank calculation and e2e coverage for reorder persistence. ## Non-goals - No global priority replacement. - No wholesale rewrite of task files on every drag. - No Bases table column-order migration work. - No project sections unless TASK-PLUGIN-061 is in scope for the same implementation slice. ## Acceptance Criteria - Today tasks can be reordered and remain stable after reload. - Reordering does not change due dates, scheduled dates, priority, status, or unrelated metadata. - Reordering writes the fewest practical task files. - Keyboard/menu controls can move tasks without pointer drag. - Manual order falls back gracefully when fields are absent or duplicated. - Existing Fizzy drag behavior remains unaffected. ## Implementation Notes - Prefer sparse numeric ordering such as midpoint ranks. - Keep rank helpers pure and unit-tested. - Follow `@dnd-kit/svelte` usage in `packages/plugins/plugin-tasks/src/bases/fizzy/`. - Keep plugin-owned drag styling in the Tasks stylesheet artifacts. ## Suggested Files or Specs To Inspect - `packages/plugins/plugin-tasks/src/bases/fizzy/` - `packages/plugins/plugin-tasks/src/core/model.ts` - `packages/plugins/plugin-tasks/src/core/plugin.ts` - `packages/plugins/plugin-tasks/src/planner/` - `spec/src/30-cross-package-contracts/drag-drop-patterns.md` - `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-061 - TASK-PLUGIN-062 ## Implementation Summary Duplicate of #112. <!-- backlog:task_id=TASK-PLUGIN-059 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#122
No description provided.