Commit Graph

1423 Commits

Author SHA1 Message Date
Jamie Pine
aff2398563 Implement shared path tracking in parallel discovery to prevent duplicate processing
- Introduced a shared `seen_paths` structure using `RwLock` to manage paths across all workers, addressing symlink loops and duplicate directory processing.
- Updated the `discovery_worker_rayon` function to utilize the shared `seen_paths`, enhancing efficiency and correctness in the discovery phase.
2025-12-07 21:37:28 -08:00
Jamie Pine
456da8a924 Enhance ephemeral indexing by clearing stale entries before re-indexing
- Implemented a mechanism to clear stale entries for a directory's children during re-indexing to prevent ghost files.
- Updated the `create_for_indexing` method to remove previously indexed paths and ensure a clean slate for new indexing operations.
- Added logging for the number of cleared entries to aid in debugging and monitoring.
2025-12-07 21:35:19 -08:00
Jamie Pine
191c7f7ef0 Refactor to a single unified ephemeral index cache 2025-12-07 21:31:15 -08:00
Jamie Pine
c3517a554e Preserve ephemeral UUIDs during indexing
- Remove TTL-based ephemeral cache and switch to a permanent in-memory
  cache.
- Reuse ephemeral UUIDs when creating persistent entries to preserve
  continuity of user data.
- Populate ephemeral UUIDs during the processing phase and expose
  get_ephemeral_uuid in the indexer state.
- Remove the location invalidation hook and related UI usage.
2025-12-07 21:03:51 -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
d1392607ad chore: add default locations with IndexMode::None 2025-12-06 20:50:07 -08:00
Jamie Pine
0e932defdc feat: add icons and indexing indicator to PathBar 2025-12-06 20:50:06 -08:00
Jamie Pine
0c7c5e05f2 fix: fix logCallback and setCurrentLibrary 2025-12-06 16:46:02 -08:00
Jamie Pine
b4024c860e Mobile app in React Native
+ validation support for Actions
2025-12-05 15:16:41 -08:00
Jamie Pine
59d6f0d47e Add daemon service management commands 2025-12-04 18:10:24 -08:00
Jamie Pine
221affd23a Add cross-device event export and fix dropdown 2025-12-04 15:45:40 -08:00
Jamie Pine
ff5a359980 Merge pull request #2896 from spacedriveapp/sync-event-log
Sync event log
2025-12-04 15:38:03 -08:00
Yukeey
4f607a603b apps/cli/src/domains/update/mod.rs
apps/tauri/scripts/dev-with-daemon.ts
bun.lock
core/src/ops/indexing/entry.rs
core/src/volume/backend/local.rs
core/src/volume/fs/ntfs.rs
core/src/volume/fs/refs.rs
core/src/volume/platform/window.rs
2025-12-04 21:43:18 +01:00
Yukeey
f4a225f2f7 Rename memory to memory_file 2025-12-04 18:17:12 +01:00
Yukeey
0790179f4f Rename :memory: to memory 2025-12-04 18:16:30 +01:00
Jamie Pine
dbcfcb3c56 Add Sync Events Export CLI and Protocol Support
- Add SyncEventsArgs to export sync events from the CLI - Wire
SyncCmd::Events and implement export_events to fetch - format and write
results - Implement JSON, SQL, and Markdown exporters - with optional
device data in the output - Extend protocol with EventLogRequest and
EventLogResponse - Enable LogSyncHandler to handle event log requests
and return logs - Expose log_handler from BackfillManager for event
logging - Update docs with CLI examples and protocol overview
2025-12-03 21:58:29 -08:00
Jamie Pine
a84ccadfa9 sync event log 2025-12-03 21:41:15 -08:00
Jamie Pine
363bd39ffc Add cloud path handling for thumbnail generation
- Introduce is_cloud_path and to_backend_path helpers - Handle cloud vs
local paths in thumbnail generation - Download cloud files to a temp
file via the volume backend - Use backend-relative paths and clean up
the temp file after use - Slightly adjust dev-scAN comment block to
delay initialization (still disabled)
2025-12-03 18:36:48 -08:00
Jamie Pine
52cd817bf0 refactor: remove unnecessary file system operations 2025-12-03 18:00:43 -08:00
Jamie Pine
0b22a7aec4 fix: update cloud credential manager instantiation 2025-12-03 18:00:43 -08:00
Jamie Pine
40d05fcec8 feat: add cloud credential entity and migration 2025-12-03 18:00:43 -08:00
Jamie Pine
cab3d4da18 cargo format 2025-12-03 15:56:27 -08:00
Jamie Pine
082119e6e8 fix: update package version 2025-12-03 15:55:04 -08:00
Jamie Pine
e5cb6baaba feat: update cloud credential management 2025-12-03 15:55:04 -08:00
Jamie Pine
9143a8aca5 refactor: improve key generation and file operations 2025-12-03 15:54:28 -08:00
Jamie Pine
133d48be73 fix: update file category 2025-12-03 15:54:28 -08:00
Jamie Pine
fc41ad9f0f feat: update device key handling 2025-12-03 15:54:27 -08:00
Gedeon Sainrival
8ba1d50475 add FilesystemHandler trait into enhance_volume_from_windows scope 2025-12-02 13:25:57 -05:00
Gedeon Sainrival
f01a2994f1 Fix build issues on Linux
Managed to successfully build on Linux, updated xtask to resolve errors,
and fixed interface not loading properly when using Tauri GUI.
2025-12-02 13:17:28 -05:00
Jamie Pine
9becfa1e7d Switch IPC to TCP sockets across daemon and client 2025-12-01 17:49:36 -08:00
Jamie Pine
b5a77c403e Simplify database migration logic - error if both files exist 2025-12-01 15:00:59 -08:00
Jamie Pine
e127a5aa0b Fix database migration to handle existing library.db files 2025-12-01 14:57:55 -08:00
Jamie Pine
4a314fadb2 Rename database.db to library.db with automatic migration 2025-12-01 14:44:09 -08:00
Jamie Pine
9c8fe660d3 Remove all emojis from codebase 2025-12-01 13:33:00 -08:00
Jamie Pine
73befe0f0f cleanup 2025-12-01 13:30:30 -08:00
Jamie Pine
0506f9a45a Update version to 2.0.0-pre.1 2025-12-01 12:45:10 -08:00
Jamie Pine
01ec19d352 Bump version to 2.0.0-pre 2025-12-01 12:41:57 -08:00
Jamie Pine
142008dead Add Active Jobs API and Path Checks Plus UI Prefs 2025-12-01 10:07:31 -08:00
Jamie Pine
9acf86a9ea Add location export/import and schema changes 2025-11-30 17:27:31 -08:00
Jamie Pine
3730776fd4 Remove redundant StateSyncHandler and send peer device in state requests
to get only their state resources (device owned data)
2025-11-28 10:36:00 -08:00
Jamie Pine
1e4992f454 Generate watermark during snapshot-only sync 2025-11-28 09:52:43 -08:00
Jamie Pine
00eebd6c23 Add per peer watermark store for shared sync
- Introduce PeerWatermarkStore to track max HLC received per peer for
shared resource incremental sync - Initialize the
peer_received_watermarks table at startup - Persist received watermarks
during backfill and after backfill completion - Query the max watermark
across peers via PeerWatermarkStore - Expose the new module and export
PeerWatermarkStore from sync
2025-11-28 09:35:40 -08:00
Jamie Pine
3791372f57 Apply current_state snapshot before backfill
Process the pre-sync current_state data in dependency order before
applying HLC-ordered log entries. This ensures base records exist for FK
constraints, and then resolves dependent changes after inserting
snapshot records. Extend FK error handling to recognize foreign key
failures and extract missing UUIDs for buffering and retry.
2025-11-28 08:58:13 -08:00
Jamie Pine
7c864e9588 Buffer shared changes when FK dep missing 2025-11-28 08:37:27 -08:00
Jamie Pine
e4c60c58ca Guard against self-watermarks and apply backfill
Skip self-watermarks when peer is the local device; log a warning. Apply
current_state in dependency order by computing registry order. Fall back
to unordered if the computation fails. On automatic backfill failure,
reset device state to Uninitialized. This triggers a retry and clears
backfill_attempted.
2025-11-28 08:20:28 -08:00
Jamie Pine
0e5e9827d1 Add native drag and drop and update submodules 2025-11-28 06:57:00 -08:00
Jamie Pine
ace39839a2 Improve subscription handling and RPC reliability
- Flush RPC writer after sending responses to ensure delivery - Add
cancellation guard in useNormalizedQuery to avoid leaks - Make
SubscriptionManager concurrency-safe: deduplicate in-flight subscribes -
Track pending subscriptions to avoid races and add centralized cleanup
logic - Introduce createSubscription helper and centralized cleanup
logic - Update docs with Sync State Machine, HLC update algorithm, retry
queue, metrics, and protocol messages - Reflect new config defaults for
timeouts and intervals
2025-11-27 12:48:50 -08:00
Jamie Pine
97cc3853b5 Batch load tags for entries and refine path filter 2025-11-27 10:05:11 -08:00
Jamie Pine
83138f798e Emit direct virtual resources and apply tags 2025-11-27 10:05:11 -08:00