Skip to content

Commit 470cabc

Browse files
committed
Wrap DiffPanel in DiffWorkerPoolProvider in _chat.tsx layout
DiffPanel uses FileDiff and Virtualizer from @pierre/diffs/react, which require a WorkerPoolContextProvider ancestor. The DiffWorkerPoolProvider wrapper was missing in the new _chat.tsx layout, causing a runtime crash when the diff panel opened.
1 parent 5817848 commit 470cabc

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

apps/web/src/routes/_chat.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Outlet, createFileRoute } from "@tanstack/react-router";
22

3-
import DiffPanel from "../components/DiffPanel";
3+
import DiffPanel, { DiffWorkerPoolProvider } from "../components/DiffPanel";
44
import Sidebar from "../components/Sidebar";
55
import { useStore } from "../store";
66

@@ -11,7 +11,11 @@ function ChatRouteLayout() {
1111
<div className="flex h-screen overflow-hidden bg-background text-foreground isolate">
1212
<Sidebar />
1313
<Outlet />
14-
{state.diffOpen && <DiffPanel />}
14+
{state.diffOpen && (
15+
<DiffWorkerPoolProvider>
16+
<DiffPanel />
17+
</DiffWorkerPoolProvider>
18+
)}
1519
</div>
1620
);
1721
}

0 commit comments

Comments
 (0)