Skip to content

Conversation

@Max-7
Copy link
Contributor

@Max-7 Max-7 commented Dec 16, 2025

Closes #9881

This is a total rework of file operations: how files are imported, copied, moves, restored and downloaded, but also how those operations are displayed in the GUI.

A few goals:

  • make those operations more resilient to errors: what happens if you import 56 files and it fails when importing the 54th?
  • aggregate by operations instead of files: importing 50 files should be one operation, not 50
  • make operations work on folders too, not only files: if copying a folder where a folder with the same name already exists, we need to be able to name the copy folder (2) instead of merging the two folders

All those goals are achieved, and then more:

  • for all operations, we now have different options on how to handle duplicates: ignore, replace, or rename
  • operations work on temporary files that are renamed at the very end. This makes a huge difference on stability and in controlling the state of the workspace
  • the system for cancelling operation has been reworked, way better now
  • everything has been refactored, gone is the >1k lines file and it should be more readable overall
  • should be more optimized (though I have not benchmarked it, just intuition)
  • the "import menu" is less messy (importing 10k files results in only one operation)

It does come with some drawbacks:

  • when importing X files at the same time, the files will be imported sequentially instead of some in parallel. We can do multiple imports at the same time though, but they have to be different user actions
  • files won't appear in the folder over time, they'll be shown as importing until the whole operation is finished

And a few things that weren't changed because of complexity:

  • importing a folder still results in files being imported, so if a folder is created and the operation is cancelled, the folder will still be present. Because of how many different APIs exist for file import, it's too complicated to solve this problem.

@Max-7 Max-7 force-pushed the ms-file-operations-v2 branch from 44c4315 to a3a87c1 Compare January 5, 2026 12:39
@Max-7 Max-7 mentioned this pull request Jan 5, 2026
4 tasks
@Max-7 Max-7 force-pushed the ms-file-operations-v2 branch from c03860f to dfb0c79 Compare January 16, 2026 09:51
@Max-7 Max-7 marked this pull request as ready for review January 16, 2026 09:54
@Max-7 Max-7 requested a review from a team as a code owner January 16, 2026 09:54
@Max-7 Max-7 force-pushed the ms-file-operations-v2 branch 4 times, most recently from f49aa53 to 310cb99 Compare January 20, 2026 09:37
Copy link
Contributor

@Ironicbay Ironicbay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, this is very impressive. The imports are considerably faster and the system is robust and handles many cases extremely well, congrats!!


When having a large number of current operations (in my case 200 copies and 40 imports), the GUI slows down considerably. This was tested on our testbed on the web client, what I observed:

  • Navigating through the workspace works even if slow
  • I can create other workspaces and start operations there
  • Any other page breaks:
    • Devices page shows no device
    • Authentication page fails to retrieve information
    • Users, Invitations and Information pages are blank

Relevant output:

chunk-6T6A37T5.js?v=2199de53:1462 Uncaught (in promise) Error: Missing required param "handle"
    at Object.stringify (chunk-6T6A37T5.js?v=2199de53:1462:22)
    at Object.resolve (chunk-6T6A37T5.js?v=2199de53:1628:22)
    at resolve (chunk-6T6A37T5.js?v=2199de53:2056:34)
    at pushWithRedirect (chunk-6T6A37T5.js?v=2199de53:2116:46)
    at push (chunk-6T6A37T5.js?v=2199de53:2088:12)
    at Object.replace (chunk-6T6A37T5.js?v=2199de53:2091:12)
    at navigateTo (navigation.ts:29:18)
    at switchPage (MyProfilePage.vue:374:9)

I don't know how relevant this is considering I've been torturing the poor thing for hours at this point.


Also, not sure if this is relevant on dev mode, but there's no warning when trying to close the page while operations are running.

"importMultiplesFiles": "Importing {count}",
"importFilesAction": "Import files",
"importFolderAction": "Import a folder",
"title": "Background tasks",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not rename the title to File operations / Opérations de fichiers? Background tasks feels broader than this.

If such a change is made, we would have to switch from Task to Operation in other relevant locales.

Copy link
Contributor

@fabienSvtr fabienSvtr Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File operation seems to be a dev term. I prefer to use Background tasks instead.

"inProgress": "En cours",
"done": "Terminés",
"failed": "Échoués"
"failed": "Échoués",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"failed": "Échoués",
"failed": "Échouées",

    Co-Authored-By: fabienSvstr <fabien.sevestre@scille.fr>
@Max-7 Max-7 force-pushed the ms-file-operations-v2 branch from 8325351 to da4459d Compare January 23, 2026 06:49
@Max-7 Max-7 added this pull request to the merge queue Jan 23, 2026
Merged via the queue into master with commit 0f84b97 Jan 23, 2026
16 checks passed
@Max-7 Max-7 deleted the ms-file-operations-v2 branch January 23, 2026 07:48
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.

Rework file operations

4 participants