Commit Graph

116 Commits

Author SHA1 Message Date
Jamie Pine
ed0fa209b4 Improve comments 2025-12-07 22:23:57 -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
0c7c5e05f2 fix: fix logCallback and setCurrentLibrary 2025-12-06 16:46:02 -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
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
cab3d4da18 cargo format 2025-12-03 15:56:27 -08:00
Jamie Pine
9becfa1e7d Switch IPC to TCP sockets across daemon and client 2025-12-01 17:49:36 -08:00
Jamie Pine
9acf86a9ea Add location export/import and schema changes 2025-11-30 17:27:31 -08:00
James Pine
ce595235b5 fix build 2025-11-26 11:54:17 -08:00
Jamie Pine
73da2bf1e9 Migrate pairing to pkarr-based remote discovery
- Remove relay-URL based pairing flow and rely on pkarr/DNS for remote
discovery - Extend pairing code with optional node_id and adopt version
2 QR format - Generate pairing codes using node_id and drop relay_url in
non-QR flows - Enable combined mDNS, pkarr, and DNS discovery in the
endpoint - Cache relay_url in persisted device info for reconnection
optimization - Update protocol handlers to propagate node_id and
pkarr-based flow - Adjust tests and logging to reflect the new
cross-network pairing
2025-11-25 13:57:41 -08:00
Jamie Pine
7a71718eda Introduce sync activity API and UI monitor
- Add SyncActivityType enum and GetSyncActivity input/output - Implement
SyncActivityAggregator to emit state, activity, and errors - Wire
aggregator into SyncService startup to run in background - Build
frontend SyncMonitor UI: popover, peer list, activity feed, hooks -
Extend TS client types with sync.activity endpoints
2025-11-25 07:00:26 -08:00
Jamie Pine
8808e85f4e Add paired devices support across CLI, core, and UI
- Add show_paired flag to device listing (CLI arg and input) - Extend
LibraryDeviceInfo with is_paired and is_connected; include Paired
devices in library listing when requested - Add Devices group to UI
(DevicesGroup) and hook into SpaceGroup - Extend device queries/types to
support show_paired and paired devices - Refactor Dockerfile to
multi-stage Bun + Rust builds; reuse web assets - Remove obsolete
core/ops/entries/mod.rs
2025-11-24 05:22:54 -08:00
Jamie Pine
8a3387ca69 Add memory system with archive and UI integration 2025-11-23 03:33:19 -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
ef25390441 feat: add unique bytes tracking and cache refresh functionality for volumes
- Introduced a new `unique_bytes` field in the volume model to track deduplicated content size.
- Implemented a volume refresh action to recalculate unique bytes for all volumes owned by the device, emitting a cache refresh event to invalidate frontend caches.
- Updated the storage overview component to display unique bytes and other volume statistics.
- Enhanced the event system to handle cache invalidation events, ensuring real-time updates across the application.
- Added necessary migrations and database updates to support the new volume tracking features.
2025-11-17 23:37:48 -08:00
Jamie Pine
298b069a65 refactor: streamline event and log handling in the CLI and core
- Refactored the event monitoring logic in the CLI to improve readability and maintainability.
- Updated the event summarization function to enhance formatting and clarity of event messages.
- Introduced a dedicated log streaming mechanism in the core, separating log handling from event processing.
- Enhanced the RPC server to support real-time log subscriptions, allowing for more efficient log message delivery.
- Cleaned up legacy log event handling, ensuring a clearer distinction between events and logs in the system.
2025-11-17 09:22:41 -08:00
Jamie Pine
ca8bb8534e feat: add events monitoring functionality to CLI
- Introduced a new Events domain for monitoring events in real-time, allowing users to filter events by type, library ID, job ID, and device ID.
- Updated the CLI to include an Events command, enabling users to access the new monitoring features.
- Enhanced the Cargo.lock and related modules to support the new functionality, ensuring seamless integration with existing systems.
- Added necessary arguments and command handling for the Events command in the CLI.
2025-11-17 08:25:00 -08:00
Jamie Pine
c647ee8452 feat: add unique content count to library statistics
- Introduced a new field `unique_content_count` in `LibraryStatistics` to track the number of unique content identities.
- Updated various components to calculate and display unique content count, enhancing library statistics output.
- Modified the CLI and interface to reflect the new unique content metric, improving user insights into library data.
- Adjusted serialization and API responses to include the unique content count for better data consistency across the system.
2025-11-15 04:55:20 -08:00
Jamie Pine
24aa4d9798 fix: specify response type for layout query in spaces module to ensure proper JSON handling 2025-11-14 07:28:19 -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
54f978d210 feat: introduce Identifiable trait genericization and Spaces resource event system; enhance resource management with direct event emissions and improved routing logic 2025-11-13 10:20:45 -08:00
James Pine
7983bdbd73 fix 2025-11-13 02:25:04 -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
7b42681f35 refactor: refactor display and formatting functions in sync/mod.rs 2025-10-30 16:25:36 -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
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
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
7187d82fd8 refactor: update pairing logic for interactive and non-interactive mode 2025-10-22 17:48:02 -07:00
Jamie Pine
3e50d20a8e feat: modify Join enum to include relay_url, node_id, and session_id 2025-10-22 17:48:02 -07:00
Jamie Pine
3092367fd1 refactor: update LibrarySyncSetupInput for optional arguments and interactive mode 2025-10-20 18:16:36 -07:00
Jamie Pine
2563a6dee9 feat: add create-shared action to SetupArgs 2025-10-19 14:41:46 -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
c9501d3773 refactor: update file references and imports for search facets 2025-10-15 23:48:18 -07:00
Jamie Pine
5eafd66bda feat: add cloud volume setup and migration changes 2025-10-15 02:03:22 -07:00
Jamie Pine
7477c9d440 (chore): CI fix 2025-10-15 00:08:40 -07:00
Jamie Pine
f43d2456da (chore): CI fix 2025-10-14 23:02:13 -07:00
Jamie Pine
e07c28c484 (chore): update tasks 2025-10-14 20:39:56 -07:00
Jamie Pine
0f5b8ef649 feat: add reqwest dependency, config management, and CLI workflows 2025-10-14 19:13:17 -07:00
Jamie Pine
4d0c92fa04 chore: integrate DaemonCmd and rename daemon to sd-daemon 2025-10-14 05:55:05 -07:00
Jamie Pine
f2199574ae feat: implement OffloadPolicy and OffloadConfig 2025-10-14 05:55:05 -07:00
Jamie Pine
566d9c6a6a feat: add VolumeEvent enum and implement ApfsContainer 2025-10-14 03:00:50 -07:00
Jamie Pine
56fcf9be22 feat: add cloud volume handling 2025-10-14 01:23:11 -07:00
Jamie Pine
91310317ef feat: implement interactive cloud storage setup 2025-10-13 23:13:01 -07:00
Jamie Pine
dc20ff0e69 feat: add cloud module in CLI domain 2025-10-13 23:13:00 -07:00
Jamie Pine
7e0ab59d12 feat: add interactive selection and text input functions 2025-10-13 23:12:59 -07:00
Jamie Pine
2679ab8cba feat: create Volume list query module 2025-10-13 22:25:19 -07:00