Repository navigation
feat(public): one signed-out header for every public page, with a Dashboard link once a session hydrates - #781
Merged
Merged
Conversation
…hboard link once a session hydrates Fixes #762. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This was referenced Sep 17, 2026
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.
What
Every public route now gets the site header from
app/(public)/_layout.tsxinstead of four pages mounting it themselves and the other seven having no navigation at all. Fixes #762.MarketingNavgains a Jobs link (the public surface that exists), and an account area that is session-aware: Sign in / Get started for a visitor, a Dashboard link for someone already signed in. Both the desktop row and the mobile menu.useHydrated()hook (useSyncExternalStorewith afalseserver snapshot) is the gate. Branching on the session directly is the SSR: server and client disagree on React tree position in the app shell (the cause under #625) #679/SSR: authenticated pages intermittently fail hydration and regenerate the tree — the session load races the first client render #681 failure mode — when the session lands before the first client render, the trees differ in structure and React regenerates the tree. A signed-in user therefore sees Sign in for one frame before it becomes Dashboard; the alternative hides the sign-in CTA from every anonymous visitor for the length of hydration, and anonymous visitors are who this header is for.(public)/_layout.tsxrenders the header on web and stays a bare<Slot />on native.sectionBasePath="/"so the landing-section links go home — with the default they were bare#fragments that pointed nowhere on/termsetc.users/_layout.tsxhides its expo-router logo header on web; the site header replaces it. Native unchanged.terms,contact,support,privacydrop their per-page<MarketingNav />so nothing double-renders.Verification
4 new tests in
packages/scf-core/features/marketing/__tests__/MarketingNav.test.tsx: links, signed-out chrome, Dashboard once hydrated + authenticated, and signed-out chrome when authenticated but not yet hydrated (the server-parity case). Typecheck green forscf-coreandscaffald-app; lint clean.Dev server, anonymous, 1440 wide: header on
/jobs,/jobs/<slug>,/terms,/users/<slug>; no hydration errors on the listing or the legal pages.Mobile (375): hamburger opens Jobs / How it works / Benefits / FAQs / Sign in / Get started.
Signed in as the seeded
[email protected](Playwright, the same login pathui-sweep.mjsuses), 1440 wide:main/jobs/terms/users/ericThe
/users/<slug>hydration failure while signed in reproduces byte-for-byte onmainwith this PR's files swapped out, so it is the pre-existing SSR: authenticated pages intermittently fail hydration and regenerate the tree — the session load races the first client render #681 race (the profile page branches on the session), not this change. Noted rather than fixed here; it is on the v1.18.0 deferred list.Not in this PR
useResponsive's fixed 1280 server snapshot, so any responsive branch — this header's,DashboardLayout's, the breadcrumb's — mismatches at tablet widths. Same class as above; unchanged by this PR and shared with the landing page, which has rendered this exact component since July.🤖 Generated with Claude Code