Branded 404 + error pages (Group D.2)#282
Merged
Merged
Conversation
Adds two app-router special pages matching the Statusbrew aesthetic: - apps/website/src/app/not-found.tsx — server component, branded 404. Eyebrow "404" + h1 "Page not found." + helpful copy + two CTAs (Back home, Browse docs). Renders inside the standard Nav+Footer shell from layout.tsx. - apps/website/src/app/error.tsx — client component (required by Next.js for error boundaries). "Something went wrong." with the error digest visible, Try again button (calls `reset`), Back home link. loading.tsx intentionally NOT added: it would trigger Suspense streaming and commit the initial HTTP response with status 200 before notFound() calls could set 404. Confirmed locally — adding loading.tsx caused /solutions/unknown-slug to return 200 instead of 404, which would let bad URLs stay indexed in search. The branded loading state is low-value for this site (marketing routes are largely SSG) and not worth the SEO regression. All 35 website e2e tests pass — including the previously-flagged '/solutions/unknown-slug returns 404' test, which confirms the 404 status flows through the new not-found.tsx correctly. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Final piece of the post-merge brand sweep. Adds two app-router special pages so users hitting a bad URL or a thrown error get the brand chrome instead of Next.js's unbranded defaults.
What's in
What's NOT in (intentionally)
`loading.tsx` — I tried adding it but it broke 404 status codes. Adding a root `loading.tsx` triggers Suspense streaming for every navigation, which commits the initial HTTP response with status 200 before `notFound()` calls can flow through their 404 status. Verified locally: with `loading.tsx` present, `/solutions/unknown-slug` returned 200 instead of 404 — and the existing e2e test `/solutions/unknown-slug returns 404` failed. That's a real SEO regression (bad URLs stay indexed). The branded loading state is low-value for this site (marketing routes are largely SSG and never see a loading state), so the tradeoff is clearly: skip `loading.tsx`, keep proper 404 status reporting.
Test plan
🤖 Generated with Claude Code