Skip to content

Feature/due dates#3

Merged
alexesba merged 5 commits into
mainfrom
feature/due-dates
Jun 10, 2026
Merged

Feature/due dates#3
alexesba merged 5 commits into
mainfrom
feature/due-dates

Conversation

@alexesba

@alexesba alexesba commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

Adds optional due dates to tasks. Set a date with D in the pad or
:TodoDue, and see a relative hint on each line (today, in 3d,
overdue (2d)) colored by urgency.

  • Set / clearD prompts for a date; blank or clear removes it.
    Also available as :TodoDue [date] (with tab completion).
  • Flexible input — ISO YYYY-MM-DD, today / tomorrow / yesterday,
    and relative offsets +3d, +2w, -1d.
  • Visual hints — pending tasks show a relative suffix; overdue dates are
    red/bold, today/tomorrow are orange, later dates are dim.
  • Persistence — optional due field in JSON; invalid dates are dropped on
    load.
  • Zero new dependencies — pure date.lua module, fully unit-tested.

Changes

  • date.lua: ISO date helpers (parse, offset, diff, relative labels, status).
  • store.lua: optional due field + set_due(index, due).
  • ui.lua + highlights.lua: render due suffix with PinPadOverdue /
    PinPadDueSoon highlight groups.
  • actions.lua / config.lua / init.lua / plugin/pinpad.lua: D
    mapping, actions.set_due, :TodoDue command.
  • Tests: tests/date_spec.lua (12) + tests/due_spec.lua (5).
  • Docs: README + SPEC updated.

Test plan

  • make test green locally (35 passed, 0 failed)
  • CI runs the suite on Neovim stable + nightly
  • Manual: press D on a task, enter +3d, confirm the hint appears
  • Manual: press D again, leave blank, confirm the due date is cleared
  • Manual: :TodoDue today on a task under the cursor
  • Manual: restart Neovim and confirm due dates persist in JSON

alexesbafh and others added 5 commits June 9, 2026 18:58
ISO YYYY-MM-DD helpers: today, is_valid, offset, diff_days, parse
(absolute, today/tomorrow/yesterday, +Nd/-Nw relative), relative_label,
and status (overdue/soon/later). Dependency-free and side-effect-free.

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds an optional due field (ISO YYYY-MM-DD) to the task model, parsed
and validated on load (invalid dates dropped), and a set_due(index, due)
that sets/clears with validation. Covered by due_spec.

Co-authored-by: Cursor <cursoragent@cursor.com>
Appends a relative due label (e.g. "(in 3d)", "(overdue (2d))") after
the task text, coloured by status: overdue (red/bold), soon
(orange), later (dim). Completed tasks keep the strikethrough.

Co-authored-by: Cursor <cursoragent@cursor.com>
actions.set_due prompts (or takes a preset) and applies a parsed date to
the cursor task, with clear and invalid-input handling. Bound to the new
mappings.set_due key (default D), exposed as require("pinpad").set_due,
and the :TodoDue command (with completion).

Co-authored-by: Cursor <cursoragent@cursor.com>
README features, config mappings, commands, and in-window keys; SPEC
data model, rendering, mappings, commands, module structure, and edge
cases updated for the optional due-date field.

Co-authored-by: Cursor <cursoragent@cursor.com>
@alexesba alexesba merged commit a282381 into main Jun 10, 2026
4 checks passed
@alexesba alexesba deleted the feature/due-dates branch June 10, 2026 01:05
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