From eded97559d8986fb2dcd5854a00872f6f88c86df Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Tue, 26 May 2026 07:24:36 -0600 Subject: [PATCH] Performance follow-ups --- app/(admin)/layout.tsx | 13 +- app/(app)/layout.tsx | 13 +- app/(dev)/layout.tsx | 11 +- app/(marketing)/layout.tsx | 15 +- app/(marketing)/learn/page.tsx | 22 +-- app/(marketing-case-study)/layout.tsx | 13 +- .../ContentThumbnailTemplate.container.tsx | 19 ++- .../ContentThumbnailTemplate.types.ts | 12 +- .../ContentThumbnailTemplate.view.tsx | 34 ++++ .../sections/HeroBanner/HeroBanner.tsx | 18 +- app/layout.tsx | 13 +- docs/perf/next16-eval.md | 160 ++++++++++++++++++ messages/en/marketing.ts | 103 +++++++++++ next.config.mjs | 3 + tests/pages/learn.test.tsx | 31 ++-- tests/unit/Layout.test.jsx | 24 ++- 16 files changed, 432 insertions(+), 72 deletions(-) create mode 100644 docs/perf/next16-eval.md create mode 100644 messages/en/marketing.ts diff --git a/app/(admin)/layout.tsx b/app/(admin)/layout.tsx index 6f7f23d..08dceda 100644 --- a/app/(admin)/layout.tsx +++ b/app/(admin)/layout.tsx @@ -1,5 +1,8 @@ import type { ReactNode } from "react"; import ConditionalNavigation from "../components/navigation/ConditionalNavigation"; +import { MessagesProvider } from "../contexts/MessagesContext"; +import { AuthModalProvider } from "../contexts/AuthModalContext"; +import messages from "../../messages/en/index"; // Reads the session for admin chrome (matches the HttpOnly cookie on first // HTML response). Scoped here so `(marketing)` can render statically. @@ -9,9 +12,11 @@ export const dynamic = "force-dynamic"; // public marketing footer. Auth/access is enforced upstream. export default function AdminLayout({ children }: { children: ReactNode }) { return ( - <> - -
{children}
- + + + +
{children}
+
+
); } diff --git a/app/(app)/layout.tsx b/app/(app)/layout.tsx index 2218eaf..11e8278 100644 --- a/app/(app)/layout.tsx +++ b/app/(app)/layout.tsx @@ -1,5 +1,8 @@ import type { ReactNode } from "react"; import ConditionalNavigation from "../components/navigation/ConditionalNavigation"; +import { MessagesProvider } from "../contexts/MessagesContext"; +import { AuthModalProvider } from "../contexts/AuthModalContext"; +import messages from "../../messages/en/index"; // Reads `cr_session` via Server Components on every navigation so the header // matches the HttpOnly cookie on the first HTML response (no "Log in" flash @@ -12,9 +15,11 @@ export const dynamic = "force-dynamic"; // CreateFlow) is composed in nested layouts. export default function AppLayout({ children }: { children: ReactNode }) { return ( - <> - -
{children}
- + + + +
{children}
+
+
); } diff --git a/app/(dev)/layout.tsx b/app/(dev)/layout.tsx index e67fa09..699928e 100644 --- a/app/(dev)/layout.tsx +++ b/app/(dev)/layout.tsx @@ -1,10 +1,19 @@ import type { ReactNode } from "react"; import { notFound } from "next/navigation"; +import { MessagesProvider } from "../contexts/MessagesContext"; +import { AuthModalProvider } from "../contexts/AuthModalContext"; +import messages from "../../messages/en/index"; // Development-only previews (e.g. `/components-preview`) — no public chrome. export default function DevLayout({ children }: { children: ReactNode }) { if (process.env.NODE_ENV === "production") { notFound(); } - return
{children}
; + return ( + + +
{children}
+
+
+ ); } diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsx index 188695d..6155b79 100644 --- a/app/(marketing)/layout.tsx +++ b/app/(marketing)/layout.tsx @@ -1,6 +1,9 @@ import dynamic from "next/dynamic"; import type { ReactNode } from "react"; import MarketingNavigation from "../components/navigation/MarketingNavigation"; +import { MessagesProvider } from "../contexts/MessagesContext"; +import { AuthModalProvider } from "../contexts/AuthModalContext"; +import marketingMessages from "../../messages/en/marketing"; // Site footer is part of the public marketing chrome only — not rendered for // signed-in product surfaces, admin dashboards, or dev previews. See @@ -14,10 +17,12 @@ const Footer = dynamic(() => import("../components/navigation/Footer"), { export default function MarketingLayout({ children }: { children: ReactNode }) { return ( - <> - -
{children}
-