From dedda31d064ddcb4f857f2db851c5a8c1e19deba Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 25 Jan 2026 17:05:49 -1000 Subject: Implement architectural refactors for feature requests #28, #30, #31, #33-38 Phase 1: Bugs as First-Class Atoms (#28) - Add resolved_at column to bugs table (migration 007) - Add GetUnresolvedBugs(), ResolveBug(), UnresolveBug() store methods - Include bugs in Tasks tab via BugToAtom() with completion toggle - Add unit tests for bug resolution Phase 2: Timeline as Default + Enhancements (#35, #37) - Change default tab from tasks to timeline - Add IsCompleted, DaySection, Source fields to TimelineItem - Group timeline items by today/tomorrow/later sections - Add completion checkboxes for tasks/cards, grey completed items - Collapse tomorrow/later sections by default Phase 3: Shopping Quick-Add (#33) - Add user_shopping_items table (migration 008) - Add SaveUserShoppingItem(), GetUserShoppingItems(), ToggleUserShoppingItem() - Add HandleShoppingQuickAdd() and HandleShoppingToggle() handlers - Add quick-add form to shopping tab Phase 4: Mobile Swipe Navigation (#38) - Add touch event handlers for swipe left/right tab switching - 50px threshold triggers tab change Phase 5: Consistent Background Opacity (#30) - Add CSS variables for panel/card/input/modal backgrounds - Update templates to use consistent opacity classes Phase 6: Tab Reorganization (#37) - Reorganize tabs: Timeline, Shopping, Conditions as main tabs - Move Tasks, Planning, Meals under Details dropdown Co-Authored-By: Claude Opus 4.5 --- web/templates/partials/shopping-tab.html | 32 +++++- web/templates/partials/tasks-tab.html | 4 +- web/templates/partials/timeline-tab.html | 162 ++++++++++++++++++++----------- 3 files changed, 134 insertions(+), 64 deletions(-) (limited to 'web/templates/partials') diff --git a/web/templates/partials/shopping-tab.html b/web/templates/partials/shopping-tab.html index 19c570f..1f589e5 100644 --- a/web/templates/partials/shopping-tab.html +++ b/web/templates/partials/shopping-tab.html @@ -4,25 +4,47 @@ hx-trigger="refresh-tasks from:body" hx-target="#tab-content" hx-swap="innerHTML"> + + +
+
+ + + +
+
+ {{if .Stores}} {{range .Stores}} -
+

{{.Name}}

{{range .Categories}}
{{if .Name}}

{{.Name}}

{{end}}
    {{range .Items}} -
  • +
  • {{.Name}} {{if .Quantity}}{{.Quantity}}{{end}} - + {{.Source}}
  • @@ -35,7 +57,7 @@ {{else}}

    No shopping items

    -

    Add items from PlanToEat or Trello's Shopping board

    +

    Use the form above to add items quickly

    {{end}}
diff --git a/web/templates/partials/tasks-tab.html b/web/templates/partials/tasks-tab.html index db986bb..9e030e4 100644 --- a/web/templates/partials/tasks-tab.html +++ b/web/templates/partials/tasks-tab.html @@ -8,7 +8,7 @@ {{if .Atoms}}
{{range .Atoms}} -
+
{{range .FutureAtoms}} -
+
- {{$currentDay := ""}} - {{range .Items}} - {{$day := .Time.Format "Monday, January 2"}} - {{if ne $day $currentDay}} - {{if ne $currentDay ""}} -
-
+ + {{if .TodayItems}} +
+

+ 📅 Today +

+
+ {{range .TodayItems}} + {{template "timeline-item" .}} {{end}} - {{$currentDay = $day}} -
-

- 🗓️ {{$day}} -

-
+
+
+ {{end}} + + + {{if .TomorrowItems}} +
+ + 🗓️ Tomorrow + ({{len .TomorrowItems}} items) + + + + +
+ {{range .TomorrowItems}} + {{template "timeline-item" .}} + {{end}} +
+
+ {{end}} + + + {{if .LaterItems}} +
+ + 📆 Later + ({{len .LaterItems}} items) + + + + +
+ {{range .LaterItems}} + {{template "timeline-item" .}} + {{end}} +
+
+ {{end}} + + {{if and (not .TodayItems) (not .TomorrowItems) (not .LaterItems)}} +
+

No items found for the selected range.

+
+ {{end}} + +
+{{end}} + +{{define "timeline-item"}} +
+ +
+
+ +
+ + {{if or (eq .Type "task") (eq .Type "card")}} + {{end}} -
- -
+
+ {{.Time.Format "3:04 PM"}} + {{if .EndTime}} + {{.EndTime.Format "3:04 PM"}} + {{end}} +
+ +
+
+

{{.Title}}

+ {{if .URL}} + + + + + + {{end}}
-
-
- {{.Time.Format "3:04 PM"}} - {{if .EndTime}} - {{.EndTime.Format "3:04 PM"}} - {{end}} -
- -
-
-

{{.Title}}

- {{if .URL}} - - - - - - {{end}} -
- - {{if .Description}} -

{{.Description}}

- {{end}} + {{if .Description}} +

{{.Description}}

+ {{end}} -
- - {{.Type}} - -
-
+
+ + {{.Type}} + + {{if .IsCompleted}} + + done + + {{end}}
- {{end}} - - {{if ne $currentDay ""}} -
-
- {{else}} -
-

No items found for the selected range.

-
- {{end}} - +
{{end}} -- cgit v1.2.3