From 887630365ff0531a0556cb71a6b1be0956c41d06 Mon Sep 17 00:00:00 2001
From: Claude <noreply@anthropic.com>
Date: Mon, 12 Jan 2026 08:57:51 +0000
Subject: feat(deck): show due card count on deck list page

Display a badge with the number of cards due for study today next to
each deck name on the home page. The count is fetched along with deck
data from the API to minimize additional network requests.
---
 src/client/pages/HomePage.tsx | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

(limited to 'src/client/pages/HomePage.tsx')

diff --git a/src/client/pages/HomePage.tsx b/src/client/pages/HomePage.tsx
index e0e9e9e..ad6ece4 100644
--- a/src/client/pages/HomePage.tsx
+++ b/src/client/pages/HomePage.tsx
@@ -57,14 +57,21 @@ function DeckList({
 				>
 					<div className="flex items-start justify-between gap-4">
 						<div className="flex-1 min-w-0">
-							<Link
-								href={`/decks/${deck.id}`}
-								className="block group-hover:text-primary transition-colors"
-							>
-								<h3 className="font-display text-lg font-medium text-slate truncate">
-									{deck.name}
-								</h3>
-							</Link>
+							<div className="flex items-center gap-3">
+								<Link
+									href={`/decks/${deck.id}`}
+									className="block group-hover:text-primary transition-colors flex-1 min-w-0"
+								>
+									<h3 className="font-display text-lg font-medium text-slate truncate">
+										{deck.name}
+									</h3>
+								</Link>
+								{deck.dueCardCount > 0 && (
+									<span className="shrink-0 inline-flex items-center justify-center min-w-[1.5rem] h-6 px-2 bg-primary text-white text-sm font-medium rounded-full">
+										{deck.dueCardCount}
+									</span>
+								)}
+							</div>
 							{deck.description && (
 								<p className="text-muted text-sm mt-1 line-clamp-2">
 									{deck.description}
-- 
cgit v1.2.3-70-g09d2

