fix(public): always show real hero + drop nav from landing page #61
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/hero-stale-gate-and-nav"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes two unrelated issues on the public landing page. Diagnosed against the live site first; both root causes confirmed before changing anything.
Bug 1 — logged-out visitors saw the coming-soon page instead of the real hero
Not a stale deploy, CDN cache, service worker, or Traefik/backend split — verified the origin serves identical current HTML/bundle to authenticated and unauthenticated requests, with no edge cache and no service worker. The difference was produced client-side by
MaintenanceGate: whensite_mode === 'maintenance'and there's no logged-in user, it renders theMaintenancecoming-soon page; admins bypass it (live preview).Change: move the
/hero route out from behindMaintenanceGateso every visitor always lands on the realPortalhero. The gate remains on all other public routes (/site/*,/wiki, CMS pages), so content pages stay gated during maintenance and admins still preview through it.Bug 2 — site nav rendered on the hero
PortalusedPublicLayoutwith the defaultheader=true, so the nav rendered over the hero. Passheader={false}(the layout's existing escape hatch) so the hero has no top nav. Footer retained.Verification
npm run buildpasses (234 modules).navLinkCount: 0), footer present.Files
client/src/App.jsx— hero route pulled out of the maintenance gateclient/src/routes/public/Portal.jsx—header={false}on the hero layout🤖 Generated with Claude Code
https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
Bug 1 — Logged-out visitors saw the coming-soon Maintenance page while admins saw the real hero. That difference is produced client-side by MaintenanceGate (site_mode=maintenance && no user). Pull the `/` hero route out from behind the gate so every visitor always lands on the real Portal hero; the MaintenanceGate stays on all other public routes, so content pages remain gated during maintenance and admins still preview through it. Bug 2 — The landing hero rendered the site nav because Portal used PublicLayout with the default header=true. Pass header={false} so the hero has no top nav (footer retained), using the layout's existing escape hatch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ