ui: fix routing nits

This commit is contained in:
Aleksander Grygier
2026-08-21 19:05:01 +02:00
committed by GitHub
parent 89776ebfb9
commit 01d0f132fb
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -129,7 +129,7 @@
$effect(() => {
const id = page.params.id ?? (page.route.id === '/(chat)' ? NEW_CHAT_TAB_ID : undefined);
const prev = previousChatId;
const prev = untrack(() => previousChatId);
previousChatId = id;
+3 -2
View File
@@ -3,6 +3,7 @@
import { goto } from '$app/navigation';
import { page } from '$app/state';
import { SearchInput, SidebarNavigationSearchResults } from '$lib/components/app';
import { ROUTES } from '$lib/constants';
import { RouterService } from '$lib/services/router.service';
import { chatStore, conversationsStore, deviceStore } from '$lib/stores';
@@ -20,10 +21,10 @@
});
// Search page is intended for mobile; on desktop the sidebar already exposes
// in-place search, so bounce back to a new-chat tab.
// in-place search, so bounce back to a new-chat tab without a history entry.
$effect(() => {
if (browser && !deviceStore.isMobile) {
conversationsStore.openNewChat();
goto(ROUTES.START, { replaceState: true });
}
});