Add due-date sorting and today filter (T / :TodoToday)#4
Merged
Conversation
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>
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
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.
sort_by_due = true(default), pending tasksat equal priority sort earliest-due first; undated tasks stay last.
Ttoggles the filter;:TodoTodayopens the pad inthat view. Window title shows
(today)while active; resets on close.date.sort_key,sort.compare,sort.passes_filter,all unit-tested.
Changes
date.lua:sort_key,is_due_today_or_overduesort.lua: display compare + filter helpers (new module)ui.lua: apply filter + due-aware sort in render; empty-state hint forfiltered view
config.lua:sort_by_due,mappings.filter_today(defaultT)actions.lua/init.lua/plugin/pinpad.lua: toggle +:TodoTodaydate_spec.lua, newsort_spec.lua(+12 tests)Test plan
make testgreen (45 passed)sorts first within same priority
T— only overdue + today tasks remain; title shows(today):TodoTodayopens pad in filtered view