From c02c4a242b7e28e9d69f98a5e1c47d45548ce2fb Mon Sep 17 00:00:00 2001 From: vahid-ahmadi Date: Tue, 11 Aug 2026 11:54:05 +0100 Subject: [PATCH] Render the PolicyEngine site shell on /uk/chat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /uk/chat is served on policyengine.org through a multizone rewrite, which does not inject the parent app's header into this response. Since PolicyEngine/policyengine-app-v2#1148 every zone child renders the shell itself, and the app-zone-shell-audit failed here with "PolicyEngine brand missing from top shell", blocking the beta launch PR. Adds a SiteHeader with the wordmark and the Research, Model, API and Donate links the audit asserts are present in the top 140px. It lives in the root layout rather than ChatPage so it is in the server-rendered HTML — ChatPage is loaded with ssr: false. The chat is a full-height layout, so the header would otherwise push the composer below the fold. Its height is published as --pe-shell-h; the full-height panes are now calc(100dvh - var(--pe-shell-h)) and the sticky sidebars anchor at that offset instead of 0. Embedded copies (?embed) already sit inside another page's chrome, so the header is skipped there and --pe-shell-h drops to 0px. Fixes #239 Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/app/ChatPage.tsx | 10 +-- frontend/src/app/layout.tsx | 6 ++ frontend/src/components/SiteHeader.tsx | 110 +++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 5 deletions(-) create mode 100644 frontend/src/components/SiteHeader.tsx diff --git a/frontend/src/app/ChatPage.tsx b/frontend/src/app/ChatPage.tsx index 13651f78..dcce1987 100644 --- a/frontend/src/app/ChatPage.tsx +++ b/frontend/src/app/ChatPage.tsx @@ -1544,7 +1544,7 @@ export default function ChatPage() { }; return ( -
+
{/* Body */} -
+
{!isEmbed && !sidebarOpen && ( /* Rail */ -
+