summaryrefslogtreecommitdiff
path: root/internal/handlers/timeline_logic.go
diff options
context:
space:
mode:
authorDoot Agent <agent@doot.local>2026-07-06 00:00:59 +0000
committerDoot Agent <agent@doot.local>2026-07-06 00:00:59 +0000
commit945c34590677e161a711ccaff0e1077197b1b178 (patch)
treedf26e8ba5a369b3323649c2fab95bd8e7a49b58e /internal/handlers/timeline_logic.go
parentcd14604bbef17f696475cf8737f1e41c9fa2dd06 (diff)
feat: remove Todoist integration entirely
Native tasks (native_tasks table) fully replace Todoist. All Todoist API code, store functions, handlers, routes, templates, and tests have been removed. Migration 021 drops the now-unused tasks cache table. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/handlers/timeline_logic.go')
-rw-r--r--internal/handlers/timeline_logic.go49
1 files changed, 1 insertions, 48 deletions
diff --git a/internal/handlers/timeline_logic.go b/internal/handlers/timeline_logic.go
index c9510bf..67ba09d 100644
--- a/internal/handlers/timeline_logic.go
+++ b/internal/handlers/timeline_logic.go
@@ -17,54 +17,7 @@ func BuildTimeline(ctx context.Context, s *store.Store, start, end time.Time) ([
var items []models.TimelineItem
now := config.Now()
- // 1. Fetch Tasks (dated)
- tasks, err := s.GetTasksByDateRange(start, end)
- if err != nil {
- return nil, err
- }
- for _, task := range tasks {
- if task.DueDate == nil {
- continue
- }
- item := models.TimelineItem{
- ID: task.ID,
- Type: models.TimelineItemTypeTask,
- Title: task.Content,
- Time: *task.DueDate,
- Description: task.Description,
- URL: task.URL,
- OriginalItem: task,
- IsCompleted: task.Completed,
- Source: "todoist",
- }
- item.ComputeDaySection(now)
- items = append(items, item)
- }
-
- // 1b. Fetch undated Tasks — place in Today section
- undatedTasks, err := s.GetUndatedTasks()
- if err != nil {
- log.Printf("Warning: failed to fetch undated tasks: %v", err)
- } else {
- for _, task := range undatedTasks {
- item := models.TimelineItem{
- ID: task.ID,
- Type: models.TimelineItemTypeTask,
- Title: task.Content,
- Time: now,
- Description: task.Description,
- URL: task.URL,
- OriginalItem: task,
- IsCompleted: task.Completed,
- Source: "todoist",
- IsAllDay: true,
- }
- item.ComputeDaySection(now)
- items = append(items, item)
- }
- }
-
- // 2. Fetch Meals - combine multiple items for same date+mealType
+ // 1. Fetch Meals - combine multiple items for same date+mealType
meals, err := s.GetMealsByDateRange(start, end)
if err != nil {
return nil, err