-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add initial automations and overdue labels #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This adds some initial automations when the app is launched that will ensure everything has due dates, and then moves todo items between lists based on the date they were created, e.g. a todo for tomorrow created yesterday will appear in the today list when the app is opened. Additionally this adds an overdue label to todos that are past the due date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds automated list management and overdue labeling to a todo application. When the app launches, it automatically ensures all todos have due dates, moves items between lists based on their due dates (e.g., yesterday's "tomorrow" todos move to "today"), and displays an "Overdue" label for past-due items.
Key changes:
- Introduced a new
automationpackage that syncs lists and applies date-based rules on app startup - Added
DueDatefield to theTodomodel with helper methods for managing overdue status - Integrated automation into both the TUI and CLI entry points
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/automation/automation.go | New package implementing list synchronization, due date backfilling, and automated todo movement between lists |
| internal/automation/automation_test.go | Test coverage for automation sync functionality including todo movement and due date backfilling |
| internal/model/todo.go | Added DueDate field and methods (IsOverdue, SetDueDate) plus utility functions for date handling |
| internal/list/list.go | Added DefaultDueDate function to compute appropriate due dates for different list types |
| internal/tui/tui.go | Integrated overdue label rendering and due date assignment when creating/moving todos |
| internal/cmd/t.go | Integrated automation.Sync calls to ensure list consistency on app launch and todo creation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| remaining = append(remaining, todo) | ||
| continue | ||
| } | ||
|
|
Copilot
AI
Nov 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When moving a todo from the tomorrow list to the today list, the due date should be updated to reflect the new list. Consider updating the todo's due date to today before appending it to the today list:
todo.SetDueDate(list.DefaultDueDate(list.TodayID, todayStart))
todayList.Todos = append(todayList.Todos, todo)| todo.SetDueDate(list.DefaultDueDate(list.TodayID, todayStart)) |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This adds some initial automations when the app is launched that will ensure everything has due dates, and then moves todo items between lists based on the date they were created, e.g. a todo for tomorrow created yesterday will appear in the today list when the app is opened.
Additionally this adds an overdue label to todos that are past the due date.