From 490edf9e9f2911231df6c76ef4afeb3b1fb763d2 Mon Sep 17 00:00:00 2001
From: Adam Mathes <adam@adammathes.com>
Date: Sat, 14 Feb 2026 14:49:09 -0800
Subject: task: improve mobile responsiveness of React UI\n\n- Added media
 queries to App.css to handle mobile sidebar layout (overlay with backdrop)\n-
 Implemented auto-hiding sidebar on mobile when links are clicked\n- Reduced
 padding and adjusted max-widths for smaller screens in App.css, FeedItem.css,
 and Settings.css\n- Added window resize listener to Dashboard to manage
 sidebar visibility based on width\n- Verified all existing tests
 pass\n\nFixes NK-g818qn

---
 frontend/src/components/FeedList.tsx | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

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

diff --git a/frontend/src/components/FeedList.tsx b/frontend/src/components/FeedList.tsx
index 4ce2d71..250ce7d 100644
--- a/frontend/src/components/FeedList.tsx
+++ b/frontend/src/components/FeedList.tsx
@@ -8,10 +8,12 @@ export default function FeedList({
   theme,
   setTheme,
   setSidebarVisible,
+  isMobile,
 }: {
   theme: string;
   setTheme: (t: string) => void;
   setSidebarVisible: (visible: boolean) => void;
+  isMobile: boolean;
 }) {
   const [feeds, setFeeds] = useState<Feed[]>([]);
   const [tags, setTags] = useState<Category[]>([]);
@@ -39,6 +41,12 @@ export default function FeedList({
     setFeedsExpanded(!feedsExpanded);
   };
 
+  const handleLinkClick = () => {
+    if (isMobile) {
+      setSidebarVisible(false);
+    }
+  };
+
   useEffect(() => {
     Promise.all([
       apiFetch('/api/feed/').then((res) => {
@@ -89,17 +97,17 @@ export default function FeedList({
       <div className="filter-section">
         <ul className="filter-list">
           <li className="unread_filter">
-            <Link to="/?filter=unread" className={currentFilter === 'unread' ? 'active' : ''}>
+            <Link to="/?filter=unread" className={currentFilter === 'unread' ? 'active' : ''} onClick={handleLinkClick}>
               unread
             </Link>
           </li>
           <li className="all_filter">
-            <Link to="/?filter=all" className={currentFilter === 'all' ? 'active' : ''}>
+            <Link to="/?filter=all" className={currentFilter === 'all' ? 'active' : ''} onClick={handleLinkClick}>
               all
             </Link>
           </li>
           <li className="starred_filter">
-            <Link to="/?filter=starred" className={currentFilter === 'starred' ? 'active' : ''}>
+            <Link to="/?filter=starred" className={currentFilter === 'starred' ? 'active' : ''} onClick={handleLinkClick}>
               starred
             </Link>
           </li>
@@ -116,6 +124,7 @@ export default function FeedList({
               <Link
                 to={`/tag/${encodeURIComponent(tag.title)}`}
                 className={`tag-link ${tagName === tag.title ? 'active' : ''}`}
+                onClick={handleLinkClick}
               >
                 {tag.title}
               </Link>
@@ -138,6 +147,7 @@ export default function FeedList({
                   <Link
                     to={`/feed/${feed._id}`}
                     className={`feed-title ${feedId === String(feed._id) ? 'active' : ''}`}
+                    onClick={handleLinkClick}
                   >
                     {feed.title || feed.url}
                   </Link>
@@ -150,7 +160,7 @@ export default function FeedList({
       <div className="nav-section">
         <ul className="nav-list">
           <li>
-            <Link to="/settings" className="nav-link">
+            <Link to="/settings" className="nav-link" onClick={handleLinkClick}>
               settings
             </Link>
           </li>
-- 
cgit v1.2.3

