Commit Graph

96 Commits

Author SHA1 Message Date
Jamie Pine
1c5a9d3558 Enhance content kind statistics and database structure
- Added a new `file_count` column to the `content_kinds` table to track the number of content identities for each kind, improving statistics calculation efficiency.
- Implemented a migration script to add the `file_count` column and ensure backward compatibility.
- Updated the `Library` struct to include a method for updating content kind counts based on existing content identities.
- Introduced a new query for retrieving content kind statistics, including file counts, to facilitate better data analysis and reporting.
- Refactored related components to support the new statistics functionality, enhancing overall data integrity and performance.
2025-12-20 05:30:01 -08:00
Jamie Pine
19c689af03 Enhance CI workflow and improve test execution
- Updated the CI workflow to run all tests for the `sd-core` package, ensuring comprehensive coverage.
- Modified test execution commands to include specific tests for better granularity and clarity.
- Improved device management by regenerating slugs upon name changes and updating global device slugs.
- Enhanced session key generation for improved security during device pairing.
- Updated progress monitoring tests to ensure robust performance tracking for large file operations.
2025-12-18 07:09:19 -08:00
Jamie Pine
eb9ba58b6a Refactor test configurations and remove deprecated examples
- Updated the CI workflow to run tests specifically for the  package for clarity.
- Deleted outdated example test files for event serialization, location watcher, and simple metrics to reduce clutter.
- Enhanced error handling in  for better robustness.
- Improved device data handling in  by adding additional fields for comprehensive device information.
- Adjusted test assertions in  to align with updated change detection logic.
2025-12-18 03:53:29 -08:00
Jamie Pine
b853e66def Update test configurations and CI workflow
- Adjusted the CI workflow to run tests with updated command syntax for improved clarity.
- Marked subproject commits in ios, landing, macos, and workbench as dirty to reflect uncommitted changes.
- Modified conflict resolution options in copy action tests to use `None` for better handling of file operations.
- Enhanced metadata handling in various tests to improve context and accuracy during execution.
2025-12-18 03:29:01 -08:00
Jamie Pine
c3d602af5a Refactor CI workflow and update test configurations
- Removed the setup step for native dependencies in the CI workflow to streamline the build process.
- Updated the `copy_action_test` to include conflict resolution options for better handling of file conflicts.
- Enhanced metadata handling in `entry_move_integrity_test` to include job policies.
- Added metadata to event handling in `file_structure_test` for improved context during file operations.
- Updated service configuration in `file_sync_simple_test` and `file_sync_test` to use `fs_watcher_enabled` and included default logging settings.
- Deleted the outdated README.md from the tests directory to reduce clutter and improve documentation focus.
2025-12-18 03:09:27 -08:00
Jamie Pine
5ec4a31abb Update CI workflow and enhance core features
- Changed the CI workflow to run tests on self-hosted runners for better performance and flexibility.
- Updated the test execution condition to trigger on push events and specific pull requests.
- Consolidated test execution to run all tests in the workspace instead of a single test.
- Modified the default features in Cargo.toml for the server and core applications to include "heif" and "ffmpeg" for enhanced media support.
- Added metrics collection capabilities to the SyncProtocolHandler for improved monitoring of sync operations.
- Refactored sync tests to streamline setup and improve clarity in test scenarios.
2025-12-18 03:02:54 -08:00
Jamie Pine
6ce96ede55 Implement atomic upsert for space entities and add sync setup tests
- Refactored the upsert logic for Space, SpaceItem, and SpaceGroup entities to utilize atomic operations, preventing race conditions during synchronization.
- Enhanced database interactions with `on_conflict` handling based on UUID for improved data integrity.
- Introduced a comprehensive sync setup test to validate the functionality and ensure no UNIQUE constraint errors occur during device pairing and library sharing.
2025-12-17 22:31:27 -08:00
Jamie Pine
589d311eff Update subproject commits to indicate dirty state and enhance logging in volume sync operations
- Marked subproject commits in ios, landing, macos, and workbench as dirty to reflect uncommitted changes.
- Added detailed logging in the volume listing and sync processes to improve traceability and debugging capabilities, including information on fetched volumes and device pairing statuses.
- Introduced a new test for bidirectional volume sync to ensure both devices correctly receive each other's volumes, enhancing test coverage for sync functionality.
2025-12-17 21:37:41 -08:00
Jamie Pine
5b1fd31e3a Implement app reset functionality and context management
- Introduced AppResetContext to manage app reset operations across components.
- Updated App and RootLayout to utilize the reset context, allowing for a clean reset of the app state.
- Enhanced SettingsScreen with a reset data option, prompting users for confirmation before clearing all data and refreshing the app.
- Added core reset action in the backend to handle data deletion and cleanup operations.
- Improved user feedback during reset operations with alerts and status messages.
2025-12-17 20:26:26 -08:00
Jamie Pine
4efcf7466b Refactor change detection and enhance event handling in persistent indexing
- Improved the `emit_change_event` method in `DatabaseAdapter` to handle resource events more effectively, including detailed logging for event emissions.
- Updated the `PersistentEventHandler` to ensure paths are registered with the filesystem watcher upon startup, enhancing real-time monitoring capabilities.
- Introduced new event collectors for better diagnostics and logging of filesystem and core events during tests.
- Enhanced integration tests to cover various scenarios, including batch file operations and delete/restore patterns, ensuring accurate event handling and preventing duplicates.
2025-12-09 18:00:44 -08:00
Jamie Pine
cf998edb03 Enhance event handling for resource deletion in ephemeral writer
- Updated the `delete` method in `MemoryAdapter` to emit a `ResourceDeleted` event, allowing the frontend to update its cache accordingly.
- Modified `CollectedCoreEvent` structure to include an `event_type` field for better event categorization.
- Enhanced event collection logic in `CoreEventCollector` to handle both `ResourceChanged` and `ResourceDeleted` events, improving event summary reporting.
2025-12-09 17:09:47 -08:00
Jamie Pine
b16a015746 Enhance EphemeralIndex entry removal and introduce event collectors
- Updated `remove_entry` and `remove_directory_tree` methods in `EphemeralIndex` to ensure proper removal of entries from parent nodes' children lists.
- Introduced `FsEventCollector` and `CoreEventCollector` for improved event collection from the filesystem watcher and core event bus, respectively.
- Enhanced test harness to utilize the new collectors, ensuring accurate event logging and summary reporting.
- Added scenarios to test delete and restore patterns, verifying correct entry counts and preventing duplicate entries.
2025-12-09 17:01:49 -08:00
Jamie Pine
1adabc7999 Add batch file and directory creation/deletion scenarios to ephemeral watcher tests
- Implemented methods for batch creation and deletion of files and directories in the test harness.
- Added scenarios to verify the creation and deletion of multiple files and directories, ensuring proper event handling.
- Enhanced logging for better visibility during test execution.
- Updated the macOS event handler to improve directory deduplication and manage recent directory creations effectively.
2025-12-09 16:20:17 -08:00
Jamie Pine
deadc713be Refactor FsWatcherService and event handlers for async support
- Updated `connect` methods in `EphemeralEventHandler` and `PersistentEventHandler` to be asynchronous, allowing for non-blocking connections to the `FsWatcherService`.
- Modified `init_handlers` in `FsWatcherService` to support async initialization of event handlers.
- Adjusted service startup methods to await handler initialization, ensuring proper setup before starting the watcher.
- Enhanced test harness to utilize the new async capabilities, improving event collection and verification processes.
2025-12-09 15:59:58 -08:00
Jamie Pine
337a284e96 Enhance file operation handling and add sound effects
- Introduced a new File Operation Modal for interactive file copy/move operations with conflict resolution options.
- Integrated sound effects for file operations, including copy and startup sounds.
- Updated the Explorer component to utilize the new modal for drag-and-drop file operations.
- Refactored job management hooks to unify job data handling and improve performance.
- Enhanced documentation for the File Operation Modal and sound effects integration.
2025-12-08 21:15:00 -08:00
Jamie Pine
cf400865f4 Introduce ephemeral index cache and status API
- Add a complete ephemeral indexing subsystem
  - core/src/ops/core/ephemeral_status with input/output and query types
  - core/src/ops/indexing/ephemeral with arena, cache, registry,
    index_cache, types
  - expose EphemeralIndexCache and EphemeralIndex through core modules
  - EphemeralIndexCache supports
    get/insert/create_for_indexing/mark_indexing_complete eviction and
    stats
- Implement EphemeralIndex data structures for memory-efficient storage
  - NodeArena, NameCache, NameRegistry, and related types
- Add EphemeralIndex status API
  - EphemeralCacheStatusInput and EphemeralCacheStatusQuery
  - EphemeralCacheStatus with per-index details
- Wire ephemeral indexing into the indexing flow
  - Change default Ephemeral Indexer behavior to shallow mode
  - Align code to EphemeralIndex usage across the codebase
- Enhance content kind detection in UI
  - Add getContentKind(file) helper (prefers content_identity.kind, then
    content_kind)
  - Use getContentKind in Explorer utilities and UI components
- Invalidate directory listings when location index_mode changes
  - Add useLocationChangeInvalidation to trigger refetches for ephemeral
    vs persistent indexing transitions
- Misc refactors and formatting to accommodate the new modules and APIs
2025-12-07 19:55:34 -08:00
Jamie Pine
8fc01634f6 parallel indexing rayon without rayon due to async requirement 2025-12-07 15:45:26 -08:00
Jamie Pine
a84ccadfa9 sync event log 2025-12-03 21:41:15 -08:00
Jamie Pine
52cd817bf0 refactor: remove unnecessary file system operations 2025-12-03 18:00:43 -08:00
Jamie Pine
cab3d4da18 cargo format 2025-12-03 15:56:27 -08:00
Jamie Pine
e5cb6baaba feat: update cloud credential management 2025-12-03 15:55:04 -08:00
Jamie Pine
9acf86a9ea Add location export/import and schema changes 2025-11-30 17:27:31 -08:00
Jamie Pine
c7eff9589d refactor: update main.rs and backfill.rs for improved error handling 2025-11-26 11:09:00 -08:00
Jamie Pine
35263791cf Revert to November 16 baseline for realtime sync
- Revert to the November 16 baseline for realtime sync - Use a single
state watermark and drop per-resource watermarks, counts, and hashes
from watermark messages - Revert DataAvailableNotification handling and
the updated FK filtering approach in favor of NULL-based handling - Add
registry helper get_model_type_by_table to map tables to models for FK
resolution - Update mocks and tests to reflect the baseline (linkage
stats in summary) - Fix test infrastructure: remove block_in_place usage
and minor imports - Remove obsolete test fixture file
2025-11-25 15:42:25 -08:00
Jamie Pine
69e825fe06 Revert sync to November 14th - Add new sync tests
1. Watermark Messages: - Nov 16: Simple - single my_state_watermark,
single state_watermark in response - Main: Complex - per-resource
my_resource_watermarks HashMap, resource counts, content hashes 2.
DataAvailableNotification: - Nov 16: Doesn't exist - Main: New message
type that triggers watermark exchanges 3. FK Mapper: - Nov 16: Sets
missing FKs to NULL, applies all records - Main: Marks records with
missing FKs as failed, filters them out 4. Watermark Storage (internal,
not in messages): - Nov 16: Single last_watermark per resource - Main:
Dual watermarks - cursor_watermark and
2025-11-24 14:27:32 -08:00
Jamie Pine
672d3d32ef Seed ancestor cache and remove ghost-folder test 2025-11-21 09:20:49 -08:00
Jamie Pine
08f2d551ff Fix ghost folder bug by scoping indexing to path
- Scope the closure query to the indexing path by resolving its entry_id
from directory_paths and use that for descendants; fall back to the
location root if not found. - Seed all ancestors between the location
root and the indexing path into the in-memory cache during the
processing phase to ensure correct parent links. - Seed ancestor
directories into the create path cache to prevent ghost folders on
subpath indexing. - Add test core/tests/indexing_move_folder_bug_test.rs
reproducing the ghost-folder bug when moving a folder into a managed
location and asserting correct parent linkage.
2025-11-21 09:18:03 -08:00
Jamie Pine
8d751b0713 feat: enhance event filtering and subscription management
- Added `include_descendants` option to event filters, allowing recursive path matching for resource events.
- Updated `affects_path` method to support descendant matching, improving event handling accuracy.
- Refactored subscription logic to utilize the new filtering capabilities, ensuring only relevant events are processed.
- Introduced tests for event filtering to validate exact vs. recursive matching, enhancing reliability of event-driven updates.
- Updated related components to leverage the new filtering options, improving overall performance and user experience.
2025-11-20 04:38:01 -08:00
Jamie Pine
28988eed1b feat: add HLC constructor and enhance indexing tests
- Introduced a new constructor for the HLC struct to allow explicit initialization with timestamp, counter, and device ID.
- Updated indexing tests to improve error handling for entry IDs and added a comprehensive test for reindexing after offline changes, ensuring all original and new files are detected correctly.
2025-11-18 18:23:59 -08:00
Jamie Pine
c6cda350be feat: media proxy and thumbstrip functionality
- Introduced new modules and actions for generating media proxies and thumbstrips, improving media handling capabilities.
- Added configuration, error handling, and processing logic for both proxy and thumbstrip generation.
- Updated existing media operations to integrate new functionalities, ensuring seamless media processing and user experience.
- Enhanced tests to cover new features and ensure reliability in media operations.
2025-11-17 04:24:05 -08:00
Jamie Pine
680585a02f feat: enhance watermark synchronization with resource count validation
- Introduced new functionality to validate resource counts during watermark exchanges, improving synchronization accuracy.
- Added methods to retrieve device-owned resource counts for gap detection, ensuring that discrepancies are identified and addressed.
- Updated the `SyncMessage` structure to include actual resource counts, facilitating better tracking of synchronization state.
- Enhanced the `PeerSync` implementation to clear watermarks for mismatched resources, allowing for surgical recovery in case of count mismatches.
- Improved logging for better visibility into synchronization processes and potential issues.
2025-11-16 06:39:59 -08:00
Jamie Pine
08d5e7badf feat: add DataAvailableNotification for proactive data sync notifications
- Introduced a new `DataAvailableNotification` message type to notify peers of new data availability, triggering immediate watermark exchanges for synchronization.
- Enhanced the `PeerSync` implementation to handle notifications and manage real-time activity tracking per peer, improving synchronization efficiency.
- Updated the `SyncProtocolHandler` to process the new notification type and initiate catch-up logic accordingly.
- Implemented periodic watermark checks to ensure timely synchronization and prevent missed events during idle periods.
2025-11-16 05:40:30 -08:00
Jamie Pine
a33ca1e884 feat: enhance synchronization with per-resource watermark tracking and batching configuration
- Added support for per-resource watermarks in the synchronization process, allowing for fine-grained comparison and catch-up logic.
- Implemented new configuration options for real-time batching, including maximum entries before flush and flush interval in milliseconds.
- Enhanced the `apply_state_change` function to check for tombstoned records, preventing the resurrection of deleted entries.
- Updated various components to utilize the new watermark and batching features, improving synchronization efficiency and robustness.
2025-11-16 04:56:41 -08:00
Jamie Pine
b4e5212b60 feat: enhance clipboard capabilities and improve sync event tracking
- Added clipboard permissions for reading and writing text in the default capabilities configuration.
- Enhanced the sync test harness to capture job lifecycle events, improving tracking of indexing completion and orphaned file management.
- Implemented checks for orphaned files during synchronization, ensuring robust handling of incomplete sync scenarios.
2025-11-16 02:49:45 -08:00
Jamie Pine
a067dd5cbb chore: update submodule and enhance logging in ResourceManager and PeerSync
- Updated the submodule reference in `workbench`.
- Added debug logging in `ResourceManager` to track resource event emissions and virtual resource mappings.
- Improved the `PeerSync` implementation to emit resource events in a non-blocking manner, enhancing UI reactivity and ensuring proper resource formatting.
- Updated integration tests to include new resource types and refined synchronization checks for stability.
2025-11-16 02:25:05 -08:00
Jamie Pine
8305d7d235 feat: working sync test, sick log analyzer, cleanup 2025-11-16 01:53:35 -08:00
Jamie Pine
1ae1bcea6b refactor: improve code readability and consistency in sync watermark tests; format and organize test setup and logging for better clarity 2025-11-14 06:52:29 -08:00
Jamie Pine
3e78e8c3c8 feat: implement comprehensive findings and resolution plan for sync system watermark issues; introduce per-resource watermark tracking to prevent data loss during sync operations 2025-11-14 06:50:59 -08:00
Jamie Pine
267d52d769 feat: enhance volume management with new filtering options and improved event handling; add stability tests for volume fingerprints 2025-11-14 05:20:05 -08:00
Jamie Pine
b71072f065 feat: add context menu support and enhance drag demo with context menu functionality 2025-11-11 03:03:37 -08:00
Jamie Pine
d53371af92 chore: update subproject commits and enhance resource event handling with batch support 2025-11-10 19:23:47 -08:00
Jamie Pine
279114a8e8 feat: implement Virtual Sidecar System (VSS) 2025-11-02 19:42:51 -08:00
Jamie Pine
c2bd639555 feat: implement sidecar generation job system integration 2025-11-02 19:42:51 -08:00
Jamie Pine
e5b35082e6 chore: add sync support to M2M tables 2025-10-19 12:14:29 -07:00
Jamie Pine
c3c9e9704c feat: refactor struct fields and add async methods for message processing 2025-10-19 09:54:09 -07:00
Jamie Pine
05244b1b56 feat: add sync_transport module and MockTransport struct 2025-10-19 09:54:09 -07:00
Jamie Pine
819a85c11a docs: add running tests instructions 2025-10-19 08:20:39 -07:00
Jamie Pine
dcc4dc4fc1 pairing 2025-10-18 10:33:20 -07:00
Jamie Pine
53a722a93c feat: implement CURRENT_DEVICE_SLUG and update device_id to device_slug 2025-10-16 03:52:01 -07:00
Jamie Pine
b26e2b5f54 (epic): new SdPath addressing - lots of LSYNC, FSYNC progress - improved
testing framework
2025-10-15 07:02:36 -07:00