Skip to content

Commit 2c692e6

Browse files
committed
Restore key={threadId} on ChatView to prevent state leaking across threads
1 parent 4738d19 commit 2c692e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/web/src/routes/_chat.$threadId.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function ChatThreadRouteView() {
222222
return (
223223
<>
224224
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
225-
<ChatView threadId={threadId} />
225+
<ChatView key={threadId} threadId={threadId} />
226226
</SidebarInset>
227227
<DiffPanelInlineSidebar
228228
diffOpen={diffOpen}
@@ -237,7 +237,7 @@ function ChatThreadRouteView() {
237237
return (
238238
<>
239239
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
240-
<ChatView threadId={threadId} />
240+
<ChatView key={threadId} threadId={threadId} />
241241
</SidebarInset>
242242
<DiffPanelSheet diffOpen={diffOpen} onCloseDiff={closeDiff}>
243243
{shouldRenderDiffContent ? <LazyDiffPanel mode="sheet" /> : null}

0 commit comments

Comments
 (0)