-
Notifications
You must be signed in to change notification settings - Fork 0
Add MTP feature #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Phase 1 foundation for Android device support: - Add mtp-rs dependency (local path, macOS only) - Create mtp module with types.rs and discovery.rs - Add list_mtp_devices Tauri command - Add TypeScript wrapper for frontend - Add Linux stubs for E2E testing compatibility - Update cargo deny config for local path deps
Phase 2 implementation: - Add MtpConnectionManager with global device registry - Add connect_mtp_device, disconnect_mtp_device, get_mtp_device_info commands - Add macOS ptpcamerad workaround with ioreg-based detection - Add PtpcameradDialog with Terminal command and copy button - Add TypeScript wrappers and event listeners for MTP errors - Wire up error dialog in main layout
- Show error toasts when delete, rename, or new folder operations fail - Clarify that cancel stops after current file (MTP can't abort in-flight) - Show feedback when MTP-to-MTP copy is attempted (not supported) - Replace emoji icons with SVG folder and file icons
- Before this point, it was actually untested by a human and a real device. - On new device detection, now we're auto-adding it to the volume selector. On disconnection, removing it. It's very smooth now. - Listing directories too. But copy and other commands haven't been tested.
The first one was a throwaway implementation. Now we're integrating it with the real views. Listing looks and feels very nice now!
- Add rename() method to Volume trait with AlreadyExists error variant - Implement create_file, create_directory, delete, rename in LocalPosixVolume - Add rename() to MtpVolume using connection_manager - Update path_exists and create_directory commands to accept optional volume_id parameter and route through VolumeManager - Update TypeScript bindings with optional volumeId (backward compatible) This enables MTP volumes to use the same commands as local volumes for basic file operations like mkdir and path checking.
- Fix connection issues - Remove redundant MCP-specific copy dialog - Fix bug that listed devices by the wrong name - Make listing work flawlessly - Fix copying, now it works both FROM and TO MTP devices - Add file system watching - Add debug logging
Although inconvenient and doesn't lean into the ways we have for this
Streams! This prepares features like S3Bucket→FTP. Also in this commit: handle read-only drives and display a nice error message
- Tried to make this more generic so other volume types can use it too - Also fixed listing other volumes properly
Before: if a device was connected, disconnected, then reconnected, the user got a weird error. Now it just reconnects.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Can connect to Android phones, Kindles, cameras, etc.
Thoroughly tested and ready to merge.