From 6d53e63d9f3fd81125d0f61e9701ecd262318875 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Feb 2026 11:29:22 +0000 Subject: fix(deck): change review card limit to 80 and simplify deck detail stats Review card limit is reduced from 100 to 80 across deck list, deck detail, and study routes. Deck detail page now shows only total card count and due card count (with budget limits applied), matching the deck list and study screen numbers. https://claude.ai/code/session_01NAj4waQhwSSXV9EbgioX2j --- src/client/pages/DeckDetailPage.tsx | 52 +++++-------------------------------- 1 file changed, 6 insertions(+), 46 deletions(-) (limited to 'src/client/pages/DeckDetailPage.tsx') diff --git a/src/client/pages/DeckDetailPage.tsx b/src/client/pages/DeckDetailPage.tsx index 6bc89ba..d717d60 100644 --- a/src/client/pages/DeckDetailPage.tsx +++ b/src/client/pages/DeckDetailPage.tsx @@ -7,7 +7,6 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useAtomValue } from "jotai"; import { Suspense } from "react"; import { Link, useParams } from "wouter"; -import { getEndOfStudyDayBoundary } from "../../shared/date"; import { cardsByDeckAtomFamily, deckByIdAtomFamily } from "../atoms"; import { ErrorBoundary } from "../components/ErrorBoundary"; import { LoadingSpinner } from "../components/LoadingSpinner"; @@ -25,52 +24,21 @@ function DeckHeader({ deckId }: { deckId: string }) { ); } -// CardState values from FSRS -const CardState = { - New: 0, - Learning: 1, - Review: 2, - Relearning: 3, -} as const; - function DeckStats({ deckId }: { deckId: string }) { + const { data: deck } = useAtomValue(deckByIdAtomFamily(deckId)); const { data: cards } = useAtomValue(cardsByDeckAtomFamily(deckId)); - // Count cards due today (study day boundary is 3:00 AM) - const boundary = getEndOfStudyDayBoundary(); - const dueCards = cards.filter((card) => new Date(card.due) < boundary); - - // Count by card state - const newCards = dueCards.filter((card) => card.state === CardState.New); - const learningCards = dueCards.filter( - (card) => - card.state === CardState.Learning || card.state === CardState.Relearning, - ); - const reviewCards = dueCards.filter( - (card) => card.state === CardState.Review, - ); - return (
-
+

Total

{cards.length}

-

New

-

{newCards.length}

-
-
-

Learning

-

- {learningCards.length} -

-
-
-

Review

-

- {reviewCards.length} +

Due

+

+ {deck.dueCardCount}

@@ -100,7 +68,7 @@ function DeckContent({ deckId }: { deckId: string }) { -
+
@@ -109,14 +77,6 @@ function DeckContent({ deckId }: { deckId: string }) {
-
-
-
-
-
-
-
-
} -- cgit v1.3-1-g0d28