Skip to content

Conversation

@unfunco
Copy link
Owner

@unfunco unfunco commented Nov 16, 2025

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.

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.
@unfunco unfunco requested a review from Copilot November 16, 2025 14:20
@unfunco unfunco self-assigned this Nov 16, 2025
@unfunco unfunco added the adds a feature 💡 Improvements or additions. label Nov 16, 2025
Copy link

Copilot AI left a 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 automation package that syncs lists and applies date-based rules on app startup
  • Added DueDate field to the Todo model 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
}

Copy link

Copilot AI Nov 16, 2025

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)
Suggested change
todo.SetDueDate(list.DefaultDueDate(list.TodayID, todayStart))

Copilot uses AI. Check for mistakes.
unfunco and others added 2 commits November 16, 2025 14:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@unfunco unfunco merged commit d0e5a9b into main Nov 16, 2025
1 check passed
@unfunco unfunco deleted the feat/automations branch November 16, 2025 14:28
@github-actions github-actions bot mentioned this pull request Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adds a feature 💡 Improvements or additions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants