Skip to content

Conversation

@sanchxt
Copy link
Owner

@sanchxt sanchxt commented Jan 19, 2026

Summary

Implements live bidirectional directory synchronization with automatic conflict resolution, enabling real-time file synchronization between devices on the same network.

Features

  • Core Infrastructure: Foundation for directory synchronization with file indexing, hashing, and diff computation
  • File System Watcher: Cross-platform file watching with debouncing, pattern filtering, and size limits
  • Session Management: TLS-secured sync sessions with conflict resolution strategies and reconciliation
  • Live Sync: Real-time bidirectional synchronization with keepalive, automatic reconnection, and event callbacks
  • Conflict Resolution: Smart conflict handling with rename-based resolution and manual override options
  • CLI Integration: Complete yoop sync command with comprehensive options and progress reporting

Implementation Details

Architecture

  • Event-driven architecture using tokio for async operations
  • File chunking with configurable chunk sizes and parallel transfers
  • Index-based change detection for efficient synchronization
  • Pattern-based exclusion using glob patterns

Security

  • TLS 1.3 encryption for all sync traffic
  • Certificate-based peer authentication
  • Secure session establishment with verification codes

Performance

  • Debounced file system events to reduce redundant operations
  • Incremental synchronization based on content hashes
  • Configurable file size limits and exclusion patterns

Add foundational sync module with file indexing, protocol extensions,
and content-based change detection using xxHash64.

- Add sync module with core types and file index system
- Add 10 new protocol message types (0x70-0x7F) for sync operations
- Add notify and globset dependencies
- Add 35 comprehensive tests
…ring

Implements cross-platform file watching using notify crate with:
- Event debouncing to coalesce rapid file changes
- Glob-based exclusion patterns for filtering
- File size limits to prevent syncing oversized files
- Async integration with tokio
- Platform-specific quirk handling for Linux/macOS/Windows
…ciliation

Implements bidirectional sync sessions with TLS 1.3 connections, file index exchange, and reconciliation logic. Includes conflict detection with four resolution strategies (LastWriteWins, KeepBoth, PreferLocal, PreferRemote) and operation ordering for safe execution. Integrates with existing discovery and transfer infrastructure for chunked file operations.
Adds continuous sync capability with concurrent task architecture:
- File watcher monitors local directory changes with debouncing
- Outbound processor sends sync operations to peer
- Inbound processor receives and applies remote operations
- Keep-alive task maintains connection health

Implements graceful shutdown handling and event callback system
for UI updates. Supports JSON output mode and all sync options
including exclusion patterns, size limits, and deletion sync.
- Add directory sync feature to README core features list
- Add comprehensive directory sync section with usage examples
- Document sync command options (exclude, ignore-file, max-size, etc.)
- Update npm README with sync command documentation
- Fix dead_code warnings in session.rs with allow annotations
- Remove unused imports and variables in test files
- Add underscores to numeric literals for readability
- Use map_or/map_or_else instead of if let/else patterns
- Replace redundant clones with direct ownership
- Use div_ceil() instead of manual division ceiling
- Inline format arguments where appropriate
- Add necessary allow attributes for intentional casts
- Rename _watcher field to watcher (field is used)
- Use struct initialization instead of field reassignment
- Apply let-else pattern where appropriate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants