Repository navigation
Render the PolicyEngine site shell on /uk/chat - #240
Merged
Merged
Conversation
/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) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Beta preview has been cleaned up because this PR was closed. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #240 +/- ##
==========================================
- Coverage 62.92% 62.81% -0.12%
==========================================
Files 100 101 +1
Lines 6579 6591 +12
Branches 1313 1315 +2
==========================================
Hits 4140 4140
- Misses 2166 2178 +12
Partials 273 273
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #239.
/uk/chatis 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 emptiedSHELL_BRAND_EXEMPT_SOURCES, every zone child renders the shell itself — and the audit was failing here withPolicyEngine brand missing from top shell, blocking PolicyEngine/policyengine-app-v2#1073.What this does
SiteHeaderwith the wordmark and theResearch,Model,APIandDonatelinks the audit asserts appear within the top 140px. Links are absolute to policyengine.org so they resolve from the standalone deployment too, where/uk/*belongs to the chat rather than the website.ChatPage, so it is in the server-rendered HTML —ChatPageis loaded withssr: false.--pe-shell-h. The chat is a full-height layout, so without this the composer is pushed below the fold: the five full-height panes becomecalc(100dvh - var(--pe-shell-h))and the two sticky sidebars anchor at that offset instead of0.?embed), which already sit inside another page's chrome, and drops--pe-shell-hto0pxso the layout is unchanged there.Verification
Ran the actual audit script from policyengine-app-v2 against a local production build:
Also confirmed
?embedrenders no header and reports--pe-shell-h: 0px.Frontend tests pass (43) and
npm run buildsucceeds.tsc --noEmitreports the same 16 pre-existing errors inbackend-url.test.tsbefore and after — none from this change.