From 0132d879c07a431d2215581aa4ddc22dbc0cf962 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Tue, 17 Nov 2026 08:05:37 -0500 Subject: [PATCH] fix: a tab for a channel or note that no longer exists closes instead of staying on a spinner (#34294) --- src/lib/components/chat/Tabs.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/components/chat/Tabs.svelte b/src/lib/components/chat/Tabs.svelte index 3b3bbae6f3..34dfcd6964 100644 --- a/src/lib/components/chat/Tabs.svelte +++ b/src/lib/components/chat/Tabs.svelte @@ -711,8 +711,13 @@ } else openPanel(createPageTab(request)); }; const navigatePageTab = async (id: string, href: string) => { - if (!((await pageViews[id]?.requestClose()) ?? true)) return; const url = new URL(href, location.origin); + if (url.pathname === '/' && !url.search) { + await closeTab(id); + focusMainChat(); + return; + } + if (!((await pageViews[id]?.requestClose()) ?? true)) return; if (url.pathname === '/' || url.pathname.startsWith('/c/')) { openPageTab({ href, label: '' }); } else if (viewEntry) updateViewTab(viewEntry, id, { href });