Files
websitedev/proto/src/app
Do SikiandClaude Sonnet 5 a661739844 fix(cms): resolve double-root-layout conflict between the site and Payload admin
Next.js 16 requires either one shared root layout for every route, or
each top-level route group to be fully self-contained (no ancestor
layout.tsx above it). MITHOME-86 added (payload)/layout.tsx — which
itself renders Payload's own <html>/<body> via <RootLayout> — while
src/app/layout.tsx still existed as a shared ancestor and did the same.
The result was two React trees fighting over <html>/<body>/<head>,
surfacing in the browser as hydration failures and "You are mounting a
new html component" errors on /admin (invisible to curl-based checks
in the MITHOME-86 verification, since they only exercise SSR, not
client hydration — that verification's "confirmed live" claim was
therefore incomplete; caught now with an actual browser).

Fix, per Payload's documented multi-root pattern: move every existing
site route (page.tsx, globals.css, kapcsolat/szolgaltatasok/rolunk/
adatvedelem/felhasznalasi-feltetelek) into a new (frontend) route
group with its own layout.tsx (renamed from src/app/layout.tsx, with
relative imports adjusted one level deeper), as a sibling of (payload).
No shared layout.tsx remains directly under src/app/.

Verified in a real browser (not just curl): /admin/login and the
dashboard now render and hydrate cleanly, and all site routes
(/, /rolunk, /szolgaltatasok, /kapcsolat, /adatvedelem,
/felhasznalasi-feltetelek) are unaffected — same output, just moved.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 03:40:00 +02:00
..