diff --git a/webui/static/search.js b/webui/static/search.js index 7a2214fc..cd27d34e 100644 --- a/webui/static/search.js +++ b/webui/static/search.js @@ -1190,9 +1190,7 @@ async function loadInitialData() { if (route?.kind === 'react') { showReactHost(targetPage); setActivePageChrome(targetPage); - if (window.location.pathname !== route.path) { - history.replaceState({ page: targetPage }, '', route.path); - } + // Keep nested react-tab URLs like /import/auto or /import/singles intact. return; } diff --git a/webui/tests/shell-routes.smoke.spec.ts b/webui/tests/shell-routes.smoke.spec.ts index f2854c0c..818dd925 100644 --- a/webui/tests/shell-routes.smoke.spec.ts +++ b/webui/tests/shell-routes.smoke.spec.ts @@ -60,6 +60,10 @@ function expectedUrlPattern(path: string, pageId: ShellPageId): RegExp { return /\/stats(?:\?range=7d)?$/; } + if (pageId === 'import') { + return /\/import\/album$/; + } + return new RegExp(`${path.replace('/', '\\/')}$`); }