Skip to content

Sort activity tasks by progress#655

Open
chrisbrummel wants to merge 3 commits into
ruddarr:developfrom
chrisbrummel:pr-activity-progress-sort
Open

Sort activity tasks by progress#655
chrisbrummel wants to merge 3 commits into
ruddarr:developfrom
chrisbrummel:pr-activity-progress-sort

Conversation

@chrisbrummel

Copy link
Copy Markdown

Summary

  • Adds Progress as an Activity sort option using the gauge icon.
  • Sorts queue items by download progress while keeping actively downloading tasks ahead of import-pending and other non-downloading states.
  • Uses a shared progress fraction helper for task display and sorting.

Testing

  • Built successfully with xcodebuild -project Ruddarr.xcodeproj -scheme Ruddarr -configuration Debug -destination id=0FEADBED-766F-4EEB-A07B-FC28167F9428 -derivedDataPath ./DerivedData-ProgressSortPR -skipPackagePluginValidation build.
  • Tested in the iOS simulator with mock queue data; demo mode is not included in this branch.

@tillkruss tillkruss self-assigned this Jun 9, 2026

@tillkruss tillkruss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you explain how you use this or what problem it's solving for you?

I usually see 2 items at most in my queue and they finish in less than a minute.

@chrisbrummel

chrisbrummel commented Jun 10, 2026 via email

Copy link
Copy Markdown
Author

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “Progress” sort option to the Activity queue, including a shared progress fraction helper on QueueItem, and updates sorting behavior so actively-downloading items remain prioritized while sorting by progress.

Changes:

  • Add byProgress as a queue sort option (UI label + comparator).
  • Introduce QueueItem.progressFraction and use it for both display and sorting.
  • Centralize queue sorting direction handling via QueueSort.isOrderedBefore (removes post-sort reversing in ActivityView).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
Ruddarr/Views/ActivityView.swift Switches queue sorting to use QueueSort.isOrderedBefore and removes manual reversal.
Ruddarr/Views/Activity/QueueSort.swift Adds byProgress sort option and implements progress-aware ordering that prioritizes active downloads.
Ruddarr/Views/Activity/ActivityView+Toolbar.swift Sets default sort direction for the new Progress option.
Ruddarr/Models/Queue/QueueItem.swift Adds progressFraction helper and updates progress label logic to use it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Ruddarr/Models/Queue/QueueItem.swift
tillkruss and others added 2 commits June 24, 2026 11:46
Signed-off-by: Till Krüss <tillkruss@users.noreply.github.com>

@tillkruss tillkruss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

have a look at this new logic and lmk if that works for you

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