From 8d3c7a51b76a4afa59a8ae7ef0c06e900fd24ab4 Mon Sep 17 00:00:00 2001 From: BigBodyCobain <43977454+BigBodyCobain@users.noreply.github.com> Date: Sat, 2 May 2026 19:47:32 -0600 Subject: [PATCH] Fix Docker frontend hydration under CSP Render the app shell dynamically so Next can attach per-request CSP nonces to its production scripts, preventing Docker from serving a static shell that cannot hydrate. Also gives the first-contact warmup test enough time in CI. --- frontend/src/__tests__/mesh/messagesViewFirstContact.test.tsx | 2 +- frontend/src/app/layout.tsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/__tests__/mesh/messagesViewFirstContact.test.tsx b/frontend/src/__tests__/mesh/messagesViewFirstContact.test.tsx index 08ee692..e7ef780 100644 --- a/frontend/src/__tests__/mesh/messagesViewFirstContact.test.tsx +++ b/frontend/src/__tests__/mesh/messagesViewFirstContact.test.tsx @@ -305,7 +305,7 @@ describe('MessagesView first-contact trust UX', () => { await screen.findByText(/Mail delivered to Pinned Peer/i, {}, { timeout: 5000 }); expect(mocks.prepareWormholeInteractiveLane).toHaveBeenCalled(); expect(mocks.sendDmMessage).toHaveBeenCalled(); - }); + }, 10000); it('does not flatten witness policy not met into a generic witnessed root label', async () => { contactsState = { diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index 9f2254a..eb0b5e5 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -8,6 +8,8 @@ export const metadata: Metadata = { description: 'Advanced Geopolitical Risk Dashboard', }; +export const dynamic = 'force-dynamic'; + export default function RootLayout({ children, }: Readonly<{