Skip to content

Commit c1b2cee

Browse files
t3dotggclaude
andcommitted
fix(web): load the side chat pane eagerly so its composer survives the reveal
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent e327d4e commit c1b2cee

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

‎apps/web/src/components/chat/RightPanelSurfaceContent.tsx‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type {
1010
} from "@t3tools/contracts";
1111
import { scopedThreadKey } from "@t3tools/client-runtime/environment";
1212
import { lazy, Suspense } from "react";
13+
import SideChatPane from "./SideChatPane";
1314
import type { ComposerImageAttachment, DraftId } from "../../composerDraftStore";
1415
import type { ShortcutMatchContext } from "../../keybindings";
1516
import { type RightPanelSurface, useRightPanelStore } from "../../rightPanelStore";
@@ -31,7 +32,6 @@ const DevicePanel = lazy(() =>
3132
import("../device/DevicePanel").then((module) => ({ default: module.DevicePanel })),
3233
);
3334
const FilePreviewPanel = lazy(() => import("../files/FilePreviewPanel"));
34-
const SideChatPane = lazy(() => import("./SideChatPane"));
3535

3636
type RightPanelTerminalProps = Omit<
3737
PersistentThreadTerminalPanelProps,
@@ -167,15 +167,14 @@ export function RightPanelSurfaceContent(props: {
167167
case "pull-requests":
168168
return <ThreadPullRequestsPanel threadRef={threadRef} />;
169169
case "side-chat":
170+
// Not lazy: revealing a suspended tiptap editor tears down its view and crashes the composer.
170171
return (
171-
<Suspense fallback={null}>
172-
<SideChatPane
173-
key={surface.id}
174-
parentRef={threadRef}
175-
threadId={surface.threadId}
176-
onClose={() => props.onCloseSurface(surface)}
177-
/>
178-
</Suspense>
172+
<SideChatPane
173+
key={surface.id}
174+
parentRef={threadRef}
175+
threadId={surface.threadId}
176+
onClose={() => props.onCloseSurface(surface)}
177+
/>
179178
);
180179
case "device":
181180
return (

0 commit comments

Comments
 (0)