From 2d1b58d49c99d2cbecc253b655ee583880156f40 Mon Sep 17 00:00:00 2001
From: Adam Mathes <adam@adammathes.com>
Date: Fri, 13 Feb 2026 17:02:58 -0800
Subject: feat(v2): implement search functionality (NK-shpyxh)

---
 frontend/src/components/FeedItems.tsx | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

(limited to 'frontend/src/components/FeedItems.tsx')

diff --git a/frontend/src/components/FeedItems.tsx b/frontend/src/components/FeedItems.tsx
index dcfd867..60b307e 100644
--- a/frontend/src/components/FeedItems.tsx
+++ b/frontend/src/components/FeedItems.tsx
@@ -38,6 +38,11 @@ export default function FeedItems() {
         }
 
         // Apply filters
+        const searchQuery = searchParams.get('q');
+        if (searchQuery) {
+            params.append('q', searchQuery);
+        }
+
         if (filterFn === 'all') {
             params.append('read_filter', 'all');
         } else if (filterFn === 'starred') {
@@ -45,7 +50,9 @@ export default function FeedItems() {
             params.append('read_filter', 'all');
         } else {
             // default to unread
-            params.append('read_filter', 'unread');
+            if (!searchQuery) {
+                params.append('read_filter', 'unread');
+            }
         }
 
         const queryString = params.toString();
@@ -79,7 +86,8 @@ export default function FeedItems() {
 
     useEffect(() => {
         fetchItems();
-    }, [feedId, tagName, filterFn]);
+        setSelectedIndex(-1);
+    }, [feedId, tagName, filterFn, searchParams]);
 
     const [selectedIndex, setSelectedIndex] = useState(-1);
 
-- 
cgit v1.2.3

