Skip to content

Render the PolicyEngine site shell - #11

Merged
MaxGhenis merged 2 commits into
mainfrom
add-policyengine-site-shell
Sep 29, 2026
Merged

MaxGhenis merged 2 commits into
mainfrom
add-policyengine-site-shell

Conversation

@vahid-ahmadi

Copy link
Copy Markdown
Contributor

Unblocks policyengine-app-v2#1179, which registers this dashboard at policyengine.org/uk/free-childcare-reform and currently fails app-zone-shell-audit:

Routes missing the PolicyEngine shell:
  - /uk/free-childcare-reform: top shell nav labels missing: Research, Model, API, Donate

A multizone rewrite proxies this app's own HTML through — it does not inject the parent site shell — so a child that does not render the header and footer itself is served under policyengine.org with no site nav at all. bus-fare-cap shipped exactly this in bus-fare-cap#9.

  • dashboard/src/components/PolicyEngineHeader.jsx, PolicyEngineFooter.jsx — the components bus-fare-cap ships, with links pointing at the UK site. Both reference public/assets/logos/policyengine-white.svg, which this repo already had.
  • dashboard/app/layout.jsx — wraps {children}. The header is static rather than sticky, so the analysis's own sticky .title-row (z-index: 100) keeps the top of the viewport while scrolling.
  • .github/workflows/pull_request.yaml — the existing site-shell step asserted only the title, on the premise that the page was "the analysis and nothing else: no site nav, no brand bar, no footer". That premise is what the audit rejects, so it now asserts the nav labels and footer links as well. A missing shell fails at PR time here rather than in app-v2's nightly production audit.

Verified locally: bun run build passes, all eleven needles in the CI shell step are present in the built HTML, and the rendered page shows the nav above the title row with no overlap.

Not in scope: the Two childcare reforms wording in the metadata title and README reads as two separate policies rather than one two-part reform, and is worth a separate pass.

The dashboard is proxied under policyengine.org/uk/free-childcare-reform
as a multizone child, and the parent does not inject its shell into the
child's response — so a child that does not render the header and footer
itself is served with no site nav at all. app-v2's app-zone-shell-audit
enforces this and fails the route: "top shell nav labels missing:
Research, Model, API, Donate".

Adds the header and footer bus-fare-cap ships, pointing at the UK site,
and wires them around {children} in the root layout. The header is
static rather than sticky so the analysis's own sticky title row keeps
the top of the viewport while scrolling.

The dashboard's own CI already had a shell step asserting the title, on
the premise that the page was "the analysis and nothing else: no site
nav, no brand bar, no footer". That premise is what the audit rejects,
so the step now asserts the nav labels and footer links too, and a
missing shell fails here at PR time instead of in the nightly
production audit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
free-childcare-reform Ready Ready Preview Sep 29, 2026 9:05am UTC

Request Review

- About pointed at policyengine.org/uk/about, which 404s (the main site's
  About is a dropdown with no page). The shell's required links are
  Research, Model, API and Donate; the footer already links About us.
- On narrow screens the header now uses tighter gaps and 13px links
  (15px from sm up), with the link row able to scroll on its own, so it
  fits a 375px viewport (last link ends at 350px) instead of forcing
  sideways scrolling.
- aria-label on the header nav, matching the footer's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

MaxGhenis commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Pushed 5983ab5 on top of your commit (9902e22) to get this over the line. It unblocks policyengine-app-v2#1181, where the nightly zone-shell audit has failed daily on this route, and every app-v2 PR that touches appZoneRoutes.ts, including the OBBBA slug cutover (policyengine-app-v2#1226).

An independent review flagged two blocking issues, both fixed:

  • About → 404. https://www.policyengine.org/uk/about returns 404; the main site's About is only a dropdown. I dropped the link. The shell's required labels are Research/Model/API/Donate, and the footer already links About us.
  • Phone overflow. The single-row bar was about 520px wide. It now has tighter gaps and 13px links below sm, and the link row can scroll on its own. Measured in Chromium against a local next start: at 375px the last nav link ends at 350px. At 1440×1000 the audit's own logic finds the brand plus all four labels.

The page still scrolls sideways on phones (scrollWidth 529 at 375px), but that's pre-existing and not from the header. A toggle LABEL in the dashboard causes the identical 529px overflow on production today.

Verified locally: bun run build passes, and the workflow's shell grep passes on .next/server/app/index.html.

🤖 Generated with Claude Code

@MaxGhenis

Copy link
Copy Markdown
Contributor

Merge audit: all checks pass on head 5983ab5 (gh pr checks exit 0; mergeable, not a draft). An independent Opus 5.5 review (subfleet, task review, tier standard) requested changes on 9902e22: the About link 404'd and the header overflowed on phones. 5983ab5 fixes both, and the re-review (20260929-050513-fcr11-rereview) APPROVED with no blocking findings. Merging to restore the PolicyEngine site shell on policyengine.org/uk/free-childcare-reform. That fixes the nightly zone-shell audit (policyengine-app-v2#1181) and unblocks app-zone route PRs.

This branch was successfully deployed

1 active deployment
Preview — 5983ab5c Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants