From 147a09035ce71a7ba64f13bc30c63a2685c3b810 Mon Sep 17 00:00:00 2001 From: Antti Kettunen Date: Sun, 26 Apr 2026 21:11:22 +0300 Subject: [PATCH] Remove stale initial page rendering hooks - Drop unused _resolve_webui_initial_* helpers from web_server.py. - Remove template-side initial_nav_page and initial_client_page conditionals. - Keep Vite asset injection and runtime page activation in the client. --- web_server.py | 41 ----------------------------------------- webui/index.html | 30 +++++++++++++++--------------- 2 files changed, 15 insertions(+), 56 deletions(-) diff --git a/web_server.py b/web_server.py index 05397af1..36d18651 100644 --- a/web_server.py +++ b/web_server.py @@ -380,47 +380,6 @@ _webui_vite_dev = os.environ.get('SOULSYNC_WEBUI_VITE_DEV', '').lower() in ('1', _webui_vite_url = os.environ.get('SOULSYNC_WEBUI_VITE_URL', 'http://127.0.0.1:5173').rstrip('/') _webui_vite_base = '/static/dist/' -_webui_client_route_map = { - '/dashboard': 'dashboard', - '/sync': 'sync', - '/search': 'search', - '/discover': 'discover', - '/playlist-explorer': 'playlist-explorer', - '/watchlist': 'watchlist', - '/wishlist': 'wishlist', - '/automations': 'automations', - '/active-downloads': 'active-downloads', - '/library': 'library', - '/tools': 'tools', - '/artist-detail': 'artist-detail', - '/stats': 'stats', - '/import': 'import', - '/settings': 'settings', - '/issues': 'issues', - '/help': 'help', - '/hydrabase': 'hydrabase', -} -_webui_react_page_ids = {'issues'} - - -def _resolve_webui_initial_page(pathname: str) -> str | None: - normalized = pathname.rstrip('/') or '/' - return _webui_client_route_map.get(normalized) - - -def _resolve_webui_initial_nav_page(page_id: str | None) -> str | None: - if page_id is None: - return None - if page_id == 'artist-detail': - return 'library' - return page_id - - -def _resolve_webui_initial_react_page(page_id: str | None) -> str | None: - if page_id in _webui_react_page_ids: - return page_id - return None - def _should_serve_webui_spa(pathname: str) -> bool: normalized = pathname.rstrip('/') or '/' excluded_exact_paths = {'/callback', '/status'} diff --git a/webui/index.html b/webui/index.html index e27433eb..3d7fb5dc 100644 --- a/webui/index.html +++ b/webui/index.html @@ -202,7 +202,7 @@ Sync - @@ -214,42 +214,42 @@ Explorer - - - - - - - - - @@ -1851,7 +1851,7 @@ -
+
-
+
@@ -6171,7 +6171,7 @@ -
+
@@ -6608,7 +6608,7 @@ -
+
@@ -6724,7 +6724,7 @@ -
+