From 2fb76f3e404bcfcc4cd3df0f0d658cc66ed179cc Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Fri, 26 Jun 2026 14:08:00 +0100 Subject: [PATCH] fix(webapp): stop hydration errors on the Tasks page The per-row Running and Activity cells stream in via defer(); a streamed Suspense boundary still pending when the page hydrates gets bailed to client rendering and throws React #421. Render those cells client-side so there is no SSR boundary to bail. --- .../tasks-page-hydration-errors.md | 6 +++ .../route.tsx | 45 ++++++++++++------- 2 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 .server-changes/tasks-page-hydration-errors.md 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) => } + + + )} +