diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-12-07 19:32:36 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-12-07 19:32:36 +0900 |
| commit | 8ef0e4a54986f7e334136d195b7081f176de0282 (patch) | |
| tree | 956da5f24a4c36055939f183dc68f5a5a55e4aa9 /src/client/sync/index.ts | |
| parent | 864495bd4d7156ee433cbc12adda4bdebd43f6fe (diff) | |
| download | kioku-8ef0e4a54986f7e334136d195b7081f176de0282.tar.gz kioku-8ef0e4a54986f7e334136d195b7081f176de0282.tar.zst kioku-8ef0e4a54986f7e334136d195b7081f176de0282.zip | |
feat(client): add conflict resolution for offline sync
Implement ConflictResolver class with Last-Write-Wins (LWW) strategy:
- Detect conflicts from push results
- Support multiple strategies: server_wins, local_wins, newer_wins
- Resolve deck and card conflicts using server data from pull
- Default to server_wins (LWW) for consistent conflict handling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/client/sync/index.ts')
| -rw-r--r-- | src/client/sync/index.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/sync/index.ts b/src/client/sync/index.ts index 80d0cc1..2472871 100644 --- a/src/client/sync/index.ts +++ b/src/client/sync/index.ts @@ -30,3 +30,12 @@ export { type ServerReviewLog, type SyncPullResult, } from "./pull"; + +export { + ConflictResolver, + conflictResolver, + createConflictResolver, + type ConflictResolutionItem, + type ConflictResolutionResult, + type ConflictResolverOptions, +} from "./conflict"; |
