Skip to content

Conversation

@dkarski
Copy link
Member

@dkarski dkarski commented Nov 14, 2025

JIRA Reference: CP-3907

📝 Description ️

💪 Checklist before requesting a review - nice to have

  • getState function in async thunk actions is correctly typed
  • redux selectors are used in components / prop drilling is reduce

❗ Checklist before merging a pull request

  • change went through the QA process
  • translations are updated in dedicated application
  • CHANGELOG.md is updated

@dkarski dkarski self-assigned this Nov 14, 2025
@netlify
Copy link

netlify bot commented Nov 14, 2025

Deploy Preview for mudita-center-storybook ready!

Name Link
🔨 Latest commit 3faf909
🔍 Latest deploy log https://app.netlify.com/projects/mudita-center-storybook/deploys/69203bbf2da24a0008815a35
😎 Deploy Preview https://deploy-preview-2745--mudita-center-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dkarski dkarski temporarily deployed to development-next November 14, 2025 13:18 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 17.88618% with 101 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (CP-3907-app-mtp-moved@f10c3b0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...e/src/lib/actions/mtp-shared/mtp-transfer-files.ts 1.69% 58 Missing ⚠️
...ons/mtp-upload-files/mtp-upload-files-from-path.ts 11.11% 16 Missing ⚠️
...src/lib/actions/mtp-shared/prepare-mtp-transfer.ts 7.14% 13 Missing ⚠️
.../feature/src/lib/actions/mtp-shared/mtp-helpers.ts 50.00% 4 Missing ⚠️
...c/lib/actions/mtp-upload-files/mtp-upload-files.ts 33.33% 4 Missing ⚠️
...ture/src/lib/actions/transfer-files/mtp-watcher.ts 42.85% 4 Missing ⚠️
libs/app-utils/common/src/map-to-core-usb-id.ts 90.00% 0 Missing and 1 partial ⚠️
...rial-upload-files/serial-upload-files-from-path.ts 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkarski dkarski force-pushed the CP-3907-app-mtp-moved branch from f3e2d69 to f10c3b0 Compare November 18, 2025 12:35
Copy link
Contributor

Copilot AI left a 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.

@dkarski dkarski temporarily deployed to development-next November 19, 2025 09:32 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 19, 2025 09:32 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 19, 2025 09:32 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 19, 2025 09:32 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 19, 2025 09:32 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 19, 2025 09:32 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 19, 2025 09:32 — with GitHub Actions Inactive
@dkarski dkarski marked this pull request as ready for review November 20, 2025 12:12
@dkarski dkarski requested a review from mkurczewski November 20, 2025 12:13
Comment on lines +363 to +364
"manageFiles.progressWarning.firstLineText": "Some apps slow down transfer, it’s better",
"manageFiles.progressWarning.secondLineText": "to close them if you have them open.",
Copy link
Collaborator

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.",

@dkarski dkarski temporarily deployed to development-next November 21, 2025 10:15 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 21, 2025 10:15 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 21, 2025 10:15 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 21, 2025 10:15 — with GitHub Actions Inactive
@dkarski dkarski temporarily deployed to development-next November 21, 2025 10:15 — with GitHub Actions Inactive
@dkarski dkarski merged commit df9f7b3 into CP-3907-app-mtp-moved Nov 21, 2025
9 of 12 checks passed
@dkarski dkarski deleted the CP-3907-mtp-upload branch November 21, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants