From 5ae0b426fd1dab4c2c9b2d4448b9590828522de8 Mon Sep 17 00:00:00 2001 From: Theodore Li Date: Mon, 13 Apr 2026 17:56:55 -0700 Subject: [PATCH] fix(ui): fix flash between home and new chat --- .../app/workspace/[workspaceId]/home/hooks/use-chat.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts b/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts index 5720130685..b80b203b7f 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts +++ b/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts @@ -1601,9 +1601,11 @@ export function useChat( }) } if (!workflowIdRef.current) { - router.replace(`/workspace/${workspaceId}/task/${payloadChatId}`, { - scroll: false, - }) + window.history.replaceState( + null, + '', + `/workspace/${workspaceId}/task/${payloadChatId}` + ) } } }