From f9127d5272042f4980ece8b39a47613f95eeaf8e Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 31 Jan 2026 21:23:56 -1000 Subject: 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 --- internal/api/google_tasks.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'internal/api') 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) } -- cgit v1.2.3