From 2668980872b5577f62dbef5d7479c5ef1ec5d596 Mon Sep 17 00:00:00 2001 From: dev Date: Thu, 25 Jun 2026 22:01:09 +0200 Subject: [PATCH] =?UTF-8?q?feat(ui):=20collapsible=20=E2=93=98=20help,=20r?= =?UTF-8?q?ank-based=20toggle,=20tidier=20quality-profile=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quality-profile settings UI cleanup: - Add the "Rank-based download order" toggle (priority mode). It's hidden when Best quality is active, since that mode always ranks by quality. - Plain-language search-strategy options ("fast" / "thorough"); load + save the new rank_candidates_by_quality flag. - Move the long help texts behind a dim β“˜ icon that sits on the (fixed) label row and toggles a collapsible body below β€” the trigger no longer moves on open. Applied to: search strategy, rank-based order, off-list fallback, AcoustID-verified, and the "How it works" ranked-targets explainer. toggleSettingHelp walks to the next .setting-help-body sibling so it works regardless of wrapper or an in-between control. - Fix the "Search strategy" label: zero the flex-row margin so it aligns with the β“˜, and bump it to 12px/brighter so it doesn't read as dim/undersized. - Remove the duplicate "🎡 Quality Profile" heading inside the tile body. - Replace the inline "Reset to defaults" link with a proper β†Ί button. - Restore the gap between the "Quality priority" label and the target list. Co-Authored-By: Claude Opus 4.8 --- webui/index.html | 141 +++++++++++++++++++++++++-------------- webui/static/settings.js | 27 ++++++++ webui/static/style.css | 72 ++++++++++++++++++++ 3 files changed, 191 insertions(+), 49 deletions(-) diff --git a/webui/index.html b/webui/index.html index 1b83fae9..ca746b10 100644 --- a/webui/index.html +++ b/webui/index.html @@ -5067,7 +5067,6 @@
-

🎡 Quality Profile

@@ -5086,17 +5085,38 @@ πŸ’Ύ Space Saver
-
- Edits you make below are saved per preset β€” switch away and back and - your changes are still there. Use - Reset to defaults - to restore the selected preset's factory settings. +
- +
+ + β“˜ +
+
@@ -5154,45 +5174,82 @@
- - + + -
- Source priority takes the first source in your chain that meets - a target — fast, fewer lookups. Best quality searches - every source for each track, pools the results, and downloads them - best→worst by actual audio quality (source order only breaks ties). Slower and - more API calls, but it won't settle for a passable Soulseek file when HiFi/Qobuz - has a higher-resolution version. Retry budgets are unchanged: a source that spends - its budget is dropped from the whole pool. + +
+ + +
+
+ + β“˜ +
+
- -
- ⚠️ This does not mean "walk down my list" β€” the list already - does that on its own. When on, a file that matches - none of your targets (e.g. a 16-bit FLAC or MP3 when you only listed - 24-bit) is accepted anyway as a last resort. Turn it - off to strictly enforce your list β€” anything off-list is then - quarantined instead of completed. +
+ + β“˜ +
+
diff --git a/webui/static/settings.js b/webui/static/settings.js index 82ae3c3d..f0b324e8 100644 --- a/webui/static/settings.js +++ b/webui/static/settings.js @@ -2001,6 +2001,32 @@ function populateQualityProfileUI(profile) { const searchModeSelect = document.getElementById('quality-search-mode'); if (searchModeSelect) searchModeSelect.value = profile.search_mode === 'best_quality' ? 'best_quality' : 'priority'; + + const rankCandidatesCheckbox = document.getElementById('quality-rank-candidates'); + if (rankCandidatesCheckbox) rankCandidatesCheckbox.checked = profile.rank_candidates_by_quality === true; + + onSearchModeChange(); +} + +// Hide the "rank-based download order" toggle when Best quality is active β€” +// that mode always ranks by quality, so the toggle would be meaningless there. +function onSearchModeChange() { + const mode = document.getElementById('quality-search-mode')?.value; + const group = document.getElementById('quality-rank-candidates-group'); + if (group) group.style.display = mode === 'best_quality' ? 'none' : ''; +} + +// Toggle the collapsible help text below a setting's β“˜ icon. Walks forward from +// the icon's row to the next .setting-help-body sibling, so it works whether the +// body is the immediate next element or sits after a control (e.g. a