| Age | Commit message (Collapse) | Author |
|
Add comprehensive test suite covering multi-device concurrent editing:
- Two devices editing different fields (no conflicts)
- Two devices editing same field (deterministic resolution)
- Concurrent edit and delete scenarios
- Card FSRS field concurrent updates
- Incremental sync simulation
- Three-way merge scenarios
- Serialization roundtrip with concurrent edits
- Edge cases (null handling, rapid edits)
- Offline queue simulation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
- Store CRDT document binaries after successful push operations
- Update CRDT sync metadata (lastSyncAt, syncVersionWatermark) after sync
- Add getCrdtSyncStats(), clearCrdtState(), hasCrdtDocument() methods
- Add crdt_documents_stored event and crdtDocumentsStored to SyncResult
- Include all entity types in conflict resolution count
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
The ConflictResolver now defaults to CRDT strategy which uses Automerge
to merge local and server documents during sync conflicts. This provides
conflict-free resolution that preserves changes from both sides.
Key changes:
- Add CRDT merge methods for all entity types (deck, card, note, etc.)
- Update resolve methods to accept optional CRDT binary data
- Fall back to server_wins when CRDT data is unavailable or invalid
- Add comprehensive tests for CRDT conflict resolution scenarios
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add applyCrdtChanges function to process CRDT payloads received from
the server during pull operations. The function merges remote documents
with local ones using Automerge and stores the result in sync state.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add CRDT document generation to the sync push flow. Each pending entity
is now converted to an Automerge CRDT document and included as base64-
encoded binary in the push payload alongside the existing entity data.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add Phase 2 of the CRDT implementation:
- CRDT-aware repository wrappers for all entity types (Deck, Card, Note, etc.)
- Sync state management with IndexedDB storage for CRDT document binaries
- Base64 serialization utilities for network transport
- Comprehensive test coverage (53 new tests)
|
|
Implement document-manager.ts with core CRDT operations:
- Document creation, update, merge, save/load functions
- Conversion functions between local entities and CRDT documents
- Actor ID management for client identification
- Conflict detection utilities
Completes Phase 1 of CRDT implementation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add CRDT document types for all entities (Deck, NoteType, NoteFieldType,
Note, NoteFieldValue, Card, ReviewLog) with LWW Register pattern.
Includes utility functions for document ID creation/parsing and metadata
management. Part of Phase 1 for CRDT-based sync implementation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
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>
|
|
Add comprehensive tests for syncing NoteType, NoteFieldType, Note, and
NoteFieldValue entities in push.test.ts and pull.test.ts. Tests cover:
- Data format conversion between local and server representations
- Applying pulled entities to local IndexedDB
- Pushing pending changes to server
- Updating existing entities during sync
- Syncing all note-related entities together
Also removes unused variable in sync repository.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|