summaryrefslogtreecommitdiff
path: root/web/templates
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-13 13:36:09 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-13 13:36:09 -1000
commita1fa857a2f5ab163ffe5abbdeeb0eba8fc9508e9 (patch)
tree11a25b75fb10e4b5262ca397b104c125432c7aaa /web/templates
parent2fb1ed729fbd61d70b38a11903fb35eabb2bdca1 (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'web/templates')
-rw-r--r--web/templates/partials/notes-tab.html44
1 files changed, 29 insertions, 15 deletions
diff --git a/web/templates/partials/notes-tab.html b/web/templates/partials/notes-tab.html
index 526f387..df844cf 100644
--- a/web/templates/partials/notes-tab.html
+++ b/web/templates/partials/notes-tab.html
@@ -3,20 +3,34 @@
<!-- Error Messages -->
{{template "error-banner" .}}
- <!-- Obsidian Notes Section -->
- {{if .Notes}}
- {{template "obsidian-notes" .}}
- {{else}}
- <div class="text-center py-20">
- <svg class="mx-auto h-16 w-16 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
- d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
- </svg>
- <h3 class="mt-6 text-xl font-medium text-gray-900">No notes found</h3>
- <p class="mt-2 text-sm text-gray-500 max-w-md mx-auto">
- Configure your Obsidian vault path in the settings to see your recent notes displayed here.
- </p>
- </div>
- {{end}}
+ <!-- Search Bar -->
+ <div class="mb-6">
+ <input type="text"
+ name="q"
+ placeholder="Search notes..."
+ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-obsidian focus:border-transparent"
+ hx-get="/tabs/notes"
+ hx-trigger="keyup changed delay:300ms"
+ hx-target="#notes-results"
+ hx-indicator="#search-indicator">
+ </div>
+
+ <!-- Notes Results -->
+ <div id="notes-results">
+ {{if .Notes}}
+ {{template "obsidian-notes" .}}
+ {{else}}
+ <div class="text-center py-20">
+ <svg class="mx-auto h-16 w-16 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
+ d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
+ </svg>
+ <h3 class="mt-6 text-xl font-medium text-gray-900">No notes found</h3>
+ <p class="mt-2 text-sm text-gray-500 max-w-md mx-auto">
+ Configure your Obsidian vault path in the settings to see your recent notes displayed here.
+ </p>
+ </div>
+ {{end}}
+ </div>
</div>
{{end}}