fix: open settings deep links on client-side navigation and open Add Terminal settings directly (#27552)

This commit is contained in:
G30
2026-07-26 17:26:34 -04:00
committed by GitHub
parent d1aa812d80
commit ef197de0d7
2 changed files with 8 additions and 3 deletions
+7 -1
View File
@@ -199,6 +199,9 @@
const openSettingsFromUrl = async () => {
const requestedSettings = $page.url.searchParams.get('settings');
if (!requestedSettings) {
// Param handled and stripped; allow the same deep link to be
// handled again later in this session.
handledSettingsUrl = '';
return;
}
@@ -382,7 +385,10 @@
loaded = true;
});
$: if (loaded) {
// `$page.url` must be referenced here: `$:` only tracks variables used in
// the statement itself, and reads inside openSettingsFromUrl don't count —
// without it, client-side navigations to `?settings=...` are never handled.
$: if (loaded && $page.url) {
void openSettingsFromUrl();
}