From 6992e2e5b5c9e36c1e4389f17f1924cdbe5dcb45 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:22:49 -0700 Subject: [PATCH] Rename Search page id from 'downloads' to 'search', bump to 2.43 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 3b of the Search/Artists unification. The Search page's internal id was 'downloads', which clashed with the actual Downloads page (id 'active-downloads') and confused anyone reading the code. Renamed to 'search' across HTML, navigation, DOM selectors, and the deep-link route list. Backwards compat: navigateToPage('downloads') aliases to 'search' at the top of the function; /downloads URL still serves index.html and the client router resolves the page correctly; profile ACL checks accept both 'search' and 'downloads' so existing profiles with 'downloads' in allowed_pages keep working without migration. Sidebar label unchanged. Zero visual change — pure internal tidy. --- tests/test_spa_deep_linking.py | 2 +- web_server.py | 15 +++++++++++++-- webui/index.html | 8 ++++---- webui/static/downloads.js | 13 +++++++------ webui/static/helper.js | 7 ++++++- webui/static/init.js | 19 ++++++++++++++----- webui/static/search.js | 10 +++++----- 7 files changed, 50 insertions(+), 24 deletions(-) diff --git a/tests/test_spa_deep_linking.py b/tests/test_spa_deep_linking.py index cd28f096..38a90534 100644 --- a/tests/test_spa_deep_linking.py +++ b/tests/test_spa_deep_linking.py @@ -68,7 +68,7 @@ class TestSpaRoutes: """Deep-link paths for valid client pages should serve index.html.""" @pytest.mark.parametrize("page", [ - 'dashboard', 'sync', 'downloads', 'discover', 'artists', + 'dashboard', 'sync', 'search', 'downloads', 'discover', 'artists', 'automations', 'library', 'import', 'settings', 'help', 'issues', 'stats', 'watchlist', 'wishlist', 'active-downloads', 'artist-detail', 'playlist-explorer', 'hydrabase', 'tools', diff --git a/web_server.py b/web_server.py index 40052fc3..3c1d1b35 100644 --- a/web_server.py +++ b/web_server.py @@ -37,7 +37,7 @@ _log_dir = Path(_log_path).parent logger = setup_logging(_log_level, _log_path) # App version — single source of truth for backup metadata, version-info endpoint, etc. -_SOULSYNC_BASE_VERSION = "2.42" +_SOULSYNC_BASE_VERSION = "2.43" def _build_version_string(): """Append short commit hash to version when available (e.g. 2.35+abc1234).""" @@ -320,7 +320,7 @@ def get_spotify_client_for_profile(profile_id=None): return spotify_client # Fall back to global # Valid page IDs for profile permission validation -VALID_PAGE_IDS = {'dashboard', 'sync', 'downloads', 'discover', 'artists', 'automations', 'library', 'import', 'settings', 'help'} +VALID_PAGE_IDS = {'dashboard', 'sync', 'search', 'downloads', 'discover', 'artists', 'automations', 'library', 'import', 'settings', 'help'} def check_download_permission(): """Check if current profile has download permission. Returns error response or None if allowed.""" @@ -22809,6 +22809,17 @@ def get_version_info(): "title": "What's New in SoulSync", "subtitle": f"Version {SOULSYNC_VERSION} — Latest Changes", "sections": [ + { + "title": "Search Page Renamed to /search", + "description": "The Search page's internal id is now 'search' instead of 'downloads', which no longer conflicts with the real Downloads page. URL /downloads still works for bookmarks and external links", + "features": [ + "• Sidebar label unchanged (still reads 'Search') — no visual change", + "• URL now /search; /downloads stays as an alias so no existing link breaks", + "• DOM id renamed to #search-page; all internal references follow", + "• Profile ACL stored as 'search' going forward; existing profiles with 'downloads' in allowed_pages still resolve through a legacy-compat check", + "• Phase 3b of the Search/Artists unification project", + ], + }, { "title": "Search Source Picker — Pick Where You're Searching", "description": "The Search page's Enhanced/Basic toggle is replaced by a single 'Search from' dropdown so you can explicitly pick which source to query instead of fanning out to every provider", diff --git a/webui/index.html b/webui/index.html index 08f4b85c..8e196335 100644 --- a/webui/index.html +++ b/webui/index.html @@ -98,7 +98,7 @@ - + @@ -113,7 +113,7 @@