fix(frontend/builder): wrap BuilderChatPanel in ErrorBoundary

Prevents a runtime error in action parsing or message rendering from
crashing the entire build page. Uses a null fallback so the rest of the
editor remains usable if the chat panel fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
majdyz
2026-04-10 07:01:31 +00:00
parent 503e5e1f38
commit 1921795e42

View File

@@ -1,5 +1,6 @@
import { useGetV1GetSpecificGraph } from "@/app/api/__generated__/endpoints/graphs/graphs";
import { okData } from "@/app/api/helpers";
import { ErrorBoundary } from "@/components/molecules/ErrorBoundary/ErrorBoundary";
import { FloatingReviewsPanel } from "@/components/organisms/FloatingReviewsPanel/FloatingReviewsPanel";
import { BuilderChatPanel } from "../../BuilderChatPanel/BuilderChatPanel";
import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";
@@ -139,10 +140,12 @@ export const Flow = () => {
graphId={flowID || undefined}
/>
{isBuilderChatEnabled && (
<BuilderChatPanel
isGraphLoaded={isInitialLoadComplete}
onGraphEdited={() => void refetchGraph()}
/>
<ErrorBoundary context="BuilderChatPanel" fallback={null}>
<BuilderChatPanel
isGraphLoaded={isInitialLoadComplete}
onGraphEdited={() => void refetchGraph()}
/>
</ErrorBoundary>
)}
</div>
);