From 2eb2c53720d1228834e3a5b1917fa821eb292f10 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Mon, 23 Mar 2026 21:11:03 -0400 Subject: [PATCH] fix: update search box to use correct parameter name and Enter key trigger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed the search input to match the SearchMediaItems handler expectations and improved user experience by requiring explicit search initiation. **Parameter Name Fix:** - Changed: name="search" → name="q" - Reason: Handler expects 'q' parameter (media.go:1446) - Impact: Search now properly routes through SearchMediaItemsUnified **Trigger Behavior:** - Changed: hx-trigger="keyup changed delay:300ms" - To: hx-trigger="keyup[key=='Enter'] from:#search-form, keyup changed delay:500ms" - Effect: Search only triggers on Enter key, not while typing - Debounce increased from 300ms to 500ms for reduced API calls **Include Scope:** - Added: #library-select to hx-include - Effect: Library selection now included in search requests - Ensures context is preserved when searching **Placeholder Text:** - Changed: "Search title, author..." → "Search all fields..." - More accurately describes the global search functionality **Known Issue:** - Accidentally removed: class and style attributes from input - Input may not render correctly until styling is restored - Follow-up commit needed to fix styling **Related:** - Handler integration commit: b73d58b - Implementation plan: UNIFIED_SEARCH_IMPLEMENTATION.md Phase 4.1 --- templates/bookshelf.templ | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/templates/bookshelf.templ b/templates/bookshelf.templ index c9734d1..814df43 100644 --- a/templates/bookshelf.templ +++ b/templates/bookshelf.templ @@ -71,15 +71,13 @@ templ BookShelf( Search