diff --git a/tools/ui/src/routes/+layout.svelte b/tools/ui/src/routes/+layout.svelte index fa45ba7933..16adfe3327 100644 --- a/tools/ui/src/routes/+layout.svelte +++ b/tools/ui/src/routes/+layout.svelte @@ -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; diff --git a/tools/ui/src/routes/search/+page.svelte b/tools/ui/src/routes/search/+page.svelte index 0ef2759e75..548b9911a6 100644 --- a/tools/ui/src/routes/search/+page.svelte +++ b/tools/ui/src/routes/search/+page.svelte @@ -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 }); } });