Commit Graph

146 Commits

Author SHA1 Message Date
Jamie Pine
635f4e54b3 feat(ephemeral): add detailed memory breakdown and UUID management for indexing
This commit introduces a detailed memory breakdown feature for the ephemeral indexing process, allowing users to view memory usage by component. It also enhances UUID management by implementing lazy generation and assignment of UUIDs during indexing and searching operations. These changes improve memory tracking and optimize UUID handling, contributing to better performance and user experience in the indexing system.
2026-01-15 09:58:26 -08:00
Jamie Pine
ae512d8c0b feat(snapshot): implement snapshot persistence for ephemeral indexes
This commit introduces a new snapshot mechanism for ephemeral indexes, allowing for fast restoration between sessions. The snapshot functionality utilizes zero-copy binary serialization with zstd compression, significantly reducing load times from over 10 minutes to just 1-2 seconds. The implementation includes methods for saving and loading snapshots, as well as enhancements to the existing indexing structure to support this feature. Additionally, the codebase is updated to ensure compatibility with the new snapshot format, improving overall performance and user experience.
2026-01-15 02:09:06 -08:00
Jamie Pine
6177fc480e feat(CopyJobDetails): enhance file transfer UI with auto-scrolling and metadata refetching
This commit improves the `CopyJobDetails` component by adding an auto-scroll feature that centers the currently copying file in the transfer queue. Additionally, it implements a mechanism to refetch copy metadata when the completed file count changes, ensuring that the displayed information is always up-to-date. The UI is further refined with updated icons and styles for better user experience during file operations.
2026-01-12 02:50:11 -08:00
Jamie Pine
a8219385b2 Merge pull request #2952 from SinanGncgl/fix/dropbox-oauth-config
Fix Dropbox OAuth configuration
2026-01-04 17:05:43 -08:00
Sinan Gencoglu
68d6b36f4a Fix Dropbox OAuth configuration
- Fix 'access_token and refresh_token can not be set at the same time' error
- Update Dropbox to use only refresh_token (OpenDAL requirement)
- Add client_id/client_secret to OAuth credential storage
- Add validation for empty OAuth credentials
- Update CLI and volume manager for enhanced OAuth support
2026-01-03 23:13:58 +01:00
Jamie Pine
322db65663 feat(logo): replace ASCII logo with a dynamic purple orb rendering
- Removed the static ASCII logo and implemented a new function to calculate brightness on a sphere, allowing for a dynamic rendering of the Spacedrive logo as a purple orb using ANSI colors and Unicode half-blocks.
- Enhanced the `print_logo_colored` function to utilize the new brightness calculation and color gradient, improving visual representation.
- Updated related documentation to reflect the changes in logo rendering.
2025-12-31 16:46:58 -08:00
Jamie Pine
9925d926e2 Enhance device revocation process with library removal option
- Added `remove_from_library` field to `DeviceRevokeInput` and `DeviceRevokeAction` to control whether a device should be removed from library databases during revocation.
- Updated the `from_input` method in `DeviceRevokeAction` to handle the new field.
- Modified the revocation logic to conditionally remove devices from libraries based on the `remove_from_library` flag, improving flexibility in device management.
- Adjusted the CLI argument parsing to default `remove_from_library` to false, ensuring devices remain in libraries unless explicitly specified for removal.
2025-12-22 07:04:04 -08:00
Jamie Pine
bb472a779b Add ephemeral cache reset functionality
- Introduced a new command `ResetCache` in the `IndexCmd` enum to allow users to reset the ephemeral index cache.
- Implemented `EphemeralCacheResetAction` to handle the cache reset logic, including confirmation checks and logging.
- Added input and output structures for the cache reset action, providing clear feedback on the number of cleared paths.
- Enhanced the `EphemeralIndexCache` with a `clear_all` method to facilitate the clearing of all cached paths and entries.
2025-12-21 07:12:40 -08:00
Jamie Pine
87875277b9 Implement library load failure event and enhance library directory scanning
- Added a new `LibraryLoadFailed` event to capture and report errors when loading libraries, including error type categorization for frontend notifications.
- Introduced a method to count `.sdlibrary` directories without loading them, improving the library initialization process.
- Updated the library manager to emit the new event upon load failures, enhancing error handling and user feedback.
- Enhanced logging to provide better insights during library loading and initialization.
2025-12-21 04:42:34 -08:00
Jamie Pine
71992bb79c Enhance job event handling and device context management
- Updated event handling in job management to include device IDs for better tracking of job activities across devices.
- Introduced a new JobActivityClient for subscribing to job activity from remote devices.
- Added hardware specifications to device configuration and database schema, improving device information tracking.
- Refactored event structures to accommodate new fields related to job activities and device management.
- Updated the user interface to display job activity for devices, enhancing user experience in monitoring job statuses.
2025-12-17 02:13:42 -08:00
Jamie Pine
5a604f3a94 Merge pull request #2907 from spacedriveapp/cursor/resource-event-system-refactor-7da6
Resource event system refactor
2025-12-13 17:53:24 -08:00
Jamie Pine
59553e2718 Merge pull request #2905 from spacedriveapp/tembo/remove-auto-accept-pairing
Remove auto-accept from pairing
2025-12-13 17:53:07 -08:00
Jamie Pine
9f1558b108 Fix device capabilities display and use sd_path 2025-12-12 18:22:59 -08:00
Jamie Pine
4525eda7de Update CI and release workflows to include native dependency setup and adjust CLI binary build features
- Added a step to set up native dependencies using `cargo xtask setup` in both CI and release workflows.
- Updated the build commands for CLI binaries to include `heif` and `ffmpeg` features, ensuring the binaries are built with the necessary capabilities.
- Modified `Cargo.toml` files for `sd-cli`, `sd-server`, and `tauri` to define `heif` and `ffmpeg` features separately, improving modularity and clarity in dependency management.
2025-12-10 14:05:24 -08:00
tembo[bot]
5d980257a0 refactor(pairing): Remove auto-accept option and related code 2025-12-10 21:20:41 +00:00
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
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
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
2ef179d4df chore: update Zustand dependency to version 5.0.8, modify Cargo.toml for sd-core features, and enhance sidecar manager initialization in library management 2025-11-11 15:44:00 -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