diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-12-31 14:19:22 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-12-31 14:19:22 +0900 |
| commit | b074a4901c630ee5c5f7dcff79fa6ff911a14ded (patch) | |
| tree | a52b738974393e31678c85e37756004d1b547823 /src/client/components | |
| parent | 29caaa7aaf14a41dad3d345cd29b319fff6e1305 (diff) | |
| download | kioku-b074a4901c630ee5c5f7dcff79fa6ff911a14ded.tar.gz kioku-b074a4901c630ee5c5f7dcff79fa6ff911a14ded.tar.zst kioku-b074a4901c630ee5c5f7dcff79fa6ff911a14ded.zip | |
feat(schema): make note_id and is_reversed NOT NULL
All cards now require note association - legacy card support removed.
This aligns with the note-based card architecture introduced in Phase 8.
- Add database migration for NOT NULL constraints
- Update client Dexie schema to version 3
- Remove LegacyCardItem component and legacy card handling
- Update sync schemas and type definitions
- Update all tests to use note-based cards
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/client/components')
| -rw-r--r-- | src/client/components/DeleteNoteModal.test.tsx | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/client/components/DeleteNoteModal.test.tsx b/src/client/components/DeleteNoteModal.test.tsx index 85aaa14..a17323a 100644 --- a/src/client/components/DeleteNoteModal.test.tsx +++ b/src/client/components/DeleteNoteModal.test.tsx @@ -175,7 +175,7 @@ describe("DeleteNoteModal", () => { const user = userEvent.setup(); // Create a promise that we can control - let resolveDelete: (value: unknown) => void; + let resolveDelete: ((value: unknown) => void) | undefined; const deletePromise = new Promise((resolve) => { resolveDelete = resolve; }); @@ -190,19 +190,17 @@ describe("DeleteNoteModal", () => { expect(screen.getByText("Deleting...")).toBeDefined(); // Resolve the delete request to cleanup - if (resolveDelete) { - resolveDelete({ - ok: true, - json: async () => ({ success: true }), - }); - } + resolveDelete?.({ + ok: true, + json: async () => ({ success: true }), + }); }); it("disables buttons while deleting", async () => { const user = userEvent.setup(); // Create a promise that we can control - let resolveDelete: (value: unknown) => void; + let resolveDelete: ((value: unknown) => void) | undefined; const deletePromise = new Promise((resolve) => { resolveDelete = resolve; }); @@ -224,11 +222,9 @@ describe("DeleteNoteModal", () => { ); // Resolve the delete request to cleanup - if (resolveDelete) { - resolveDelete({ - ok: true, - json: async () => ({ success: true }), - }); - } + resolveDelete?.({ + ok: true, + json: async () => ({ success: true }), + }); }); }); |
