From 9f1f727d8906adbac3949671a07b0bd6d81ba171 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Thu, 16 Jul 2026 18:11:29 +0530 Subject: [PATCH] refactor(tabs): drop snapshot args from tab sync --- .../[workspace_id]/new-chat/[[...chat_id]]/page.tsx | 4 ---- surfsense_web/hooks/use-activate-chat-thread.ts | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/surfsense_web/app/dashboard/[workspace_id]/new-chat/[[...chat_id]]/page.tsx b/surfsense_web/app/dashboard/[workspace_id]/new-chat/[[...chat_id]]/page.tsx index 22298e574..dff264c43 100644 --- a/surfsense_web/app/dashboard/[workspace_id]/new-chat/[[...chat_id]]/page.tsx +++ b/surfsense_web/app/dashboard/[workspace_id]/new-chat/[[...chat_id]]/page.tsx @@ -299,11 +299,7 @@ export default function NewChatPage() { setCurrentThread(thread); syncChatTab({ chatId: thread.id, - title: thread.title, - chatUrl: `/dashboard/${thread.workspace_id ?? workspaceId}/new-chat/${thread.id}`, workspaceId: thread.workspace_id ?? workspaceId, - visibility: thread.visibility, - hasComments: thread.has_comments ?? false, }); } }, [activeThreadId, workspaceId, syncChatTab, threadDetailQuery.data]); diff --git a/surfsense_web/hooks/use-activate-chat-thread.ts b/surfsense_web/hooks/use-activate-chat-thread.ts index 2b68ef76f..c0712908f 100644 --- a/surfsense_web/hooks/use-activate-chat-thread.ts +++ b/surfsense_web/hooks/use-activate-chat-thread.ts @@ -45,17 +45,13 @@ export function useActivateChatThread() { ); const activateChatThread = useCallback( - ({ id, title, url, workspaceId, visibility, hasComments }: ActivateChatThreadInput) => { + ({ id, url, workspaceId, visibility, hasComments }: ActivateChatThreadInput) => { const numericWorkspaceId = getWorkspaceId(workspaceId); const chatUrl = url ?? getChatUrl(workspaceId, id); syncChatTab({ chatId: id, - title: id ? title : (title ?? "New Chat"), - chatUrl, workspaceId: numericWorkspaceId, - ...(visibility !== undefined ? { visibility } : {}), - ...(hasComments !== undefined ? { hasComments } : {}), }); setCurrentThreadMetadata({