aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/client
AgeCommit message (Collapse)Author
2025-12-31test(crdt): add integration tests for concurrent edit scenariosnsfisis
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>
2025-12-31feat(crdt): integrate CRDT sync flow into sync managernsfisis
- 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>
2025-12-31feat(crdt): replace LWW conflict resolution with Automerge mergensfisis
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>
2025-12-31feat(crdt): handle crdtChanges in sync pull responsensfisis
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>
2025-12-31feat(crdt): add crdtChanges to sync push payloadnsfisis
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>
2025-12-31feat(crdt): add CRDT repository layer and sync state managementnsfisis
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)
2025-12-31feat(crdt): add Automerge document lifecycle managementnsfisis
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>
2025-12-31feat(crdt): add Automerge document type definitionsnsfisis
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>
2025-12-31feat(card): cascade card deletion to note and sibling cardsnsfisis
When a card is deleted, now also soft-deletes its parent Note and all sibling cards (other cards generated from the same note). This matches the specified behavior in the roadmap where deleting any card from a note-based group should remove the entire note and all its cards. Also adds tests for deletion constraint behaviors: - NoteType deletion blocked when Notes exist - NoteFieldType deletion blocked when NoteFieldValues exist - Note deletion cascades to all related Cards - Card deletion cascades to Note and sibling Cards 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(schema): make note_id and is_reversed NOT NULLnsfisis
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>
2025-12-31feat(client): group cards by note in DeckDetailPagensfisis
Display note-based cards as grouped items showing all cards generated from the same note, with note-level edit/delete actions. Legacy cards without note association are shown separately with a "Legacy" badge. - Add NoteGroupCard component for displaying note groups with card stats - Add LegacyCardItem component for backward-compatible card display - Add DeleteNoteModal for deleting notes and their cards - Show Normal/Reversed badges for cards within note groups 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(client): add EditNoteModal for editing note-based cardsnsfisis
- Create EditNoteModal component that loads note and field values - Update DeckDetailPage to use EditNoteModal for cards with noteId - Keep EditCardModal for legacy cards without note association - Add visual indicator for reversed cards in card list - Add comprehensive tests for EditNoteModal 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(study): render note-based cards using template systemnsfisis
Update StudyPage to support both legacy cards (direct front/back) and note-based cards (template rendering with field values). Add new CardForStudy type that includes note type templates and field values as a name-value map for efficient client-side rendering. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(client): add template renderer utility for note-based cardsnsfisis
Add mustache-like template renderer to support rendering cards from note field values. This is a foundational utility for Phase 8 of the note feature implementation. Includes renderTemplate, extractFieldNames, validateTemplate, and renderCard functions with comprehensive test coverage. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(client): add CreateNoteModal for note-based card creationnsfisis
Replace CreateCardModal with CreateNoteModal in DeckDetailPage. The new modal allows users to select a note type and dynamically enter field values based on the selected type's fields. Cards are auto-generated from the note with preview of how many cards will be created. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(client): add NoteTypeEditor component with field managementnsfisis
Add a comprehensive editor for note types that allows users to: - Edit note type name and templates - Add, remove, and reorder fields - Toggle the reversible card option The editor fetches note type details including fields from the API, enabling full CRUD operations for note type configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(client): add NoteTypesPage for note type managementnsfisis
Implement Phase 6 of the roadmap - NoteType list page with CRUD modals: - NoteTypesPage displays all user's note types with templates and reversible badge - CreateNoteTypeModal for creating new note types with templates - EditNoteTypeModal for updating existing note types - DeleteNoteTypeModal with constraint warning - Navigation link from HomePage header - Comprehensive tests for all components (65 new tests) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31test(sync): add client-side sync tests for note-related entitiesnsfisis
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>
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 IndexedDB repositories for note-related entitiesnsfisis
Implement client-side repositories for NoteType, NoteFieldType, Note, and NoteFieldValue with full CRUD operations and sync support. Includes cascade soft-delete for notes (deletes related cards) and comprehensive tests for all new repositories. 🤖 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-11fix(test): update PWA icon tests to match reworked iconnsfisis
The icon was changed in c305977 but tests weren't updated. Updated assertions to verify new gradient fills and 100x100 viewBox. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08refactor(client): replace inline SVGs with Font Awesome iconsnsfisis
Migrate all 28 inline SVG icons across 8 components to use Font Awesome React components for better maintainability and consistency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08style(client): replace Google Fonts with Noto Sans CJK JPnsfisis
Remove external Google Fonts dependency (DM Sans, Fraunces) and use locally-installed Noto Sans CJK JP for better Japanese text support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08feat(client): redesign frontend with TailwindCSS v4nsfisis
Replace inline styles with TailwindCSS, implementing a cohesive Japanese-inspired design system with custom colors (cream, teal primary), typography (Fraunces, DM Sans), and animations. Update all pages and components with consistent styling, improve accessibility by adding aria-hidden to decorative SVGs, and configure Biome for Tailwind CSS syntax support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07fix(client): add explicit role attribute to OfflineBannernsfisis
The accessibility test expected an explicit role="status" attribute. While the <output> element has an implicit status role, the test checks for the explicit attribute using getAttribute(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07chore: fix all lint errors and warningsnsfisis
- Remove unused imports in repositories.ts and sync.test.ts - Replace non-null assertions with type casts in HomePage.test.tsx - Use semantic <output> element instead of div with role="status" - Use semantic <button> element instead of div with role="button" - Remove useless React fragment in StudyPage.tsx - Fix useCallback dependencies for handleFlip and handleRating 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add offline mode banner indicatornsfisis
Displays a prominent banner at the top of all pages when the user is offline, informing them that changes will sync when reconnected. Shows pending change count when applicable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add manual sync buttonnsfisis
Add SyncButton component that allows users to manually trigger data synchronization. The button is disabled when offline or when sync is already in progress. 🤖 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>
2025-12-07feat(server): add POST /api/sync/push endpointnsfisis
Implement sync push endpoint with Last-Write-Wins conflict resolution. Includes Zod validation for decks, cards, and review logs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add local CRUD repositories for IndexedDBnsfisis
Add localDeckRepository, localCardRepository, and localReviewLogRepository with full CRUD operations for offline support. Includes sync tracking with _synced flag and methods for finding unsynced items. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add Dexie.js setup for IndexedDB local storagensfisis
Set up Dexie database with LocalDeck, LocalCard, and LocalReviewLog tables for offline support. Each entity includes _synced flag for tracking synchronization status. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07test(pwa): add tests for PWA configurationnsfisis
Verify vite-plugin-pwa manifest settings, workbox caching patterns, offline fallback page, and icon configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add study session page with card flip and rating UInsfisis
Implements the complete study flow frontend: - Study session page with card display and flip interaction - Rating buttons (Again, Hard, Good, Easy) with keyboard shortcuts - Progress display showing remaining cards count - Session complete screen with review summary - Study Now button on deck detail page 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add delete card modal with confirmationnsfisis
Completes Phase 5 card management by adding the ability to delete cards with a confirmation dialog. Includes unit tests for the modal component and integration tests for the delete flow in DeckDetailPage. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add edit card modal with form validationnsfisis
Add EditCardModal component allowing users to edit existing cards. Includes Edit button on each card in the deck detail page and comprehensive unit tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add create card modal with form validationnsfisis
Add CreateCardModal component to allow users to create new flashcards with front and back text fields. Integrate the modal into DeckDetailPage with an "Add Card" button. Include comprehensive unit tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add card list view in deck detail pagensfisis
Add DeckDetailPage component that displays all cards in a deck with their front/back content, state, review count, and lapses. Deck names on HomePage are now clickable links to navigate to the deck detail view. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07test(client): add deck management integration testsnsfisis
Add Edit Deck and Delete Deck integration tests to HomePage.test.tsx, verifying modal interactions and list refresh behavior after CRUD operations. Completes Phase 4 frontend testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add delete deck modal with confirmationnsfisis
Add DeleteDeckModal component that prompts users for confirmation before deleting a deck. Includes warning about permanent deletion and all associated 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 edit deck modal with form validationnsfisis
Add EditDeckModal component that allows users to edit existing decks. The modal pre-populates with current deck values and supports updating name and description fields with proper validation and error 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 create deck modal with form validationnsfisis
Add CreateDeckModal component that allows users to create new decks with name and optional description fields. Integrates with HomePage via a "Create Deck" button that opens the modal, and refreshes the deck list after successful creation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): add deck list page with empty state and list viewnsfisis
Implement HomePage to display user's decks fetched from the API. Includes loading state, error handling with retry, and empty state messaging. Also adds comprehensive tests for the deck list page. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07feat(client): remove registration pagensfisis