fix(downloads): harden queue controls and resumable replacement

Prevent queue action clicks from triggering row double-clicks, preserve aria2/yt-dlp resumable sidecars during duplicate replacement, and make aria2 require resume instead of silently restarting.

Add a persisted, accessible Folders collapse control with reduced-motion animation and regression coverage for replacement sidecar handling.

Fixes #11

Fixes #12

Closes #13

Refs #14
This commit is contained in:
NimBold
2026-07-11 20:07:33 +03:30
parent 1922db8ea0
commit 33375df2ff
9 changed files with 182 additions and 19 deletions
+7 -5
View File
@@ -519,8 +519,7 @@ export const AddDownloadsModal = () => {
itemLocation,
finalFile,
platform.os
) &&
download.status !== 'failed'
)
) {
fileExistsInStore = true;
break;
@@ -662,8 +661,7 @@ export const AddDownloadsModal = () => {
itemLocation,
finalFile,
platform.os
) &&
download.status !== 'failed'
)
) {
existingItem = download;
break;
@@ -677,7 +675,11 @@ export const AddDownloadsModal = () => {
if (!existingItem) {
throw new Error(`Cannot replace ${finalFile}: file is not owned by a Firelink download.`);
}
await store.removeDownload(existingItem.id, true);
// Let the backend decide whether resumable sidecars still
// exist after stopping the old transfer. This avoids a race
// where a paused item finishes while the replacement is
// being prepared.
await store.removeDownload(existingItem.id, true, existingItem.status !== 'completed');
}
}
}