-
Notifications
You must be signed in to change notification settings - Fork 10
[CP-3907][App Refactor][Kompakt] Manage Files - upload - mtp - implementation (4) #2745
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
Conversation
✅ Deploy Preview for mudita-center-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## CP-3907-app-mtp-moved #2745 +/- ##
========================================================
Coverage ? 56.57%
========================================================
Files ? 52
Lines ? 1073
Branches ? 199
========================================================
Hits ? 607
Misses ? 445
Partials ? 21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f3e2d69 to
f10c3b0
Compare
bc3bd25 to
3a93583
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements MTP (Media Transfer Protocol) file upload functionality for the Kompakt device's file management interface. The implementation includes automatic fallback between MTP and Serial transfer modes, progress tracking, and user warnings about applications that may interfere with file transfers.
Key Changes
- Added MTP upload functionality with automatic mode switching between MTP and Serial protocols
- Implemented transfer progress tracking and user warnings for potentially interfering applications
- Created new utility functions for platform detection and USB ID mapping
Reviewed Changes
Copilot reviewed 47 out of 49 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
libs/devices/harmony/feature/src/lib/actions/upload-files.ts |
Added abort controller parameter to file metadata reading |
libs/devices/common/ui/src/lib/views/manage-files/manage-files.messages.ts |
Added translation keys for transfer progress warnings |
libs/devices/common/ui/src/lib/views/manage-files/manage-files.const.ts |
Defined platform-specific lists of potentially interfering applications |
libs/devices/common/ui/src/lib/views/manage-files/manage-files-transfer-flow/use-manage-files-transfer-flow/use-manage-files-transfer-flow.ts |
Added transfer mode state tracking and mode change callback |
libs/devices/common/ui/src/lib/views/manage-files/manage-files-transfer-flow/manage-files-transfer-progress-warning.tsx |
Created warning component for displaying interfering apps during transfers |
libs/devices/common/ui/src/lib/views/manage-files/manage-files-transfer-flow/manage-files-transfer-progress-modal.tsx |
Added conditional rendering of progress warning in transfer modal |
libs/devices/common/ui/src/lib/views/manage-files/manage-files-transfer-flow/manage-files-transfer-flow.tsx |
Integrated transfer mode state and conditional warning display |
libs/devices/common/models/src/lib/transfer-files.ts |
Added type definitions for MTP transfer results and file data |
libs/devices/api-device/routes/src/lib/screens/mc-file-manager/device-manage-files.screen.tsx |
Removed hardcoded Serial transfer mode to enable automatic mode switching |
libs/devices/api-device/feature/src/lib/actions/transfer-files/transfer-files.ts |
Added device parameter to MTP watcher factory |
libs/devices/api-device/feature/src/lib/actions/transfer-files/mtp-watcher.ts |
Implemented MTP connection checking logic using device preparation |
libs/devices/api-device/feature/src/lib/actions/mtp-upload-files/mtp-upload-files.ts |
Implemented MTP upload file routing logic |
libs/devices/api-device/feature/src/lib/actions/mtp-upload-files/mtp-upload-files-from-path.ts |
Created MTP upload implementation with file metadata reading |
libs/devices/api-device/feature/src/lib/actions/mtp-shared/prepare-mtp-transfer.ts |
Added MTP device preparation and storage retrieval logic |
libs/devices/api-device/feature/src/lib/actions/mtp-shared/mtp-transfer-files.ts |
Core MTP transfer implementation with progress tracking |
libs/devices/api-device/feature/src/lib/actions/mtp-shared/mtp-helpers.ts |
Helper functions for MTP path handling and error result building |
libs/app-utils/renderer/src/lib/read-file-transfer-metadata-list.ts |
Added abort controller support to file metadata reading |
libs/app-utils/common/src/slice-segments.ts |
Created utility for slicing path segments |
libs/app-utils/common/src/platform.ts |
Added platform detection utility |
libs/app-utils/common/src/map-to-core-usb-id.ts |
Created USB ID mapper for Windows device identification |
libs/app-mtp/renderer/src/lib/app-mtp.ts |
Created renderer-side MTP API wrapper |
libs/app-mtp/models/src/lib/app-mtp-ipc-events.ts |
Defined IPC event constants for MTP operations |
libs/app-mtp/main/src/lib/init-app-mtp.ts |
Implemented IPC handlers for MTP operations |
libs/app-mtp/main/src/lib/app-mtp.preload.ts |
Created preload script for MTP API exposure |
libs/app-localize/utils/src/lib/locales/en-US.json |
Added English translations for progress warnings |
apps/app/src/preload/api.ts |
Exposed MTP API to renderer process |
apps/app/src/main/init-app-libs.ts |
Initialized MTP service in main process |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libs/devices/api-device/feature/src/lib/actions/mtp-shared/mtp-transfer-files.ts
Outdated
Show resolved
Hide resolved
...lib/views/manage-files/manage-files-transfer-flow/manage-files-transfer-progress-warning.tsx
Show resolved
Hide resolved
| "manageFiles.progressWarning.firstLineText": "Some apps slow down transfer, it’s better", | ||
| "manageFiles.progressWarning.secondLineText": "to close them if you have them open.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest a single line message with \n for separating lines.
"Some apps slow down transfer, it’s better\nto close them if you have them open.",
JIRA Reference: CP-3907
📝 Description ️
💪 Checklist before requesting a review - nice to have
❗ Checklist before merging a pull request