Skip to content

v0.2.0

Choose a tag to compare

@pillowsoft pillowsoft released this 01 Sep 11:06
· 20 commits to main since this release

πŸš€ Major Features - React/JS SDK Feature Parity

New Transaction System (tx namespace)

  • βœ… Added fluent tx namespace API for cleaner transactions (db.tx['entity'][id].update({}))
  • βœ… Implemented transactChunk() method for transaction chunks
  • βœ… Added merge() operation for deep nested object updates
  • βœ… Added link() and unlink() operations for entity relationships
  • βœ… Implemented lookup() references to reference entities by attributes instead of IDs

Advanced Query Operators

  • βœ… Added comparison operators: $gt, $gte, $lt, $lte, $ne
  • βœ… Added string pattern matching: $like, $ilike with wildcard support
  • βœ… Added array operations: $contains, $size, $in, $nin
  • βœ… Added existence operators: $exists, $isNull
  • βœ… Enhanced logical operators: improved $and, $or, $not support

Room-based Presence System

  • βœ… Added joinRoom() API returning scoped InstantRoom instances
  • βœ… Implemented room-specific presence operations (scoped to individual rooms)
  • βœ… Added topic-based pub/sub messaging with publishTopic() and subscribeTopic()
  • βœ… Complete room isolation - presence data separated between rooms
  • βœ… Backward compatible with existing direct room ID APIs

API Improvements

  • βœ… Added subscribeQuery() alias for reactive queries (matches React SDK)
  • βœ… Implemented queryOnce() for one-time query execution
  • βœ… Added getAuth() and subscribeAuth() convenience methods
  • βœ… Improved error handling and validation

πŸ§ͺ Testing & Quality

  • βœ… 150 total tests passing (up from 118 tests)
  • βœ… Added comprehensive test suite for all new features
  • βœ… Performance testing for large datasets and query caching
  • βœ… Room-based presence system testing with isolation validation

πŸ› Bug Fixes & Performance Improvements

  • βœ… Fixed transaction conversion for real-time sync - transactions now properly convert to tx-steps with actual data instead of sending 0 steps
  • βœ… Fixed duplicate entity issue during sync - implemented deduplication logic to prevent locally-created entities from being re-applied during refresh-ok
  • βœ… Fixed entity type resolution during sync - entities from server now properly stored with correct type (e.g., todos:id instead of unknown:id)
  • βœ… Fixed delete synchronization between instances - implemented differential sync to detect and apply deletions when entities are missing from server responses, including handling empty entity lists
  • βœ… Fixed presence reactions not appearing in peer instances - implemented proper refresh-presence message handling to convert reaction data to visible UI reactions
  • βœ… Fixed cursors, typing indicators, and avatars not working in peer instances - implemented complete presence data detection and routing in refresh-presence messages to handle all presence types
  • βœ… Fixed avatars page showing only 1 user instead of both users - preserved local user's presence when processing refresh-presence messages to match React SDK behavior
  • βœ… Fixed avatar presence data extraction and room ID consistency - corrected nested data structure extraction from refresh-presence messages and unified room key format usage
  • βœ… Fixed typing indicators showing 'Someone' instead of actual user names - updated typing page to set initial presence with userName and display actual user names in typing indicators
  • βœ… Added comprehensive hierarchical logging system - using logging package for better debugging and monitoring of sync operations
  • βœ… Enhanced sync engine with proper attribute UUID mapping - transactions now use correct InstantDB attribute UUIDs instead of attribute names

πŸ“– Documentation

  • βœ… Updated README with all new APIs and examples
  • βœ… Created ADVANCED_FEATURES.md comprehensive feature guide
  • βœ… Added MIGRATION_GUIDE.md for upgrading existing code
  • βœ… Updated example applications showcasing new room-based presence APIs

πŸ“± Example Applications Updated

  • βœ… Cursors demo updated to use room-based presence API
  • βœ… Reactions demo updated with room-scoped reactions
  • βœ… Typing indicators demo updated with room-scoped typing
  • βœ… Avatars demo updated with room-scoped presence
  • βœ… Todos demo updated to showcase new tx namespace API

πŸ”§ Breaking Changes

None! This release is fully backward compatible. All existing APIs continue to work.

🎯 Migration Path

  • Immediate: New projects can use new APIs from day one
  • Gradual: Existing projects can migrate incrementally at their own pace
  • Optional: Migration provides better performance and developer experience but is not required