Smoother Todo Editing #63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
every entry a number on
streamd todo, and withstreamd todo 4 edit, one can edit entry 4 (like with streamd new), and withstreamd todo 4 donea@Doneis inserted directly after@Task.Also, if the flag --show-future is not set, all tasks with a date in the LocalizedDate set in the future won't be shown.
Test the feature thoroughly.
Implementation Plan
Overview
Enhance the
streamd todocommand to support task numbering, inline editing, marking tasks as done, and filtering out future tasks.Requirements Summary
streamd todostreamd todo N edit(opens full file at task line)streamd todo N done(inserts@Doneafter@Task)momentfield vs current UTC time)--show-futureflag to include future tasks in listingImplementation Steps
1. Modify CLI Arguments (
src/cli/args.rs)Update the
Todocommand to accept subcommands:Add a new enum for todo actions:
Alternative (simpler): Use positional arguments instead of subcommands:
2. Refactor Todo Command (
src/cli/commands/todo.rs)2.1 Add helper to collect and sort tasks:
2.2 Modify the list display to show numbers:
3. Implement
todo N edit(src/cli/commands/todo.rs)4. Implement
todo N done(src/cli/commands/todo.rs)5. Add New Error Variants (
src/errors.rs)6. Update Main Router (
src/main.rs)7. Testing Strategy
Unit Tests:
collect_open_tasks()with various shard configurations@Doneinsertion with various line formatsIntegration Tests:
streamd todoand verify numbered outputstreamd todo N doneand verify file modification--show-futureflag behaviorEdge Cases to Test:
@Taskin content (not as marker) - should this be handled?8. Documentation Updates
Update
README.mdandREQUIREMENTS.md:streamd todonumbered outputstreamd todo N editcommandstreamd todo N donecommand--show-futureflagFile Changes Summary
src/cli/args.rsTodoActionenum, updateTodocommandsrc/cli/commands/todo.rsrun_list,run_edit,run_donefunctionssrc/main.rssrc/errors.rsREADME.mdREQUIREMENTS.mdDesign Decisions (Clarified)
momentascending)+LINEargument for cursor positioning@Doneinserted immediately after@Taskon the same lineLocalizedShard.momentagainstUtc::now()@Taskmarkers found on same line