Repository navigation
Conversation
A queued download's menu (and the selection's More menu) offers Move up and Move down, which swap its place in line with its neighbour's. Like Start next, it only reorders the waiting: nothing running is paused, downloadsAtOnce still holds, and the new order is saved right away so it survives a restart. At the ends of the queue there's nowhere to go. Refs anmolkapil#197 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The queued downloads in the order they start are now one helper that pump and moveInQueue both use. moveInQueue refuses anything but one place either way, since it arrives over IPC. A scheduled queue reordered by Move down keeps that order through a crash and restart.
This branch has not been deployed
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
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.
What and why
Fixes #197.
A queued download's right-click menu (and the selection toolbar's More menu) now offers Move up and Move down, so you can change which download starts next without removing and re-adding anything. The updated order decides which one starts when a place is free.
downloadsAtOncestill holds, and the new order is saved right away so it survives a restart. At either end of the queue it does nothing.moveInQueueIPC channel, thenDownloadManager.moveInQueue, which checks it was asked for one place either way. The "queued, in start order" sort thatpump()used is now a small helper (queuedInOrder) shared with it. The two actions go through the shared actions list, so the menu, toolbar and a download's own screen agree.How I tested it
Windows 11, Plexo built from this branch.
npm run lint(0 errors),npm run typecheck, and Prettier on the changed files.e2e/moveInQueue.spec.tsdrives the real app through the right-click menu withdownloadsAtOnce: 1and three local downloads: Move up and Move down change the order shown, doing it at either end changes nothing, the running download isn't paused, and the one moved to the front is the next to start once the running download finishes. It passes.e2e/scheduleQueue.spec.ts: with the schedule closed, Move down reorders three waiting downloads, the app is killed and relaunched, and the new order still decides which starts first when the window opens. It shares a helper with the existing Start next restart test.e2e/downloadActions.spec.tsupdated for the new actions (queued only, one at a time, under More on the toolbar), plus the existingstartNext.spec.ts. All pass.npm run test:e2e:smoke: 165 passed, 13 skipped, 1 failed. The failure isui.spec.ts"minimum window keeps download controls and a network row in view", which fails the same way on a cleanmainon my machine.npm run dev) with one download running and two torrents queued: Move up and Move down from the right-click menu change the order shown (screenshots below). Not tried on macOS or Linux.Right-clicking a queued download shows the new Move up and Move down entries. With one download running and two queued, Move down on the first queued one (arm64) puts the 24.04 download ahead of it: