Skip to content

Fix hero blanking after view-transition nav; purge legacy fonts and dead components - #14

Merged
NicholasKissel merged 1 commit into
mainfrom
NicholasKissel/fix-hero-logo-click
Aug 23, 2026
Merged

Fix hero blanking after view-transition nav; purge legacy fonts and dead components#14
NicholasKissel merged 1 commit into
mainfrom
NicholasKissel/fix-hero-logo-click

Conversation

@NicholasKissel

Copy link
Copy Markdown
Member

Hero blanking on logo click (bug fix)

Clicking the Rivet logo (or any client-side navigation back to a page) permanently blanked the homepage hero until a hard refresh.

Root cause: Astro's view-transition router strips every <noscript> element from swapped-in pages (router.js: newDocument.querySelectorAll("noscript").forEach((el) => el.remove())). The hero's CopyInstallButton rendered a <noscript> fallback, so after the swap React hydration hit a structural mismatch (error #418), regenerated the whole RedesignedHero island, and the regenerated DOM lost the data-site-reveal-visible attributes ScrollObserver had set — with nothing left to re-reveal them (the 2s fallback is skipped once the observer reports ready). Reproduced against production; it is timing-dependent there.

Fix: the island renders no <noscript>; the no-JS fallback now uses the CSS scripting media query ([@media(scripting:none)]:hidden on the button, an always-rendered <code> shown via [@media(scripting:none)]:flex). Server and client markup are always identical, so hydration cannot fail. Verified with Playwright: initial load, double logo click, nav to /actors and back — hero stays revealed, zero page errors; JS-disabled load shows the selectable command and full hero.

Rule of thumb going forward: never render <noscript> inside a component hydrated with a client: directive; plain .astro markup is fine.

Legacy asset and dead-code purge

  • Retired font families removed from public/fonts (Cartridge, Open Sans, Outfit, Perfectly Nineties, Prompt, Saira, Silkscreen, Darker Grotesque, Gloria Hallelujah) with matching fonts.css/main.css/Tailwind config cleanup — Manrope and JetBrains Mono remain.
  • Dead components removed: old Header/Navigation/Layout, ProductHero, sales pages, bench/diagram set, editorial helpers, and orphaned marketing/docs SVGs and textures.
  • Adds shared CopyInstallCommand for product-page install commands.

🤖 Generated with Claude Code

…ts, and dead components

Clicking the logo (any client-side nav back to a page) blanked the homepage
hero: Astro's view-transition router strips <noscript> from swapped-in pages,
so the CopyInstallButton's noscript fallback desynced React hydration, React
regenerated the RedesignedHero tree, and the regenerated markup lost the
data-site-reveal-visible attributes with nothing left to re-reveal them. The
island now renders no noscript; the no-JS fallback uses the CSS scripting
media query instead.

Also sweeps out unused legacy weight: retired font families (Cartridge, Open
Sans, Outfit, Perfectly Nineties, Prompt, Saira, Silkscreen, Darker Grotesque,
Gloria Hallelujah), orphaned marketing/docs SVGs and textures, dead components
(old Header/Navigation/Layout, ProductHero, sales pages, diagram set), and the
matching fonts.css/main.css/tailwind config entries. Adds a shared
CopyInstallCommand for product-page install commands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@railway-app

railway-app Bot commented Aug 23, 2026

Copy link
Copy Markdown

🚅 Deployed to the website-pr-14 environment in rivet-website

Service Status Web Updated (UTC)
website 🕒 Building (View Logs) Web Aug 23, 2026 at 10:44 pm

@railway-app
railway-app Bot temporarily deployed to rivet-website / website-pr-14 August 23, 2026 22:44 Destroyed
@NicholasKissel
NicholasKissel merged commit faf36df into main Aug 23, 2026
2 of 3 checks passed
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.

1 participant