Repository navigation
feat(flame): redesign the 404 page with an animated logo mascot - #468
Conversation
- Mascot: the project's navbar.logo as an <img>, animated with CSS only (float and tilt, a shadow in sync, a pulsing halo, rising question marks). The notFound page family ships no script, the logo is an asset the site already serves, and an SVG behind <img> cannot run scripts. Without a logo, a small inline illustration takes its place. - Every animation is behind motion-safe:, with keyframes in site.css, which only the landing and 404 pages load. - "404" headline, "Page not found" subheadline, one line of explanation. - "Go to docs" and "Back to home" with icons, visible labels, 44px touch targets and focus rings, stacked full width on mobile. A root deployment, where both point at "/", shows a single button. - URLs stay root-absolute under the deployment path, so the page works at any requested path. - configuration.mdx notes that the logo is the 404 mascot.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
ℹ️ No critical issues. One visual bug inline: the question-mark stagger doesn't apply.
Reviewed changes
Initial review (mode: standard) of the redesigned generated 404 page in @docubook/flame. Overall the page is in good shape and ready to merge once the one LOW finding below is fixed. The other two priorities are already met: logo URL resolution matches Navbar/Sidebar, and the motion is gated behind motion-safe:.
- Mascot from
navbar.logo: shown as a decorative<img>, resolved throughdocsAssetSrc()like the navbar logo. An inline SVG illustration is the fallback. - CSS-only motion: four
--animate-mascot-*theme animations and keyframes insite.css, which only thenotFoundand landing page families load. Every animation is gated behindmotion-safe:. - Actions: "Go to docs" and "Back to home" with lucide icons. At a root deployment, where both targets are
/, only one button is shown. All URLs stay under the deployment path. - Tests and docs: 8 render tests in
not-found-page.test.ts, a note inconfiguration.mdx, and a patch changeset.
What I checked locally: the new test file, tsc and oxlint are clean. I compiled site.css with the Tailwind CLI, and the motion-safe:animate-mascot-* utilities and keyframes are emitted. Under experimental.pages with FLAME_STANDALONE, "Back to home" goes through the root redirect index.html, so it is not a dead link.
claude-opus-5-5 | 𝕏
Stagger the rising question marks on the 404 page. The bare `[animation-delay:…]` utilities were emitted before the `motion-safe:animate-mascot-drift` rule. Its `animation` shorthand reset the delay to 0s, so all three marks rose together. With the same `motion-safe:` variant, Tailwind emits the delays after the shorthand in the same media block. Computed delays are now 0s, 1.6s and 3.2s.
There was a problem hiding this comment.
✅ No new issues found. The stagger fix is the right one, and the PR is ready to merge.
Reviewed changes
Incremental review (mode: standard) of da91a4d, which fixes the only finding from the previous review. Verdict: READY.
- Fixed the question-mark stagger: both delays now use
motion-safe:[animation-delay:…], so Tailwind emits them after themotion-safe:animate-mascot-driftshorthand in the sameprefers-reduced-motion: no-preferenceblock. Before, that shorthand reset the delay to0s. This matches the ordering I checked with the Tailwind CLI in the previous run, and reduced motion still stops all animation. - Added a regression test: it asserts both
motion-safe:delays are present and that no bare[animation-delay:is left. A comment in404.tsxexplains why the variant is needed.
claude-opus-5-5 | 𝕏

Why
The generated 404 page reused the landing page's
Hero: a bare "404", "Page not found" and one "Go to Docs" link without an icon. This PR gives it a mascot, a clearer hierarchy and better actions, and keeps the page as light as before.Changes
packages/flame/.docu/pages/404.tsx(rewritten) and.docu/styles/site.css:navbar.logofromdocu.json, so every site's 404 carries its own brand. It is rendered as an<img>and animated with CSS: a float with a slight tilt, a ground shadow that shrinks as it rises, a pulsing halo, and three question marks that rise in turn.notFoundpage family ships no script, and the logo is an asset the site already serves and caches.<img>cannot run scripts. Inlining an arbitrary project SVG could, and its ids could collide with the page.motion-safe:, so visitors who ask for reduced motion see a still page. The keyframes live insite.css, which only the landing and 404 pages load, so the docs CSS does not grow./, so a single "Back to home" button is shown.configuration.mdxnotes in thenavbarsection that the logo is also the 404 mascot. Patch changeset for@docubook/flame.Verification
flame preview, nested missing path/docs/guide/does/not/exist, flame's own docs with the panda logo):animation-name: none"Problems" covers failed requests, uncaught errors and CSP violations.
/404.html/docs/assets/images/docu.svg/docs/,/navbar.logo/404.html/docs/,//404.html/assets/images/docu.svg/experimental.pagesunder…/repo/docs/404.html/repo/docs/assets/images/docu.svg/repo/docs/,/repo/Bun and Node output is identical after normalizing nonces and hashes.
The built
site-*.csscontains the fouranimate-mascot-*utilities, their keyframes and theprefers-reduced-motionguard.vitest: 795 tests pass. The 9 new tests innot-found-page.test.tscover:motion-safe:on every animation;tsc,oxlint,prettierandtest:release-planare clean, and the pre-push hook passed.Review follow-up (da91a4d)
Pullfrog found that the question-mark stagger never applied. The bare
[animation-delay:…]utilities were emitted before themotion-safe:animate-mascot-driftrule, whoseanimationshorthand reset the delay to0s. Both delays now use themotion-safe:variant. In Chromium the computed delays went from0s, 0s, 0sto0s, 1.6s, 3.2s, and reduced motion still stops everything. A test checks the variant.