Skip to content

Add due-date sorting and today filter (T / :TodoToday)#4

Merged
alexesba merged 3 commits into
mainfrom
feature/due-sort-today
Jun 10, 2026
Merged

Add due-date sorting and today filter (T / :TodoToday)#4
alexesba merged 3 commits into
mainfrom
feature/due-sort-today

Conversation

@alexesba

@alexesba alexesba commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to due dates: tasks now sort by due date within the same
priority, and a today view shows only overdue + due-today tasks.

  • Due-date sorting — when sort_by_due = true (default), pending tasks
    at equal priority sort earliest-due first; undated tasks stay last.
  • Today filterT toggles the filter; :TodoToday opens the pad in
    that view. Window title shows (today) while active; resets on close.
  • Pure helpersdate.sort_key, sort.compare, sort.passes_filter,
    all unit-tested.

Changes

  • date.lua: sort_key, is_due_today_or_overdue
  • sort.lua: display compare + filter helpers (new module)
  • ui.lua: apply filter + due-aware sort in render; empty-state hint for
    filtered view
  • config.lua: sort_by_due, mappings.filter_today (default T)
  • actions.lua / init.lua / plugin/pinpad.lua: toggle + :TodoToday
  • Tests: extended date_spec.lua, new sort_spec.lua (+12 tests)
  • Docs: README + SPEC

Test plan

  • make test green (45 passed)
  • Manual: add tasks with mixed priorities/due dates — confirm earliest due
    sorts first within same priority
  • Manual: press T — only overdue + today tasks remain; title shows
    (today)
  • Manual: :TodoToday opens pad in filtered view
  • Manual: close pad — filter resets to all on reopen

alexesbafh and others added 3 commits June 9, 2026 19:07
date.sort_key and is_due_today_or_overdue; sort.compare (priority then
due asc, undated last) and passes_filter for the today view. Fully
unit-tested.

Co-authored-by: Cursor <cursoragent@cursor.com>
Secondary sort by due (earliest first, undated last) when sort_by_due is
on. T toggles a today/overdue filter; :TodoToday opens the pad in that
view. Window title shows "(today)" while filtered.

Co-authored-by: Cursor <cursoragent@cursor.com>
README + SPEC updated for sort_by_due, the today/overdue filter, and
the new mapping and command.

Co-authored-by: Cursor <cursoragent@cursor.com>
@alexesba alexesba merged commit a4392a9 into main Jun 10, 2026
4 checks passed
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