aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/client/sync
AgeCommit message (Collapse)Author
2025-12-31feat(sync): add sync support for note-related entitiesnsfisis
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>
2025-12-31feat(client): add note-related tables to client IndexedDBnsfisis
Add LocalNoteType, LocalNoteFieldType, LocalNote, and LocalNoteFieldValue interfaces and tables to the client database for Anki-compatible note system. Update LocalCard interface with noteId and isReversed fields. Includes Dexie schema version 2 with upgrade handler for existing cards. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add sync status indicator componentnsfisis
Add SyncStatusIndicator component to display current sync state in the UI header. The component shows online/offline status, syncing progress, pending changes count, and sync errors. - Create SyncProvider context to wrap SyncManager for React components - Add SyncStatusIndicator component with visual status indicators - Integrate indicator into HomePage header - Add comprehensive tests for SyncStatusIndicator and SyncProvider - Update existing tests to include SyncProvider wrapper 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add SyncManager for auto-sync on reconnectnsfisis
Implements SyncManager class that orchestrates the sync process: - Monitors online/offline network status - Triggers debounced sync when coming back online - Coordinates push, pull, and conflict resolution - Provides event subscription for sync status updates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add conflict resolution for offline syncnsfisis
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>
2025-12-07feat(client): add pull service for sync implementationnsfisis
Implement PullService class to pull changes from server: - Fetch changes since last sync version - Convert server data format to local IndexedDB format - Apply pulled decks, cards, and review logs to local database - Update sync version after successful pull 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add push service for sync implementationnsfisis
Implement PushService class to push local changes to server: - Convert local decks, cards, and review logs to API format - Push pending changes to server endpoint - Mark items as synced after successful push - Return conflicts reported by server (LWW resolution) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add sync queue management for offline syncnsfisis
Implement SyncQueue class to manage pending changes for offline sync: - Track unsynced decks, cards, and review logs from IndexedDB - Manage sync status (idle, syncing, error) with listener support - Persist last sync version and timestamp to localStorage - Provide methods to mark items as synced after push - Apply pulled changes from server to local database 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>