Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function ErrorContextPanel({
className="h-auto gap-1 p-0 text-xs"
asChild
>
<a href={`/pipelines/${pipelineId}/logs`}>
<a href={`/pipelines/${pipelineId}?logs=1`}>
<ExternalLink className="h-3 w-3" />
View full logs
</a>
Expand Down
5 changes: 3 additions & 2 deletions src/app/(dashboard)/pipelines/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useParams, useRouter } from "next/navigation";
import { useParams, useRouter, useSearchParams } from "next/navigation";
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
import type { NodeMetricsData } from "@/stores/flow-store";
import {
Expand Down Expand Up @@ -193,13 +193,14 @@ function PromotionHistory({ pipelineId }: { pipelineId: string }) {
function PipelineBuilderInner({ pipelineId }: { pipelineId: string }) {
const trpc = useTRPC();
const router = useRouter();
const searchParams = useSearchParams();
const [deployOpen, setDeployOpen] = useState(false);
const [templateOpen, setTemplateOpen] = useState(false);
const [deleteOpen, setDeleteOpen] = useState(false);
const [undeployOpen, setUndeployOpen] = useState(false);
const [discardOpen, setDiscardOpen] = useState(false);
const [metricsOpen, setMetricsOpen] = useState(false);
const [logsOpen, setLogsOpen] = useState(false);
const [logsOpen, setLogsOpen] = useState(() => searchParams.get("logs") === "1");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 useSearchParams requires a Suspense boundary

Next.js requires any component that calls useSearchParams() to be wrapped in a <Suspense> boundary; without one, the entire route tree de-opts from partial prerendering (PPR) and Next.js emits a build warning (MISSING_SUSPENSE_WITH_CSR_BAILOUT). Since PipelineBuilderInner is already nested inside ReactFlowProvider, the simplest fix is to wrap it in Suspense inside PipelineBuilderPage:

import { Suspense } from "react";

export default function PipelineBuilderPage() {
  const params = useParams<{ id: string }>();
  return (
    <ReactFlowProvider>
      <Suspense>
        <PipelineBuilderInner pipelineId={params.id} />
      </Suspense>
    </ReactFlowProvider>
  );
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/app/(dashboard)/pipelines/[id]/page.tsx
Line: 203

Comment:
**`useSearchParams` requires a Suspense boundary**

Next.js requires any component that calls `useSearchParams()` to be wrapped in a `<Suspense>` boundary; without one, the entire route tree de-opts from partial prerendering (PPR) and Next.js emits a build warning (`MISSING_SUSPENSE_WITH_CSR_BAILOUT`). Since `PipelineBuilderInner` is already nested inside `ReactFlowProvider`, the simplest fix is to wrap it in `Suspense` inside `PipelineBuilderPage`:

```tsx
import { Suspense } from "react";

export default function PipelineBuilderPage() {
  const params = useParams<{ id: string }>();
  return (
    <ReactFlowProvider>
      <Suspense>
        <PipelineBuilderInner pipelineId={params.id} />
      </Suspense>
    </ReactFlowProvider>
  );
}
```

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code Fix in Codex

const [aiDialogOpen, setAiDialogOpen] = useState(false);

const selectedTeamId = useTeamStore((s) => s.selectedTeamId);
Expand Down
Loading