fix(webui): preserve import tab refresh URLs

- stop the legacy shell bootstrap from collapsing /import/auto and /import/singles back to the import root on reload\n- update the shell route smoke test to expect the canonical /import/album redirect for the bare import page
pull/686/head
Antti Kettunen 1 week ago
parent ae0711f464
commit b78350a3e2
No known key found for this signature in database
GPG Key ID: C6B2A3D250359BD7

@ -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;
}

@ -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('/', '\\/')}$`);
}

Loading…
Cancel
Save