Feature/due dates#3
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional due dates to tasks. Set a date with
Din the pad or:TodoDue, and see a relative hint on each line (today,in 3d,overdue (2d)) colored by urgency.Dprompts for a date; blank orclearremoves it.Also available as
:TodoDue [date](with tab completion).YYYY-MM-DD,today/tomorrow/yesterday,and relative offsets
+3d,+2w,-1d.red/bold, today/tomorrow are orange, later dates are dim.
duefield in JSON; invalid dates are dropped onload.
date.luamodule, fully unit-tested.Changes
date.lua: ISO date helpers (parse, offset, diff, relative labels, status).store.lua: optionalduefield +set_due(index, due).ui.lua+highlights.lua: render due suffix withPinPadOverdue/PinPadDueSoonhighlight groups.actions.lua/config.lua/init.lua/plugin/pinpad.lua:Dmapping,
actions.set_due,:TodoDuecommand.tests/date_spec.lua(12) +tests/due_spec.lua(5).Test plan
make testgreen locally (35 passed, 0 failed)Don a task, enter+3d, confirm the hint appearsDagain, leave blank, confirm the due date is cleared:TodoDue todayon a task under the cursor