From a830cd5b1a7bacd06f3fc78d7c2d97065c603d38 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Thu, 26 Feb 2026 18:10:06 -0800 Subject: [PATCH] Use history replace when toggling chat diff view - Add `replace: true` to thread navigation in `ChatView` - Prevents extra browser history entries when opening/closing diff mode --- apps/web/src/components/ChatView.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index bb4fac354cfce6efc728f9174b674ada10666d0c..632edc048e8b51067fbee98458efb8ae55a2bf14 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -623,6 +623,7 @@ export default function ChatView({ threadId }: ChatViewProps) { void navigate({ to: "/$threadId", params: { threadId }, + replace: true, search: (previous) => { const rest = stripDiffSearchParams(previous); return diffOpen ? rest : { ...rest, diff: "1" }; -- 2.54.0