Summary
When navigating from the home page (while scrolled into a dark-toned section like #compare or #faq) to /blog/ via the nav "Blog" link, the navbar stays painted in its dark-section styling — white wordmark and links on the paper-toned blog page — so it reads as "appears then disappears." Same issue applies to /blog/[slug]/.
Repro
- Open
/.
- Scroll until
#compare or #faq is under the nav (navbar should flip to white-on-dark).
- Click the "Blog" link in the nav.
- On
/blog/, the wordmark and nav links are effectively invisible — only the underline accents are faintly visible. Reloading /blog/ directly renders correctly (active resets to "intro").
Cause
components/site/Chrome.tsx lives in the root layout and is not remounted across client-side navigations. The IO effect (Chrome.tsx:60-118) re-runs on pathname change but early-returns when none of SECTION_IDS = ["intro", "compare", "method", "faq", "contact"] exist in the DOM:
const nodes = SECTION_IDS.map((id) => document.getElementById(id)).filter(
(n): n is HTMLElement => n !== null,
);
if (nodes.length === 0) return;
On /blog/ (which only renders <Frame id="blog">) the effect bails before resetting active, so active retains its last home-page value. If that value is in DARK_SECTIONS ("compare" or "faq"), onDark stays true and the nav renders with text-paper over a paper-toned page.
Suggested fix
When the effect finds no observable sections, reset state to a known-light default before returning — e.g.:
if (nodes.length === 0) {
setActive("intro");
return;
}
Or, more explicitly, derive the off-home tone from pathname instead of letting active carry across routes.
Summary
When navigating from the home page (while scrolled into a dark-toned section like
#compareor#faq) to/blog/via the nav "Blog" link, the navbar stays painted in its dark-section styling — white wordmark and links on the paper-toned blog page — so it reads as "appears then disappears." Same issue applies to/blog/[slug]/.Repro
/.#compareor#faqis under the nav (navbar should flip to white-on-dark)./blog/, the wordmark and nav links are effectively invisible — only the underline accents are faintly visible. Reloading/blog/directly renders correctly (active resets to"intro").Cause
components/site/Chrome.tsxlives in the root layout and is not remounted across client-side navigations. The IO effect (Chrome.tsx:60-118) re-runs onpathnamechange but early-returns when none ofSECTION_IDS = ["intro", "compare", "method", "faq", "contact"]exist in the DOM:On
/blog/(which only renders<Frame id="blog">) the effect bails before resettingactive, soactiveretains its last home-page value. If that value is inDARK_SECTIONS("compare"or"faq"),onDarkstaystrueand the nav renders withtext-paperover a paper-toned page.Suggested fix
When the effect finds no observable sections, reset state to a known-light default before returning — e.g.:
Or, more explicitly, derive the off-home tone from
pathnameinstead of lettingactivecarry across routes.