feat(todo): add numbered tasks, edit, done, and future filtering #72

Closed
opened 2026-04-02 18:30:36 +02:00 by kfickel · 0 comments
Owner

Summary

Implements smoother todo editing as specified in issue #63:

  • Numbered tasks: streamd todo now displays tasks with numbers [1], [2], etc., sorted by date (oldest first)
  • Edit command: streamd todo N edit opens the editor at the task's line using +LINE argument
  • Done command: streamd todo N done inserts @Done immediately after @Task marker
  • Future filtering: Tasks with future dates are hidden by default; use --show-future to include them

Changes

  • Added TodoAction enum with Edit and Done subcommands
  • Added --show-future flag to the Todo command
  • Implemented collect_open_tasks() helper with sorting and filtering
  • Added error variants for invalid task numbers, missing file paths, and @Task marker issues
  • Added 14 unit tests covering filtering, sorting, and error cases
  • Updated README.md and REQUIREMENTS.md with new command documentation

Test plan

  • Run cargo test - all 160 tests pass
  • Run cargo clippy - no warnings
  • Run cargo fmt --check - properly formatted
  • Manual testing: verify streamd todo shows numbered tasks
  • Manual testing: verify streamd todo 1 edit opens editor at correct line
  • Manual testing: verify streamd todo 1 done inserts @Done marker
  • Manual testing: verify --show-future flag behavior

Closes #63

## Summary Implements smoother todo editing as specified in issue #63: - **Numbered tasks**: `streamd todo` now displays tasks with numbers `[1]`, `[2]`, etc., sorted by date (oldest first) - **Edit command**: `streamd todo N edit` opens the editor at the task's line using `+LINE` argument - **Done command**: `streamd todo N done` inserts `@Done` immediately after `@Task` marker - **Future filtering**: Tasks with future dates are hidden by default; use `--show-future` to include them ## Changes - Added `TodoAction` enum with `Edit` and `Done` subcommands - Added `--show-future` flag to the `Todo` command - Implemented `collect_open_tasks()` helper with sorting and filtering - Added error variants for invalid task numbers, missing file paths, and @Task marker issues - Added 14 unit tests covering filtering, sorting, and error cases - Updated README.md and REQUIREMENTS.md with new command documentation ## Test plan - [x] Run `cargo test` - all 160 tests pass - [x] Run `cargo clippy` - no warnings - [x] Run `cargo fmt --check` - properly formatted - [ ] Manual testing: verify `streamd todo` shows numbered tasks - [ ] Manual testing: verify `streamd todo 1 edit` opens editor at correct line - [ ] Manual testing: verify `streamd todo 1 done` inserts @Done marker - [ ] Manual testing: verify `--show-future` flag behavior Closes #63
Sign in to join this conversation.
No labels
planned
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: kfickel/streamd#72
No description provided.