feat: time-aware due dates, persistent undo, @return audit

Problem: Due dates had no time component, the undo stack was lost on
restart and stored in a separate file, and many public functions lacked
required @return annotations.

Solution: Add YYYY-MM-DDThh:mm support across parse, views, recur,
complete, and init with time-aware overdue checks. Merge the undo stack
into the task store JSON so a single file holds all state. Add @return
nil annotations to all 27 void public functions across every module.
This commit is contained in:
Barrett Ruth 2026-02-25 20:06:11 -05:00
parent c69afacc87
commit ee2d125846
11 changed files with 369 additions and 118 deletions

View file

@ -37,10 +37,12 @@ function M.current_view_name()
return current_view
end
---@return nil
function M.clear_winid()
task_winid = nil
end
---@return nil
function M.close()
if task_winid and vim.api.nvim_win_is_valid(task_winid) then
vim.api.nvim_win_close(task_winid, false)
@ -79,6 +81,7 @@ local function setup_syntax(bufnr)
end
---@param above boolean
---@return nil
function M.open_line(above)
local bufnr = task_bufnr
if not bufnr or not vim.api.nvim_buf_is_valid(bufnr) then
@ -205,6 +208,7 @@ local function restore_folds(bufnr)
end
---@param bufnr? integer
---@return nil
function M.render(bufnr)
bufnr = bufnr or task_bufnr
if not bufnr or not vim.api.nvim_buf_is_valid(bufnr) then
@ -249,6 +253,7 @@ function M.render(bufnr)
restore_folds(bufnr)
end
---@return nil
function M.toggle_view()
if current_view == 'category' then
current_view = 'priority'