From 143166ce759ce2cb0133b7438db36b844a9db1a7 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 18 Jan 2026 14:06:26 -1000 Subject: Implement Trello task heuristics for Tasks tab (Phase 3 Step 6) Add filtering logic to show Trello cards as actionable tasks when they have due dates OR are in lists named like "todo", "doing", "in progress", "tasks", "next", or "today". This makes the Tasks tab more useful by surfacing cards that represent work items even without explicit due dates. Co-Authored-By: Claude Opus 4.5 --- internal/handlers/tabs.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'internal/handlers/tabs.go') diff --git a/internal/handlers/tabs.go b/internal/handlers/tabs.go index c23910d..ce9c34f 100644 --- a/internal/handlers/tabs.go +++ b/internal/handlers/tabs.go @@ -5,12 +5,25 @@ import ( "log" "net/http" "sort" + "strings" "time" "task-dashboard/internal/models" "task-dashboard/internal/store" ) +// isActionableList returns true if the list name indicates an actionable list +func isActionableList(name string) bool { + lower := strings.ToLower(name) + return strings.Contains(lower, "doing") || + strings.Contains(lower, "in progress") || + strings.Contains(lower, "to do") || + strings.Contains(lower, "todo") || + strings.Contains(lower, "tasks") || + strings.Contains(lower, "next") || + strings.Contains(lower, "today") +} + // TabsHandler handles tab-specific rendering with Atom model type TabsHandler struct { store *store.Store @@ -65,10 +78,10 @@ func (h *TabsHandler) HandleTasks(w http.ResponseWriter, r *http.Request) { } } - // Convert Trello cards with due dates + // Convert Trello cards with due dates or in actionable lists for _, board := range boards { for _, card := range board.Cards { - if card.DueDate != nil { + if card.DueDate != nil || isActionableList(card.ListName) { atoms = append(atoms, models.CardToAtom(card)) } } -- cgit v1.2.3