From 583f90c5dedf0235fa45557359b0e6e7dd62b0f0 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 21 Jan 2026 22:53:37 -1000 Subject: Implement 10 UI/UX improvements and bug fixes - Fix outdated Todoist task URL format (showTask -> app/task) - Fix quick-add date defaulting to tomorrow in evening (client-side JS) - Add tap-to-expand for task descriptions with checkbox completion - Add visual differentiation: overdue (red), future (gray), today (normal) - Sort tasks by urgency: overdue > today-timed > today-allday > future - Keep completed tasks visible with strikethrough until refresh - Add random Unsplash landscape background with content overlay - Hide future tasks behind collapsible fold with count badge - Unified modal menu for Quick Add + Bug Report (Ctrl+K shortcut) - Click task title to edit description in modal Co-Authored-By: Claude Opus 4.5 --- internal/models/atom.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'internal/models') diff --git a/internal/models/atom.go b/internal/models/atom.go index b3a384a..10d14d1 100644 --- a/internal/models/atom.go +++ b/internal/models/atom.go @@ -37,13 +37,14 @@ type Atom struct { SourceIcon string // e.g., "trello-icon.svg" or emoji ColorClass string // e.g., "border-blue-500" IsOverdue bool // True if due date is before today + IsFuture bool // True if due date is after today HasSetTime bool // True if due time is not midnight (has specific time) // Original Data (for write operations) Raw interface{} } -// ComputeUIFields calculates IsOverdue and HasSetTime based on DueDate +// ComputeUIFields calculates IsOverdue, IsFuture, and HasSetTime based on DueDate func (a *Atom) ComputeUIFields() { if a.DueDate == nil { return @@ -51,11 +52,15 @@ func (a *Atom) ComputeUIFields() { now := time.Now() today := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location()) + tomorrow := today.AddDate(0, 0, 1) // Check if overdue (due date is before today) dueDay := time.Date(a.DueDate.Year(), a.DueDate.Month(), a.DueDate.Day(), 0, 0, 0, 0, a.DueDate.Location()) a.IsOverdue = dueDay.Before(today) + // Check if future (due date is after today) + a.IsFuture = !dueDay.Before(tomorrow) + // Check if has set time (not midnight) a.HasSetTime = a.DueDate.Hour() != 0 || a.DueDate.Minute() != 0 } -- cgit v1.2.3