authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-26 18:10:06-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-26 19:03:10-08:00
loga830cd5b1a7bacd06f3fc78d7c2d97065c603d38
tree31e2fff770a4d15854fa07311ab8de1c4f02459b
parentd47059a9db4546ce507341bbc8e7c25d0f60300a

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

1 files changed, 1 insertions(+), 0 deletions(-)

apps/web/src/components/ChatView.tsx+1
...@@ -623,6 +623,7 @@ export default function ChatView({ threadId }: ChatViewProps) {...@@ -623,6 +623,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
623 void navigate({623 void navigate({
624 to: "/$threadId",624 to: "/$threadId",
625 params: { threadId },625 params: { threadId },
626 replace: true,
626 search: (previous) => {627 search: (previous) => {
627 const rest = stripDiffSearchParams(previous);628 const rest = stripDiffSearchParams(previous);
628 return diffOpen ? rest : { ...rest, diff: "1" };629 return diffOpen ? rest : { ...rest, diff: "1" };