aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2026-01-03feat: bump version to 0.4.0v0.4.0nsfisis
2026-01-03feat(study): shuffle cards when starting study sessionnsfisis
Cards are now randomized using Fisher-Yates algorithm to improve learning by preventing users from memorizing card order. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03feat(import): display expected CSV format dynamically per note typensfisis
Show actual note types and their fields in the expected format section instead of a hardcoded example. Fields are sorted by order. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02feat(import): simplify CSV format by removing deck columnnsfisis
Since import is initiated from deck context, the deck is already known via props. Simplifies CSV format to: note_type,Field1,Field2,... BREAKING CHANGE: CSV format changed from deck,note_type,... to note_type,... 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01refactor(client): migrate API calls to typed RPC clientnsfisis
Replace raw fetch() calls with apiClient.rpc typed client across all modal and page components. This provides better type safety and eliminates manual auth header handling. - Make handleResponse public for component usage - Update all component tests to mock RPC methods instead of fetch - Change POSTGRES_HOST default to kioku-db for Docker compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01docs: add CSV import documentationnsfisis
Document the CSV import feature including format specification, examples, and troubleshooting guide. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01feat: bump version to 0.3.0v0.3.0nsfisis
2026-01-01feat(import): add CSV bulk import for notesnsfisis
Add client-side CSV parsing and bulk import API endpoint for importing notes from CSV files. Supports quoted fields, newlines in values, and escaped quotes. - New POST /api/decks/{deckId}/notes/import endpoint for bulk creation - CSV parser with RFC 4180 compliance - Multi-phase import modal (upload → validate → preview → import) - Client-side validation with per-row error reporting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01fix(ui): allow line-breaks in card templatesnsfisis
Change template input fields from single-line <input> to <textarea> elements to support multiline content in front/back templates. Fixes #5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01fix(auth): redirect to login when session expiresnsfisis
When the refresh token fails (session expired), the ApiClient now notifies the AuthProvider via a callback. This triggers a logout and React state update, causing ProtectedRoute to redirect to /login. Closes #7 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01fix(auth): add automatic token refresh on 401 responsesnsfisis
The client session was too short because access tokens (15 min) weren't being automatically refreshed using the refresh token (7 days). Now the ApiClient intercepts 401 responses, attempts token refresh, and retries the original request. This extends effective session duration to 7 days. Closes #6 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31chore: update READMEnsfisis
2025-12-31feat(db): add ORDER BY to repository SELECT queriesnsfisis
Ensures deterministic ordering for all multi-row SELECT queries: - deck/note/noteType findByUserId/findByDeckId: order by createdAt - card findByNoteId: order by isReversed (normal card first) - note field values: order by noteFieldTypeId - sync pull queries: order by id This guarantees consistent UI display and sync results regardless of PostgreSQL's internal row ordering. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31chore(docs): update roadmapnsfisis
2025-12-31refactor(client): remove duplicate create buttons from empty statesnsfisis
The empty state sections already have create buttons in the page header, making these inline buttons redundant. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31refactor(client): use Hono InferResponseType for API response typesnsfisis
Replace manually defined AuthResponse and User types with Hono's InferResponseType to automatically derive types from server definitions. This ensures client types stay in sync with server responses. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31fix(client): parse nested error object in API responsesnsfisis
Server returns `{ error: { message, code } }` but client expected `{ error: string, code }`, causing "[object Object]" to display on login failure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31refactor(db): replace DATABASE_URL with individual POSTGRES_* env varsnsfisis
Eliminates duplicate configuration by building the connection URL from POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB, POSTGRES_HOST, and POSTGRES_PORT instead of requiring a separate DATABASE_URL. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat: update dependenciesv0.2.0nsfisis
2025-12-31refactor(sync): simplify ConflictResolutionResult to use string arraysnsfisis
Remove ConflictResolutionItem type since resolution field was always "server_wins" and provided no useful information. Resolution arrays now contain entity IDs directly instead of objects. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31refactor(sync): remove legacy conflict resolution strategiesnsfisis
Remove the unused "local_wins" strategy and ConflictResolverOptions interface from ConflictResolver. The CRDT-based conflict resolution now always uses Automerge merge with server_wins fallback when CRDT data is unavailable. This simplifies the codebase by removing configuration options that were never used in production. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31refactor(sync): remove legacy LWW conflict resolution strategynsfisis
Remove the deprecated "newer_wins" strategy from the conflict resolver as CRDT is now the default and validated approach. The system now uses only "crdt", "server_wins", and "local_wins" strategies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31fix(build): add WASM support for Automerge in Vitensfisis
Automerge uses WebAssembly which requires vite-plugin-wasm and vite-plugin-top-level-await to handle WASM modules in production builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31docs(roadmap): mark server data migration as completensfisis
No server-side data migration script needed since there is no existing production data. The CRDT schema is already in place from Phase 4. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(crdt): add client-side CRDT migration scriptnsfisis
Add one-time migration script to convert existing local IndexedDB entities to Automerge CRDT documents. Includes: - Migration with idempotency check (runs only once) - Batch processing option for large datasets - Progress callback for UI feedback - Unit tests for migration logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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): add server-side CRDT sync API handlingnsfisis
Add crdtChanges field to sync push/pull endpoints for CRDT document synchronization. The server now stores and retrieves CRDT binaries from the crdt_documents table, enabling conflict-free sync between clients. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(crdt): add database migration for crdt_documents tablensfisis
Add Drizzle migration to create the crdt_documents table with: - UUID primary key with auto-generation - Foreign key to users table with cascade delete - Unique index on (user_id, entity_type, entity_id) - Indexes for entity_type and sync_version queries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(crdt): add server-side CRDT document storage schemansfisis
Add PostgreSQL schema for storing Automerge CRDT documents with indexes for efficient querying by user, entity type, and sync version. 🤖 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(crdt): add Automerge dependencies for CRDT syncnsfisis
Install @automerge/automerge, @automerge/automerge-repo, and @automerge/automerge-repo-storage-indexeddb as the foundation for replacing LWW conflict resolution with CRDT-based sync. Includes tests verifying core Automerge functionality: - Document creation and modification - Change generation and application - Concurrent change merging - Serialization/deserialization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31feat(docs): update manual and roadmapnsfisis
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-31docs: update architecture.md with Note-based data modelnsfisis
Add documentation for the Anki-compatible Note system: - Note-Card architecture overview with entity relationships - NoteType, NoteFieldType, Note, NoteFieldValue data models - Updated Card model with note_id and is_reversed fields - API endpoints for note types and notes - Template rendering explanation Also mark completed tasks in roadmap.md. 🤖 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-31chore(docs): update roadmapnsfisis
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-31chore(docs): update roadmapnsfisis