Feature: Due Dates for Persistent Tasks #3

Open
opened 2026-01-01 16:02:18 +00:00 by padreug · 0 comments
Owner

Overview

Add optional due dates to persistent tasks (work orders) to indicate soft deadlines without converting them into date-bound scheduled events.

Related to: #1 (Persistent Task List)


Feature Requirements

1. Due Date Properties

  • Optional field - Tasks can exist without a due date
  • Date only (no time component) - Keeps it simple, distinct from scheduled events
  • Soft deadline - Due date is informational, task remains visible even if overdue

2. Visual Indicators

State Indicator Description
No due date None Task has no deadline
Due in future Gray/muted date e.g., "Due Jan 15"
Due today Yellow/warning "Due today"
Overdue Red/urgent "Overdue by 3 days"

3. Sorting Behavior

When due dates are present, consider sort order options:

Option A: Urgency-first (Recommended)

  1. Sort by urgency level (Critical → Low)
  2. Within same urgency, sort by due date (soonest first, no-date last)

Option B: Due date-first

  1. Overdue tasks first
  2. Then by due date (soonest first)
  3. No-date tasks last

4. UI Components

4.1 Create/Edit Task Form

  • Add optional date picker for due date
  • Clear button to remove due date

4.2 Task Card

  • Display due date with appropriate color coding
  • Show relative time for nearby dates ("Due tomorrow", "Due in 3 days")
  • Show "Overdue" badge for past-due tasks

4.3 Filtering (Optional)

  • Filter by: All, Due today, Due this week, Overdue, No due date

Technical Implementation

Nostr Event Tags

Add a due tag to the persistent task event:

{
  "kind": 31923,
  "tags": [
    ["d", "task-unique-id"],
    ["title", "Replace axe handle"],
    ["urgency", "2"],
    ["due", "2026-01-15"]
  ]
}

Date Handling

  • Store as ISO 8601 date string (YYYY-MM-DD)
  • Compare against local timezone for "today" calculations
  • Use relative date formatting for better UX

Acceptance Criteria

  • Users can optionally set a due date when creating a task
  • Users can edit/remove due dates on existing tasks
  • Due dates display with appropriate visual styling (normal, due today, overdue)
  • Overdue tasks show "Overdue by X days" indicator
  • Tasks sort correctly when due dates are present
  • Due date persists correctly on Nostr relays

Out of Scope

  • Time-specific deadlines (use scheduled events for that)
  • Recurring due dates
  • Due date notifications/reminders
## Overview Add optional **due dates** to persistent tasks (work orders) to indicate soft deadlines without converting them into date-bound scheduled events. **Related to:** #1 (Persistent Task List) --- ## Feature Requirements ### 1. Due Date Properties - **Optional field** - Tasks can exist without a due date - **Date only** (no time component) - Keeps it simple, distinct from scheduled events - **Soft deadline** - Due date is informational, task remains visible even if overdue ### 2. Visual Indicators | State | Indicator | Description | |-------|-----------|-------------| | No due date | None | Task has no deadline | | Due in future | Gray/muted date | e.g., "Due Jan 15" | | Due today | Yellow/warning | "Due today" | | Overdue | Red/urgent | "Overdue by 3 days" | ### 3. Sorting Behavior When due dates are present, consider sort order options: **Option A: Urgency-first (Recommended)** 1. Sort by urgency level (Critical → Low) 2. Within same urgency, sort by due date (soonest first, no-date last) **Option B: Due date-first** 1. Overdue tasks first 2. Then by due date (soonest first) 3. No-date tasks last ### 4. UI Components #### 4.1 Create/Edit Task Form - Add optional date picker for due date - Clear button to remove due date #### 4.2 Task Card - Display due date with appropriate color coding - Show relative time for nearby dates ("Due tomorrow", "Due in 3 days") - Show "Overdue" badge for past-due tasks #### 4.3 Filtering (Optional) - Filter by: All, Due today, Due this week, Overdue, No due date --- ## Technical Implementation ### Nostr Event Tags Add a `due` tag to the persistent task event: ```json { "kind": 31923, "tags": [ ["d", "task-unique-id"], ["title", "Replace axe handle"], ["urgency", "2"], ["due", "2026-01-15"] ] } ``` ### Date Handling - Store as ISO 8601 date string (YYYY-MM-DD) - Compare against local timezone for "today" calculations - Use relative date formatting for better UX --- ## Acceptance Criteria - [ ] Users can optionally set a due date when creating a task - [ ] Users can edit/remove due dates on existing tasks - [ ] Due dates display with appropriate visual styling (normal, due today, overdue) - [ ] Overdue tasks show "Overdue by X days" indicator - [ ] Tasks sort correctly when due dates are present - [ ] Due date persists correctly on Nostr relays --- ## Out of Scope - Time-specific deadlines (use scheduled events for that) - Recurring due dates - Due date notifications/reminders
Sign in to join this conversation.
No labels
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: aiolabs/webapp#3
No description provided.