From 6a9d4627b03600b601e939593bdb0f059727fd26 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sun, 6 Sep 2026 23:06:35 +0000 Subject: [PATCH] fix(router): Wrap root error/404 components in HTML shell --- src/routes/__root.tsx | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index c8711dc48..67f9d55bd 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -8,6 +8,7 @@ import { HeadContent, Scripts, defaultStringifySearch, + type ErrorComponentProps, } from '@tanstack/react-router' import { QueryClientProvider, type QueryClient } from '@tanstack/react-query' import { createThemeCss, type HighlightTheme } from '@tanstack/highlight/theme' @@ -259,10 +260,44 @@ export const Route = createRootRouteWithContext<{ headers: () => DOCUMENT_CACHE_HEADERS, staleTime: Infinity, shellComponent: ShellComponent, - errorComponent: DefaultCatchBoundary, - notFoundComponent: () => , + errorComponent: RootErrorBoundary, + notFoundComponent: RootNotFound, }) +function RootDocumentShell({ children }: { children: React.ReactNode }) { + return ( + + +