diff --git a/.server-changes/tasks-page-hydration-errors.md b/.server-changes/tasks-page-hydration-errors.md new file mode 100644 index 00000000000..ede865fa9e5 --- /dev/null +++ b/.server-changes/tasks-page-hydration-errors.md @@ -0,0 +1,6 @@ +--- +area: webapp +type: fix +--- + +Stop the Tasks page from logging React hydration errors for the per-row running and activity stats. diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsx index 39b5ed7aafb..c1c8bf3fac6 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsx @@ -5,6 +5,7 @@ import { type ActionFunctionArgs, type LoaderFunctionArgs } from "@remix-run/ser import type { TaskRunStatus } from "@trigger.dev/database"; import type { PanelHandle } from "@window-splitter/react"; import { Fragment, Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { ClientOnly } from "remix-utils/client-only"; import { Bar, BarChart, ReferenceLine, Tooltip, type TooltipProps, YAxis } from "recharts"; import { TypedAwait, typeddefer, useTypedLoaderData } from "remix-typedjson"; import { BeakerIcon } from "~/assets/icons/BeakerIcon"; @@ -443,27 +444,37 @@ function TaskRow({ - }> - }> - {(data) => } - - + {/* Render the deferred stats client-side. A streamed Suspense boundary still pending at + hydration otherwise bails to client rendering and throws React #421. */} + }> + {() => ( + }> + }> + {(data) => } + + + )} +