From 7f8cd6bfb894385b9ae310fd000cb921fef71cea Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 25 Jul 2026 20:09:42 +0000 Subject: fix: undated tasks were landing in the widget's scheduled-events grid ComputeDaySection unconditionally recomputed IsAllDay from a midnight-time heuristic, clobbering the IsAllDay:true flag callers set to mark floating (no-due-date) tasks -- since undated tasks use Time = now, this silently reset IsAllDay to false and gave them a real Start, so the widget could render them via EventBlock/HourRow instead of TaskRow. Their click handler always opens the calendar/source URL, so tapping a no-due-date task (e.g. a Google Task) opened Google Calendar instead of the task detail sheet. ComputeDaySection now only ever sets IsAllDay true, never clears an already-true value. Also flag IsAllDay for undated Google Tasks, which never got it set at all (only native undated doot tasks did). --- internal/handlers/timeline_logic.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/handlers/timeline_logic.go') diff --git a/internal/handlers/timeline_logic.go b/internal/handlers/timeline_logic.go index e3da760..b008221 100644 --- a/internal/handlers/timeline_logic.go +++ b/internal/handlers/timeline_logic.go @@ -146,6 +146,13 @@ func BuildTimeline(ctx context.Context, s *store.Store, start, end time.Time) ([ IsCompleted: gTask.Completed, Source: "gtasks", ListID: gTask.ListID, + // No due date -- flag IsAllDay like nativeUndated tasks below so + // TimelineItemToWidgetItem leaves Start nil instead of pinning it + // to "now", which otherwise lands it among scheduledEvents and + // renders it via EventBlock/HourRow -- rows whose click handler + // always opens the source URL/Google Calendar, not the task's + // detail sheet. + IsAllDay: gTask.DueDate == nil, } item.ComputeDaySection(now) items = append(items, item) -- cgit v1.2.3