Task ordering specification
Overview
Section titled “Overview”Tasks in gtdhelper are displayed in a three-tier ordered list. Each tier has its own sort rules, and drag-and-drop allows users to override automatic ordering within any tier.
Sort tiers
Section titled “Sort tiers”Tasks are displayed in this priority order:
1. Pinned tasks (pinned == true)2. Manually-ranked (pinned == false, manual_rank is Some)3. Auto-sorted (pinned == false, manual_rank is None)Within each tier:
| Tier | Default sort | Manual override |
|---|---|---|
| Pinned | updated_at DESC | Yes — drag reorders within pins |
| Manually-ranked | manual_rank ASC | Yes — drag updates rank |
| Auto-sorted | updated_at DESC | N/A (no rank set) |
How ordering works
Section titled “How ordering works”Each task can optionally have a manual rank. Pinned tasks with a manual rank appear first (sorted by rank), followed by pinned tasks without a rank (sorted by most recently updated). The same logic applies within unpinned tasks: manually-ranked items come before auto-sorted ones.
When you drag a task to a new position, ranks are reassigned as contiguous integers within the relevant tier (pinned or unpinned) to avoid gaps and collisions.
Resetting manual order
Section titled “Resetting manual order”Two mechanisms to clear a task’s manual_rank (set it back to None):
- Context menu on grip handle: Right-click the drag handle → “Reset to auto-sort”. Sets
manual_rank = Nonefor that task. - Drag to auto-sorted section: Dragging a manually-ranked task past the section divider into the auto-sorted section clears its
manual_rank. The auto-sorted section highlights as a drop target during drag.
No bulk reset. Users reset individual tasks only.
Drag-and-drop
Section titled “Drag-and-drop”Interaction model
Section titled “Interaction model”- All rows are draggable.
- Dragging within the pinned section reorders within pins.
- Dragging within the unpinned section sets a manual rank on the task, moving it from auto-sorted to the manually-ranked tier.
- Dragging a manually-ranked task into the auto-sorted zone clears its manual rank.
Visual indicators
Section titled “Visual indicators”- Manually-ordered rows: Always show a subtle grip handle (drag dots).
- Auto-sorted rows: Grip handle appears on hover only.
- Section divider: A thin visual separator between the manually-ranked and auto-sorted sections (only visible when manually-ranked tasks exist).
Refresh / merge behavior
Section titled “Refresh / merge behavior”manual_rankis preserved during merges, likesnoozed_until.- New tasks from sources appear in the auto-sorted tier (no
manual_rank). - Tasks that disappear from sources retain their
manual_rankin the persisted state (they become snoozed/archived as usual).
Interaction with pinning (#12)
Section titled “Interaction with pinning (#12)”Pinning and manual ordering are orthogonal:
pinnedcontrols which tier a task is in (tier 1 vs tier 2/3).manual_rankcontrols position within a tier.- A pinned task can have a
manual_rank(custom position within pins) or not (auto-sorted within pins byupdated_at). - Unpinning a task with a
manual_rankmoves it to the manually-ranked unpinned tier, keeping its rank.
No limit
Section titled “No limit”There is no cap on manually-ordered tasks. The auto-sorted section shrinks as more tasks are manually placed.