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/models/timeline.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'internal/models/timeline.go') diff --git a/internal/models/timeline.go b/internal/models/timeline.go index 4b90856..5224b72 100644 --- a/internal/models/timeline.go +++ b/internal/models/timeline.go @@ -66,8 +66,15 @@ func (item *TimelineItem) ComputeDaySection(now time.Time) { // Check if item is overdue (before today) item.IsOverdue = itemDay.Before(today) - // Check if item is all-day (midnight time means no specific time) - item.IsAllDay = localItemTime.Hour() == 0 && localItemTime.Minute() == 0 + // Check if item is all-day (midnight time means no specific time). + // Only ever sets IsAllDay to true here -- never clears a true a caller + // already set (e.g. nativeUndated/gtask "no due date" tasks, which use + // IsAllDay as a floating-task marker with Time set to "now", not + // midnight -- clobbering it back to false made them look like real + // scheduled items to the widget client). + if localItemTime.Hour() == 0 && localItemTime.Minute() == 0 { + item.IsAllDay = true + } if itemDay.Before(tomorrow) { item.DaySection = DaySectionToday -- cgit v1.2.3