From cc96af2cb173e52dad939dfb45e2784d862ad023 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Fri, 20 Mar 2026 22:52:49 -0700 Subject: [PATCH] Fix auto-groups state cleanup on search reset and manual search Clear _autoGroupFilePaths and re-show groups section on album search reset. Hide auto-groups section during manual search. --- webui/static/script.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webui/static/script.js b/webui/static/script.js index c7bcc64c..e5e216f9 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -54678,6 +54678,8 @@ async function importPageSearchAlbum() { if (!query) return; document.getElementById('import-page-suggestions').style.display = 'none'; + const groupsEl = document.getElementById('import-page-auto-groups'); + if (groupsEl) groupsEl.style.display = 'none'; const grid = document.getElementById('import-page-album-results'); grid.innerHTML = '
Searching...
'; @@ -54974,6 +54976,7 @@ function importPageResetAlbumSearch() { importPageState.albumData = null; importPageState.matchOverrides = {}; importPageState.tapSelectedChip = null; + importPageState._autoGroupFilePaths = null; document.getElementById('import-page-album-search-section').classList.remove('hidden'); document.getElementById('import-page-album-match-section').classList.add('hidden'); @@ -54983,7 +54986,12 @@ function importPageResetAlbumSearch() { document.getElementById('import-page-album-search-input').value = ''; document.getElementById('import-page-album-clear-btn').classList.add('hidden'); + // Re-show auto-groups + const groupsEl = document.getElementById('import-page-auto-groups'); + if (groupsEl) groupsEl.style.display = ''; + // Refresh suggestions & staging + importPageLoadAutoGroups(); importPageLoadSuggestions(); importPageRefreshStaging(); }