Commit Graph

1264 Commits

Author SHA1 Message Date
Jamie Pine
d9f452f852 implement Spaces 2025-11-11 07:35:58 -08:00
Jamie Pine
8d61dc1139 feat: implement thumbnail generation for linked content identities and improve logging in responder 2025-11-11 07:07:06 -08:00
Jamie Pine
4dde6524af chore: update subproject commits and enhance logging configuration with multi-stream support 2025-11-11 06:55:17 -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
ac4c5361dd chore: update dependencies in bun.lock, enhance event handling in RPC server, and add event listing functionality 2025-11-10 05:51:59 -08:00
Jamie Pine
20a55a62db chore: migrate from pnpm to Bun, update Node.js version, and remove unused configuration files 2025-11-09 22:34:26 -08:00
Jamie Pine
3c758b9984 sidecar progress 2025-11-05 23:31:26 -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
ea70e527db feat: implement cross-device sidecar synchronization 2025-11-02 19:42:51 -08:00
Jamie Pine
0eaff9547e feat: integrate sidecars as first-class SdPath variant 2025-11-02 19:42:50 -08:00
Jamie Pine
b68104f92c Merge pull request #36 from jamiepine/cursor/clean-up-runtime-data-for-release-c55b
Clean up runtime data for release
2025-10-30 16:26:47 -07:00
Jamie Pine
71d5902804 refactor: add specta::Type to DeviceSyncState enum in state.rs 2025-10-30 16:25:37 -07:00
Jamie Pine
058f9e59ad refactor: remove LivePhoto and LivePhotoQuery modules from media/mod.rs 2025-10-30 16:25:36 -07:00
Jamie Pine
7b42681f35 refactor: refactor display and formatting functions in sync/mod.rs 2025-10-30 16:25:36 -07:00
Jamie Pine
d907c27cc4 refactor: add specta::Type to structs and remove live_photos from SidecarKind enum 2025-10-30 16:25:35 -07:00
Cursor Agent
b3d94096b7 feat: Implement sync metrics CLI and watch mode
Co-authored-by: ijamespine <ijamespine@me.com>
2025-10-24 08:11:37 +00:00
Cursor Agent
d6941aaa14 Refactor sync metrics collection and persistence
Co-authored-by: ijamespine <ijamespine@me.com>
2025-10-24 04:26:14 +00:00
Cursor Agent
facf10b299 feat: Add sync metrics collection and reporting
This commit introduces comprehensive metrics collection for the sync service. It includes tracking state transitions, operation counts, data volumes, performance indicators, and error events. The changes also add a new CLI command to view sync metrics and integrate metrics into the sync service's core functionality.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-10-24 03:56:08 +00:00
Cursor Agent
606485c398 Refactor: Organize job logs and flatten job database
Co-authored-by: ijamespine <ijamespine@me.com>
2025-10-24 02:45:10 +00:00
Jamie Pine
7905d4725c chore: code cleanup and remove unused code
- Remove unnecessary "CRITICAL" comment markers
- Remove unused libraries table from initial migration
- Format watcher device ownership check
2025-10-23 18:37:02 -07:00
Jamie Pine
5d84520707 refactor: pass location_id to indexing responder handlers
Pass location_id parameter to handle_modify, handle_remove, and handle_rename functions for better context and future location-scoped operations.
2025-10-23 18:36:52 -07:00
Jamie Pine
64e0a0d5a5 fix: rebuild closure tables after sync backfill
Adds closure table rebuilding after backfill completes to ensure entry_closure and tag_closure are properly populated for hierarchical queries.

- Rebuild entry_closure after backfill (safety measure)
- Add rebuild_tag_closure_table() to reconstruct tag hierarchy from tag_relationships
- Add per-entry closure rebuild in entry apply_state_change()

Without this, synced entries only have self-references in entry_closure and cannot be queried for descendants, breaking subtree operations and location scoping.
2025-10-23 18:36:43 -07:00
Jamie Pine
8a803ba6c9 fix: implement deterministic device slug collision resolution
Fixes FK violations during library sync setup when devices have identical slugs. Implements deterministic collision resolution where the newer/joining device always renames itself with a -2 suffix, stored in device.json overrides.

- Add device info to CreateSharedLibraryRequest for pre-registration
- Add device_slug to CreateSharedLibraryResponse for resolved slug communication
- Add create_library_with_id_and_initial_device() to pre-register requesting device
- Update ensure_device_registered() to use per-library slug system
- Add collision detection to RegisterDeviceRequest message handler
- Add collision detection to Device::apply_state_change() for sync backfill
- Preserve existing slugs on device updates to avoid breaking references
- Implement execute_share_local() and execute_join_remote() with proper registration

Flow: requesting device is pre-registered before library creation, so the joining device detects the collision and stores an override in its device.json. Both libraries end up with consistent slug assignments and bidirectional sync works.
2025-10-23 18:36:33 -07:00
Jamie Pine
559324ceb1 refactor: remove RegisterOnly and redesign sync setup UX
Replace confusing RegisterOnly action with clearer ShareLocalLibrary and JoinRemoteLibrary actions. Add placeholder for future MergeLibraries.

- Remove RegisterOnly from LibrarySyncAction enum
- Add ShareLocalLibrary (share your library to remote device)
- Add JoinRemoteLibrary (join existing remote library)
- Add MergeLibraries stub for future implementation
- Update CLI with three-option menu instead of two
- Simplify CLI arg parsing for new actions

The new UX is clearer: users choose to either share their library or join a remote one, instead of the ambiguous "register only" concept.
2025-10-23 18:36:17 -07:00
Jamie Pine
7917819f48 feat: add per-library slug override system
Devices can now have different slugs in different libraries without breaking other libraries. This is stored in device.json's library_slug_overrides map.

- Add library_slug_overrides HashMap to DeviceConfig
- Add slug_for_library() to get effective slug for a library context
- Add set_library_slug() to store library-specific overrides

This enables consistent device addressing across shared libraries while preserving global slug for non-shared libraries.
2025-10-23 18:36:06 -07:00
Jamie Pine
b4ff464ef9 feat: add device ownership verification and filter locations 2025-10-23 16:15:09 -07:00
Jamie Pine
8072ccddc4 feat: implement sea_orm QueryFilter in watcher service 2025-10-23 16:15:09 -07:00
Jamie Pine
f62269c381 feat: add location_id to Responder functions 2025-10-23 16:14:08 -07:00
Jamie Pine
3679bc98c6 feat: create tombstone entity and apply deletion methods 2025-10-23 01:47:05 -07:00
Jamie Pine
3304109443 feat: initialize deletion apply functions for device-owned models 2025-10-23 01:47:05 -07:00
Jamie Pine
4e659ef2c9 feat: add deletion apply function for device-owned models 2025-10-23 01:47:05 -07:00
Jamie Pine
6bac016fc2 feat: sync audit log creation and update 2025-10-23 00:04:58 -07:00
Jamie Pine
a45077fc88 feat: implement unified configuration for library sync behavior 2025-10-23 00:04:57 -07:00
Jamie Pine
a9d87b48dd feat: add version column to AuditLog table 2025-10-23 00:04:56 -07:00
Jamie Pine
5d8c53013d feat: add conditional deletion of root entry before location deletion 2025-10-22 17:56:00 -07:00
Jamie Pine
54caa2b4c9 refactor: refactor logic to set initial watermarks using actual received data 2025-10-22 17:48:02 -07:00
Jamie Pine
7187d82fd8 refactor: update pairing logic for interactive and non-interactive mode 2025-10-22 17:48:02 -07:00
Jamie Pine
a865950e6e feat: add relay_url to NetworkStatus 2025-10-22 17:48:02 -07:00
Jamie Pine
127cab0484 refactor: import EntityTrait for use in sync_helpers and update location roots 2025-10-21 17:38:11 -07:00
Jamie Pine
bf3a1d667f feat: prevent overwriting correct paths during sync 2025-10-21 17:38:11 -07:00
Jamie Pine
904ee5ec2c feat: sync location root entry before syncing location 2025-10-21 16:56:09 -07:00
Jamie Pine
205e6d7d9f feat: implement accurate watermark-based sync 2025-10-21 16:28:25 -07:00
Jamie Pine
bac9d396c9 refactor: convert FK integer IDs to UUIDs and use synced absolute path 2025-10-21 15:13:39 -07:00
Jamie Pine
3c9f92be9f feat: implement cursor-based pagination with cursor support 2025-10-21 14:28:21 -07:00
Jamie Pine
ddbb47c5f4 feat: handle shared change batch event for sync broadcast 2025-10-21 11:38:48 -07:00
Jamie Pine
5c339167e6 feat: implement batch syncing of content identities and entries 2025-10-21 11:38:48 -07:00
Jamie Pine
58c1455057 feat: implement batch syncing in run_content_phase 2025-10-21 11:38:47 -07:00
Jamie Pine
16a3a19ec3 feat: update link_to_content_identity return type 2025-10-21 11:38:46 -07:00