Skip to content

fix(client): reflect file priority changes in torrent details list - #1352

Open
tribes wants to merge 2 commits into
jesec:masterfrom
tribes:fix/file-priority-ui
Open

fix(client): reflect file priority changes in torrent details list#1352
tribes wants to merge 2 commits into
jesec:masterfrom
tribes:fix/file-priority-ui

Conversation

@tribes

@tribes tribes commented Jul 27, 2026

Copy link
Copy Markdown

Description

Setting a priority on a multi-file selection in the torrent details Contents tab applied on the
backend, but the file list kept showing the old priorities. TorrentContents fetches contents once
and never updated them after a change; PriorityMeter only reads level on mount; and Select
doesn't re-fire for an unchanged value, so re-applying the same priority did nothing at all.

Adds selectionTree.applyPriority() and a setPriority() in TorrentContents that updates
contents and itemsTree alongside the request, threaded down to the per-file meters via
onPriorityChange. The meter's key now includes file.priority, and the <Select> resets after
each apply.

Types of changes

  • Breaking change (changes that break backward compatibility of public API or CLI - semver MAJOR)
  • New feature (non-breaking change which adds functionality - semver MINOR)
  • Bug fix (non-breaking change which fixes an issue - semver PATCH)

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.53%. Comparing base (914a82b) to head (ed261b7).
⚠️ Report is 150 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1352      +/-   ##
==========================================
+ Coverage   56.05%   56.53%   +0.48%     
==========================================
  Files          96       95       -1     
  Lines        4223     4272      +49     
  Branches      860      862       +2     
==========================================
+ Hits         2367     2415      +48     
+ Misses       1655     1649       -6     
- Partials      201      208       +7     

☔ View full report in Codecov by Harness.
📢 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.

@trim21

trim21 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

I would prefer the action to trigger a data reload after it complete the requests to avoid the failed request cause a out-of-sync between real state and UI

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.

2 participants