diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-12-31 02:15:17 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-12-31 02:15:17 +0900 |
| commit | ed93dd099f43dd6746276a72953485de91b49c8c (patch) | |
| tree | db737032e32508b7de24d94696a13e4bfebe8978 /src/client/stores/sync.test.tsx | |
| parent | 78609e0b390e9a485c8935c17db6e0093660ebef (diff) | |
| download | kioku-ed93dd099f43dd6746276a72953485de91b49c8c.tar.gz kioku-ed93dd099f43dd6746276a72953485de91b49c8c.tar.zst kioku-ed93dd099f43dd6746276a72953485de91b49c8c.zip | |
feat(sync): add sync support for note-related entities
Extend the sync system to handle NoteType, NoteFieldType, Note, and
NoteFieldValue entities. This includes:
- Server sync repository and routes for push/pull of new entities
- Client sync queue, push, pull, and conflict resolution for notes
- Update Card sync to include noteId and isReversed fields
- Add comprehensive tests for all sync functionality
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/client/stores/sync.test.tsx')
| -rw-r--r-- | src/client/stores/sync.test.tsx | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/client/stores/sync.test.tsx b/src/client/stores/sync.test.tsx index 9c4e5c2..fee79d7 100644 --- a/src/client/stores/sync.test.tsx +++ b/src/client/stores/sync.test.tsx @@ -38,7 +38,18 @@ describe("useSync", () => { decks: [], cards: [], reviewLogs: [], - conflicts: { decks: [], cards: [] }, + noteTypes: [], + noteFieldTypes: [], + notes: [], + noteFieldValues: [], + conflicts: { + decks: [], + cards: [], + noteTypes: [], + noteFieldTypes: [], + notes: [], + noteFieldValues: [], + }, currentSyncVersion: 0, }), }); @@ -138,7 +149,18 @@ describe("useSync", () => { decks: [], cards: [], reviewLogs: [], - conflicts: { decks: [], cards: [] }, + noteTypes: [], + noteFieldTypes: [], + notes: [], + noteFieldValues: [], + conflicts: { + decks: [], + cards: [], + noteTypes: [], + noteFieldTypes: [], + notes: [], + noteFieldValues: [], + }, currentSyncVersion: 1, }), }); |
