From 7ff02cd24054ba6a629478cb20f565c7c6c76fbd Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 15 Feb 2026 17:50:41 +0900
Subject: feat(frontend): filter feed sidebar by read/unread view

Unread sidebar now only shows feeds with unread articles.
Read sidebar shows all feeds but hides the unread count badge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
 frontend/src/components/FeedSidebar.tsx | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

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

diff --git a/frontend/src/components/FeedSidebar.tsx b/frontend/src/components/FeedSidebar.tsx
index 4d6502d..e196127 100644
--- a/frontend/src/components/FeedSidebar.tsx
+++ b/frontend/src/components/FeedSidebar.tsx
@@ -4,15 +4,20 @@ import { feedsAtom } from "../atoms";
 
 interface Props {
 	basePath: string;
+	isReadView?: boolean;
 }
 
-export function FeedSidebar({ basePath }: Props) {
+export function FeedSidebar({ basePath, isReadView = false }: Props) {
 	const search = useSearch();
 	const [, setLocation] = useLocation();
 	const params = new URLSearchParams(search);
 	const selectedFeedId = params.get("feed");
 
-	const { data: feeds } = useAtomValue(feedsAtom);
+	const { data: allFeeds } = useAtomValue(feedsAtom);
+
+	const feeds = isReadView
+		? allFeeds
+		: allFeeds.filter((feed) => feed.unreadCount > 0);
 
 	const handleSelect = (feedId: string | null) => {
 		if (feedId) {
@@ -53,7 +58,7 @@ export function FeedSidebar({ basePath }: Props) {
 							}`}
 						>
 							<span className="min-w-0 truncate">{feed.title}</span>
-							{feed.unreadCount > 0 && (
+							{!isReadView && feed.unreadCount > 0 && (
 								<span className="ml-2 shrink-0 rounded-full bg-sky-100 px-1.5 py-0.5 text-xs font-medium text-sky-700">
 									{feed.unreadCount}
 								</span>
-- 
cgit v1.3-1-g0d28

