Commit Graph

1494 Commits

Author SHA1 Message Date
Jamie Pine
19fed1376a Enhance resource management and UI components
- Updated `ResourceManager` to improve handling of virtual resource dependencies, adding debug logging for better traceability.
- Introduced a new `FileKinds` item type in the `ItemType` enum to categorize file types (images, videos, audio, etc.).
- Enhanced the `LibraryManager` to create space-level items, including the new `FileKinds` category.
- Implemented virtual resource event emissions in `DeleteGroupAction` and `DeleteItemAction` to ensure proper resource management during deletions.
- Added a new `SpaceCustomizationPanel` for managing space groups and items, allowing users to customize their workspace effectively.
- Updated various UI components to support drag-and-drop functionality for palette items and improved context menu interactions for group management.
2025-12-20 07:48:20 -08:00
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
1780dc8856 Enhance Gaussian Splat functionality and UI controls
- Added logging for Gaussian splat job creation in `GenerateSplatAction`.
- Updated `ContentRenderer` to include new state management for MeshViewer controls, improving user interaction with Gaussian splats.
- Introduced `MeshViewerUI` component for enhanced control over Gaussian splat visualization, including auto-rotate and sway settings.
- Improved `GaussianSplatViewer` to handle loading states and camera animations more effectively.
- Refactored `MeshViewer` to integrate new control props and manage state changes for Gaussian splat rendering.
2025-12-19 00:26:07 -08:00
Jamie Pine
8abc966b84 Add Gaussian Splat generation functionality
- Introduced a new `GaussianSplat` variant in the `JobOutput` enum to handle output from Gaussian splat jobs.
- Implemented `GenerateSplatAction` for initiating Gaussian splat generation, including input and output structures.
- Created `GaussianSplatJob` and its associated processing logic for batch image processing and splat generation.
- Added `GaussianSplatProcessor` to manage the processing of images into 3D Gaussian splats.
- Updated the media module to include new splat-related functionalities and integrated them into the existing workflow.
- Enhanced the interface components to support visualization and interaction with Gaussian splats, including a toggle for displaying splat overlays.
- Updated TypeScript types to accommodate new splat generation inputs and outputs, ensuring type safety across the application.
2025-12-18 12:20:54 -08:00
Jamie Pine
83809fadc3 Add support for PLY 3D models and integrate Gaussian splats visualization
- Introduced a new file type definition for PLY 3D models in `misc.toml`.
- Updated `package.json` to include dependencies for Gaussian splats and React Three Fiber.
- Implemented a `MeshViewer` component for rendering 3D models, supporting both standard mesh and Gaussian splat formats.
- Enhanced `ContentRenderer` to handle mesh file types with lazy loading for improved performance.
- Updated TypeScript configuration to include types for React Three Fiber.
2025-12-18 11:04:24 -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
0916247e58 clorb ass 2025-12-18 04:12:39 -08:00
Jamie Pine
cd000441fc Update test configurations and enhance test robustness
- Modified CI workflow to run all tests for the `sd-core` package, improving clarity in test execution.
- Updated test attributes to use multi-threading for better performance in `cloud_credentials` tests.
- Enhanced test setup in `key_manager` to avoid database conflicts by using unique directories for each test run.
- Improved assertions in `hlc` tests to ensure correct timestamp and counter behavior.
- Clarified comments in `registry` tests regarding the circular relationship between location and entry.
- Removed outdated blurhash tests to streamline the test suite.
2025-12-18 04:11:33 -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
1bfe9da560 Refactor upsert logic in space entities to use atomic operations
- Replaced existing upsert implementation with atomic upsert for SpaceGroup, SpaceItem, and Space entities to prevent race conditions.
- Updated the database interaction to utilize `on_conflict` for handling conflicts based on UUID, improving data integrity and performance.
2025-12-17 21:53:01 -08:00
Jamie Pine
4a7120e334 Enhance networking event loop to support job activity handling
- Added JOB_ACTIVITY_ALPN to the networking event loop for routing job activity messages.
- Implemented a handler for job activity, improving the event processing capabilities of the network service.
2025-12-17 21:43:12 -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
94ea727010 fix type gen 2025-12-17 18:42:29 -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
97438f815d fix mobile core build 2025-12-15 06:34:31 -08:00
Jamie Pine
51b169b63b Merge branch 'main' into cursor/automatic-library-sync-switch-ecf7 2025-12-15 03:27:02 -08:00
Jamie Pine
b5bef2cf93 Update HLC display format to use hexadecimal representation for timestamp and counter, improving readability and consistency. 2025-12-15 01:33:40 -08:00
Cursor Agent
29d79ee9e7 feat: Add auto-switch for synced libraries
This commit introduces an auto-switch feature for libraries created via sync. Users can now configure whether to automatically switch to a newly synced library. This involves updates to the preferences store, event handling in mobile and tauri apps, and modifications to the core library event system to include a `LibraryCreationSource` enum.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-12-15 08:45:40 +00:00
Jamie Pine
09e088b2b3 Refactor audio processing by replacing FFmpeg subprocess calls with direct library usage for audio sample extraction, as subtitle generation was not working in release builds. Add new audio decoding module and enhance error handling for unsupported formats. 2025-12-15 00:42:29 -08:00
Jamie Pine
828b296adb Update Tauri build script to ensure it continues on failure and add macOS check in entitlement fix script 2025-12-14 21:56:52 -08:00
Jamie Pine
44fff099e4 Merge pull request #2914 from spacedriveapp/build-stuff
Build stuff
2025-12-14 01:00:46 -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
Cursor Agent
e4cd861fc8 Fix: Query actual connection status for devices
Co-authored-by: ijamespine <ijamespine@me.com>
2025-12-13 03:27:29 +00:00
Cursor Agent
d340537d16 Refactor device pairing and connection status logic
Co-authored-by: ijamespine <ijamespine@me.com>
2025-12-13 02:15:25 +00:00
Cursor Agent
241c76d69b Refactor: Use canonical Device domain model everywhere
Co-authored-by: ijamespine <ijamespine@me.com>
2025-12-13 02:04:22 +00:00
Cursor Agent
c171c087c3 feat: Emit device state change events
Connects the device registry to the event bus to emit ResourceChanged events, enabling UI reactivity for device status updates.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-12-13 01:48:22 +00:00
Cursor Agent
d90597bace Refactor: Use EventEmitter for resource change events
This commit refactors the codebase to use the EventEmitter trait for emitting resource change events. This provides a more consistent and centralized way to handle UI updates and cache invalidation across the application.

Key changes include:

- **Introduction of `EventEmitter` trait:** A new trait `EventEmitter` is introduced to standardize the emission of `ResourceChanged` and `ResourceDeleted` events.
- **Domain resource implementations:** Domain resource structs (e.g., `Device`, `Location`, `Library`, `Space`, `SpaceGroup`, `SpaceItem`, `Volume`, `File`) now implement methods to emit these events directly.
- **Removal of manual event serialization:** Many parts of the codebase previously manually serialized resource data and emitted events. This is now replaced by calls to the `EventEmitter` methods.
- **Simplification of `ops` modules:** `ops` modules related to libraries, locations, spaces, and volumes have been updated to leverage the new `EventEmitter` pattern.
- **Update to `Specta` derive:** Added `specta::Type` derive to `Device` and `OperatingSystem` for improved type introspection.
- **`Identifiable` implementation for `Device` and `Tag`:** Added `from_ids` implementations for `Device` and `Tag` to support normalized cache loading.
- **`LibraryInfoOutput` re-export:** `LibraryInfoOutput` is now a re-export of the `domain::Library` type, simplifying the output structure.
- **`LocationInfo` removal:** The `LocationInfo` struct has been removed as `domain::Location` is now used directly for event payloads.

This refactoring aims to improve code maintainability, reduce boilerplate, and ensure a more robust event handling system.

Co-authored-by: ijamespine <ijamespine@me.com>
2025-12-13 01:37:06 +00:00
Cursor Agent
0a1e91ea75 Refactor resource registry to use inventory crate
Co-authored-by: ijamespine <ijamespine@me.com>
2025-12-13 01:03:26 +00:00
Cursor Agent
f6a97509d2 Checkpoint before follow-up message
Co-authored-by: ijamespine <ijamespine@me.com>
2025-12-13 00:42:36 +00:00
Jamie Pine
832428c8ac Wire up daemon for Tauri bundler validation 2025-12-12 16:23:39 -08:00
Jamie Pine
dc9d1a75a5 Update ARM flags and gate whisper-rs by OS 2025-12-11 13:44:18 -08:00
Jamie Pine
d9f9227230 Update whisper-rs to 0.15.1 with metal feature
Bump whisper-rs to 0.15.1 and enable the metal feature Update Cargo.lock
to reflect the dependency change
2025-12-11 12:30:40 -08:00
Jamie Pine
651e9bae46 Refactor and improve code clarity across multiple files
- Simplified the timeout handling in `is_daemon_running` for better readability.
- Updated type definitions in the macOS Tauri library for clarity.
- Reformatted JSON configuration for better structure and readability.
- Changed function signatures in `files.rs` and `server.rs` to use `Path` instead of `PathBuf` for consistency.
- Enhanced error handling and argument passing in various functions for improved clarity.
- Added `#[allow(dead_code)]` annotations to unused functions in several modules to suppress warnings.
- Improved the display string methods in `volume.rs` and `pairing/types.rs` for better performance and clarity.
2025-12-10 15:08:46 -08:00
Jamie Pine
e5b1737caf clippy moment 2025-12-10 14:27:29 -08:00
Jamie Pine
a91c76c147 Rust fmt + fix CI xtask command 2025-12-10 14:09:46 -08:00
tembo[bot]
5d980257a0 refactor(pairing): Remove auto-accept option and related code 2025-12-10 21:20:41 +00:00
Jamie Pine
64a5894997 Refactor volume management and enhance asset handling
- Updated volume-related structures and database entities to improve indexing and retrieval efficiency.
- Enhanced migration scripts to support new indexing statistics for volumes.
- Refactored asset imports and SVG handling across various components for better organization and performance.
- Improved file operation modals and explorer components for a more intuitive user experience.
- Streamlined QuickPreview and video player components to optimize rendering and interaction.
2025-12-10 09:00:44 -08:00
Jamie Pine
3f98961b44 Refactor file query handling to improve database lookup and fallback mechanisms
- Enhanced the `FileByIdQuery` and `FileByPathQuery` implementations to first check the database for file entries, ensuring accurate retrieval as the primary source of truth.
- Introduced a fallback mechanism to utilize an ephemeral index if the file is not found in the database, improving resilience and performance.
- Updated the logic for processing content identities, media data, and sidecars, ensuring efficient data loading and handling.
- Added context-aware comments to clarify the purpose of key code sections, enhancing maintainability and readability.
2025-12-09 21:42:02 -08:00
Jamie Pine
0bae97746a Add EventBuffer for handling event subscriptions and race conditions
- Introduced a new EventBuffer struct to buffer recent events and manage time-based eviction.
- Implemented methods for adding events, retrieving matching events based on filters, and cleaning up expired events.
- Integrated EventBuffer into the RpcServer to handle subscription race conditions by replaying buffered events to new subscribers.
- Added periodic cleanup task for the event buffer to prevent unbounded memory growth.
- Included unit tests to verify buffer size limits, time-based cleanup, and event filtering functionality.
2025-12-09 19:41:23 -08:00
Jamie Pine
34a00c152a Refactor file path handling and enhance query options in useNormalizedQuery
- Updated the logic in `File` to build `SdPath` using Physical paths for newly created files without a content_id, improving resource management.
- Refactored `useNormalizedQuery` hook to enhance type safety and maintainability, ensuring better handling of query options and event subscriptions.
- Improved event handling for resource changes, ensuring accurate updates to the query cache based on resource events.
2025-12-09 18:41:40 -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