All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Presence via Yjs Awareness - Real-time presence tracking using the standard Yjs Awareness protocol
- Session tracking - Per-document session management with
sessionsquery (includes cursor data) - Unified
presencemutation - Join/leave presence with action discriminator ({ action: "join" | "leave" }) - Heartbeat cleanup - Automatic removal of stale presence data
pagehidehandler - Reliable cleanup on tab close/navigation- Single-flight pattern - Race-safe presence updates using convex-helpers pattern
- Migration V2 architecture - Consolidated module-level state into
CollectionContext - Per-document recovery - Refactored SSR and recovery to per-document architecture
- Normalized schema - Aligned naming conventions and Effect.ts service patterns
- Optimized SvelteKit example - Added TanStack Table with virtual scrolling
- Separated sync from presence -
markmutation now only handles sync tracking (vector, seq); presence uses dedicatedpresencemutation
cursorsquery - Cursor data now included insessionsqueryleavemutation - Replaced bypresence({ action: "leave" })
- Avatar/presence bug - Fixed
markmutation incorrectly settingconnected: truefor all synced documents, which caused wrong avatars to appear on refresh - Persistence race condition - Documents no longer show as "Untitled" during init
- Stream response types - Aligned
replicate.tstypes with component - Presence race conditions - Rewrote awareness.ts with atomic state machine (
idle → joining → active → leaving → destroyed) to handle visibility changes, destroy during throttle, and overlapping heartbeats
- Cursor-based sync protocol - Replaced
_creationTimewith monotonically increasing sequence numbers (seq) to ensure no updates are missed during sync - Peer tracking for safe compaction - Server tracks sync progress per peer via
markmutation, enabling compaction that won't cause data loss for slow/offline clients - React Native support - Native SQLite persistence via
op-sqlitenow fully works after removing Level dependencies - New Expo example - Complete React Native example app with interval tracking (
apps/expo/) markmutation - Clients report sync progress to server for peer-aware compactioncompactmutation - Manual compaction trigger with peer-aware safety (only deletes deltas all active peers have synced)- Recovery cursor service - Cursor-based subscription recovery for startup reconciliation
- SSR material prefetch -
materialquery for server-side rendering hydration - Type-safe compaction config -
sizeThreshold("5mb") andpeerTimeout("24h") with human-readable strings
- Refactored
collection.create()API - Lazy-initialized, SSR-safe collection creation with deferred persistence and config resolution - SQLite-only persistence - Simplified to direct SQLite storage (removed y-leveldb, abstract-level, browser-level dependencies)
- Renamed
acktomark- Clearer naming for peer sync progress tracking - Synchronous Yjs operations - Local-first behavior with immediate Y.Doc updates
- Level dependencies - Removed
y-leveldb,abstract-level,browser-level(React Native blockers) - Checkpoint service - Replaced by cursor service for seq-based sync
- Reconciliation service - Simplified with cursor-based approach
- IndexedDB persistence - Deprecated in favor of SQLite (sql.js for browser, op-sqlite for React Native)
- Subscription recovery - Use recovery cursor to prevent redundant reconciliation
- Missing sync events - Cursor-based protocol ensures no updates are missed (fixes
_creationTimeordering issue)
- Handle null storedDoc in SqlitePersistenceProvider -
getYDoc()can return null for new/empty collections
- Refactored API to nested object pattern - Cleaner noun-verb API design:
persistence.indexeddb(),persistence.sqlite.browser(),persistence.sqlite.native(),persistence.memory()schema.table(),schema.prose()(server-side)prose.extract()(client-side text extraction)errors.*namespace for all error classesadapters.sqljs,adapters.opsqlitefor SQLite adapters
- SQLite persistence adapters - Explicit platform choice for browser and React Native:
- Browser:
persistence.sqlite.browser(SQL, name)- sql.js (WASM, ~500KB) with OPFS persistence - React Native:
persistence.sqlite.native(db, name)- op-sqlite (native SQLite) - Implements abstract-level interface with y-leveldb for Yjs persistence
- Browser:
- Swappable persistence layer with multiple providers:
persistence.indexeddb()- Browser using y-indexeddb and browser-levelpersistence.sqlite.browser()- Browser SQLite via sql.jspersistence.sqlite.native()- React Native SQLite via op-sqlitepersistence.memory()- In-memory for testing
NonRetriableErrorclass for errors that should not be retried (auth failures, validation)- Database name validation in SQLite persistence to prevent path traversal attacks
- Type declarations for y-leveldb module (fixes broken package.json exports)
- Simplified prose sync architecture using TanStack DB's native
sync.sync()callback - SQLite persistence now uses synchronous API (consistent with other providers)
- Improved type safety in SQLite persistence (removed
anytypes) - Properly await async database operations in SQLite persistence
@tanstack/offline-transactionsdependency (provided no value over native TanStack DB sync)getOrInitializeCollectionhelper (replaced by native TanStack DB patterns)- Lazy loading of React Native dependencies (direct imports for better type safety)
First stable release of Convex Replicate.
- Effect.js service architecture for dependency injection and composable services
- Comprehensive test suite with 180+ tests (unit, integration, benchmarks)
- JSDoc documentation for all exported functions
- Undo/redo and client-side history utilities
- Version history and maintenance features
- Improved type safety across client code with proper TypeScript interfaces
- Checkpoint service for managing sync checkpoints in IndexedDB
- Protocol version negotiation for handling package updates
- Snapshot recovery service for handling compaction scenarios
- Reconciliation service for phantom document cleanup
- Refactored terminology: "sync" renamed to "replicate" throughout codebase
- Simplified architecture with cleaner Effect-based service layer
- Improved type definitions (removed
anytypes in favor of proper generics) - Streamlined Yjs update application (removed unnecessary transaction wrapper)
- SvelteKit example (TanStack Start example remains as reference)
- Dead code and unused imports
- Outdated monorepo-style release configuration