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/client/sync/crdt/repositories.test.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/client/sync/crdt/repositories.test.ts') diff --git a/src/client/sync/crdt/repositories.test.ts b/src/client/sync/crdt/repositories.test.ts index f237536..f7b75b3 100644 --- a/src/client/sync/crdt/repositories.test.ts +++ b/src/client/sync/crdt/repositories.test.ts @@ -35,7 +35,6 @@ describe("crdtDeckRepository", () => { userId: "user-1", name: "Test Deck", description: "A test deck", - newCardsPerDay: 20, createdAt: now, updatedAt: now, deletedAt: null, @@ -77,14 +76,14 @@ describe("crdtDeckRepository", () => { d.data.name = "Updated Name"; }); const updated2 = Automerge.change(doc2, (d) => { - d.data.newCardsPerDay = 30; + d.data.description = "Updated Description"; }); const result = crdtDeckRepository.merge(updated1, updated2); expect(result.hasChanges).toBe(true); expect(result.merged.data.name).toBe("Updated Name"); - expect(result.merged.data.newCardsPerDay).toBe(30); + expect(result.merged.data.description).toBe("Updated Description"); }); it("should convert CRDT document to local entity", () => { @@ -379,7 +378,6 @@ describe("entitiesToCrdtDocuments", () => { userId: "user-1", name: "Deck 1", description: null, - newCardsPerDay: 20, createdAt: now, updatedAt: now, deletedAt: null, @@ -391,7 +389,6 @@ describe("entitiesToCrdtDocuments", () => { userId: "user-1", name: "Deck 2", description: "Second deck", - newCardsPerDay: 15, createdAt: now, updatedAt: now, deletedAt: null, @@ -418,7 +415,6 @@ describe("mergeAndConvert", () => { userId: "user-1", name: "Remote Deck", description: null, - newCardsPerDay: 20, createdAt: now, updatedAt: now, deletedAt: null, @@ -440,7 +436,6 @@ describe("mergeAndConvert", () => { userId: "user-1", name: "Original", description: null, - newCardsPerDay: 20, createdAt: now, updatedAt: now, deletedAt: null, @@ -452,7 +447,7 @@ describe("mergeAndConvert", () => { // Create remote with different changes const remoteDoc = Automerge.change(Automerge.clone(localDoc), (d) => { - d.data.newCardsPerDay = 30; + d.data.description = "Remote Description"; }); const remoteBinary = saveDocument(remoteDoc); @@ -471,7 +466,7 @@ describe("mergeAndConvert", () => { expect(result.hasChanges).toBe(true); // Both changes should be merged expect(result.entity.name).toBe("Updated Local"); - expect(result.entity.newCardsPerDay).toBe(30); + expect(result.entity.description).toBe("Remote Description"); }); it("should detect no changes when documents are identical", () => { @@ -481,7 +476,6 @@ describe("mergeAndConvert", () => { userId: "user-1", name: "Same", description: null, - newCardsPerDay: 20, createdAt: now, updatedAt: now, deletedAt: null, -- cgit v1.3-1-g0d28