From 1afb825860cd293b8065d51746f4b23e4e8dab5d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Feb 2026 14:54:18 +0000 Subject: feat: 学習カード数の上限を撤廃 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REVIEW_CARDS_LIMIT(復習カード80枚制限)とnewCardsPerDay(1日の新規カード制限) を削除し、期日が来たすべてのカードを制限なく返すように変更。 削除した主な要素: - REVIEW_CARDS_LIMIT定数とカード取得時のlimitパラメータ - newCardsPerDayフィールド(DB schema, 型定義, Zod schema, sync, CRDT) - countDueNewCards, countDueReviewCards, findDueNewCardsForStudy, findDueReviewCardsForStudy(CardRepository) - countTodayNewCardReviews(ReviewLogRepository) - デッキルートからのReviewLogRepository依存 https://claude.ai/code/session_018hrEJ9vg3RPoeAPyEc17gS --- src/server/routes/study.ts | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/server/routes/study.ts') diff --git a/src/server/routes/study.ts b/src/server/routes/study.ts index d05f3ca..0f42f93 100644 --- a/src/server/routes/study.ts +++ b/src/server/routes/study.ts @@ -52,20 +52,9 @@ export function createStudyRouter(deps: StudyDependencies) { const now = new Date(); - // Calculate new card budget based on today's already-reviewed new cards - const reviewedNewCards = await reviewLogRepo.countTodayNewCardReviews( - deckId, - now, - ); - const newCardBudget = Math.max(0, deck.newCardsPerDay - reviewedNewCards); - - // Fetch new cards (limited) and review cards separately - const [newCards, reviewCards] = await Promise.all([ - cardRepo.findDueNewCardsForStudy(deckId, now, newCardBudget), - cardRepo.findDueReviewCardsForStudy(deckId, now, 80), - ]); - - return c.json({ cards: [...newCards, ...reviewCards] }, 200); + const cards = await cardRepo.findDueCardsForStudy(deckId, now); + + return c.json({ cards }, 200); }) .post( "/:cardId", -- cgit v1.3-1-g0d28