From a1fa857a2f5ab163ffe5abbdeeb0eba8fc9508e9 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 13 Jan 2026 13:36:09 -1000 Subject: Implement Phase 2 Steps 3-5: Sorting and Search improvements Step 3 - Trello Smart Sorting: - Update GetBoards SQL with LEFT JOIN and MAX(c.id) for activity sorting - Update GetBoardsWithCards to find max card ID per board - Sort by: 1) Has cards, 2) Newest card activity, 3) Board name - Trello IDs are chronologically sortable (newer > older) Step 4 - Todoist Due-First Sorting: - Update GetTasks ORDER BY with CASE WHEN due_date IS NULL - Sort by: 1) Incomplete, 2) Has due date, 3) Earliest date, 4) Priority - Tasks with due dates appear before tasks without due dates Step 5 - Obsidian Search: - Add SearchNotes method with LIKE queries on title/content - Update HandleNotes to check 'q' query param and HX-Target header - Implement smart partial rendering (obsidian-notes vs notes-tab) - Add search input with 300ms debounce and HTMX integration - Real-time search without page reload Mark Steps 1-5 as complete in PHASE_2_SURGICAL_PLAN.md All tests passing Co-Authored-By: Claude Sonnet 4.5 --- PHASE_2_SURGICAL_PLAN.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'PHASE_2_SURGICAL_PLAN.md') diff --git a/PHASE_2_SURGICAL_PLAN.md b/PHASE_2_SURGICAL_PLAN.md index bd761e5..438f5ee 100644 --- a/PHASE_2_SURGICAL_PLAN.md +++ b/PHASE_2_SURGICAL_PLAN.md @@ -3,7 +3,7 @@ This phase transforms the dashboard into a primary interface with write capabilities, smart sorting, and a refined "Glassmorphism" UI. ## 1. The Unified Atom Model -**Status:** [ ] Pending +**Status:** [x] Complete ```text Define `models.Atom` to abstract over Trello, Todoist, Obsidian, and PlanToEat. @@ -56,7 +56,7 @@ Enhance Trello sorting in `internal/api/trello.go` and `internal/store/sqlite.go ``` ## 4. Todoist: "Due First" Sorting -**Status:** [ ] Pending +**Status:** [x] Complete ```text Ensure Todoist tasks are sorted by urgency. @@ -69,7 +69,7 @@ Ensure Todoist tasks are sorted by urgency. ``` ## 5. Obsidian: Search & Categorization -**Status:** [ ] Pending +**Status:** [x] Complete ```text Enhance Obsidian to support search and categorization. -- cgit v1.2.3