summaryrefslogtreecommitdiff
path: root/internal/api/google_tasks.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-31 21:23:56 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-31 21:23:56 -1000
commitf9127d5272042f4980ece8b39a47613f95eeaf8e (patch)
treee111cc6f85b0cd23dd7e705b0390d1154fbc13ee /internal/api/google_tasks.go
parentcbb0b53de1d06918c142171fd084f14f03798bc1 (diff)
Fix timeline calendar view and shopping UI bugs (#56, #65-73)
- #56: Add overflow-hidden to card/panel classes to prevent content overflow - #65: Fix Google Tasks not showing by including tasks without due dates - #66: Add no-cache headers to prevent stale template responses - #67: Increase dropdown z-index to 100 for proper layering - #69: Implement calendar-style Today section with hourly grid (6am-10pm), duration-based event heights, and compact overdue/all-day section - #70: Only reset shopping-mode form on successful submission - #71: Remove checkboxes from shopping tab (only show in shopping mode) - #72: Add inline add-item input at end of each store section - #73: Add Grouped/Flat view toggle for shopping list Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/api/google_tasks.go')
-rw-r--r--internal/api/google_tasks.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/internal/api/google_tasks.go b/internal/api/google_tasks.go
index 77a00ed..ecacb6d 100644
--- a/internal/api/google_tasks.go
+++ b/internal/api/google_tasks.go
@@ -123,23 +123,26 @@ func (c *GoogleTasksClient) getTasksFromList(ctx context.Context, listID string)
return result, nil
}
-// GetTasksByDateRange fetches tasks with due dates in the specified range
+// GetTasksByDateRange fetches tasks with due dates in the specified range.
+// Tasks without due dates are included and treated as "today" tasks.
func (c *GoogleTasksClient) GetTasksByDateRange(ctx context.Context, start, end time.Time) ([]models.GoogleTask, error) {
allTasks, err := c.GetTasks(ctx)
if err != nil {
return nil, err
}
- // Filter by date range
+ startDay := time.Date(start.Year(), start.Month(), start.Day(), 0, 0, 0, 0, c.displayTZ)
+ endDay := time.Date(end.Year(), end.Month(), end.Day(), 0, 0, 0, 0, c.displayTZ)
+
+ // Filter by date range, include tasks without due dates
var filtered []models.GoogleTask
for _, task := range allTasks {
if task.DueDate == nil {
+ // Include tasks without due dates (they'll be shown in "today" section)
+ filtered = append(filtered, task)
continue
}
dueDay := time.Date(task.DueDate.Year(), task.DueDate.Month(), task.DueDate.Day(), 0, 0, 0, 0, c.displayTZ)
- startDay := time.Date(start.Year(), start.Month(), start.Day(), 0, 0, 0, 0, c.displayTZ)
- endDay := time.Date(end.Year(), end.Month(), end.Day(), 0, 0, 0, 0, c.displayTZ)
-
if !dueDay.Before(startDay) && dueDay.Before(endDay) {
filtered = append(filtered, task)
}