Skip to content

Handle unsupported paths with a 404 page and /preview redirect - #46

Merged
msaps merged 3 commits into
mainfrom
feature/unsupported-path
Jul 24, 2026
Merged

Handle unsupported paths with a 404 page and /preview redirect#46
msaps merged 3 commits into
mainfrom
feature/unsupported-path

Conversation

@msaps

@msaps msaps commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

Unmatched routes (e.g. /preview) previously rendered the Header and Footer with an empty <main>, producing a broken stacked-logo layout instead of any real content. This adds a proper 404 page, a dedicated redirect for /preview, and fixes a related animation bug on the home page discovered along the way.

Changes

  • Add a catch-all * route rendering a new NotFound page (src/pages/not-found/), styled consistently with the existing legal pages.
  • Add a dedicated /preview route that redirects (client-side, replace) to / instead of falling through to the 404 page.
  • Fix home page entrance animations (Hero, Features/BentoGrid, Download) replaying every time you navigate away and back to /. A module-level flag now tracks whether Home has already mounted during the current page load, so initial/whileInView animations only play on a genuine fresh load.

Testing

  • pnpm build (tsc + vite build) passes
  • pnpm lint passes
  • Manually reasoned through router behavior: vercel.json already rewrites all paths to /index.html, so /preview and other unsupported paths reach the SPA router correctly in production

msaps and others added 3 commits July 24, 2026 16:56
Unmatched routes previously rendered Header/Footer with an empty
main, producing a broken stacked-logo layout. Add a catch-all route
and NotFound page matching the site's design system.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Home's motion animations previously replayed every time the page
remounted via client-side navigation (e.g. scroll to bottom, visit
another page, navigate back). Track a module-level flag that flips
after Home's first mount and use it to skip initial/whileInView
animations on subsequent mounts within the same page load.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Previously fell through to the 404 page like any other unsupported
path; give it a dedicated redirect to home instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
loungebird Ready Ready Preview, Comment Jul 24, 2026 3:03pm

@msaps
msaps enabled auto-merge (squash) July 24, 2026 15:02
@msaps
msaps merged commit 16897ed into main Jul 24, 2026
3 checks passed
@msaps
msaps deleted the feature/unsupported-path branch July 24, 2026 15:03
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