docs: server-render a useful 404 page on both sites - #510
Conversation
Unknown paths on docs.plane.so and developers.plane.so returned a 404 whose body was an empty app shell (VitePress deliberately leaves #app empty in the 404.html it writes), so agents and no-JS clients got nothing to recover from. - packages/theme: new NotFound.vue with the "page not found" content — home, search, sitemap.xml, llms.txt, llms-full.txt, the sibling Plane docs site, a help link, and a hint for agents (append .md / Accept: text/markdown). Registered as <PlaneNotFound> and used as the Layout's default `not-found` slot so client-side navigation to a missing page shows the same content. Site-specific wording comes from a new `notFound` option on createPlaneTheme. - apps/*: docs/not-found.md renders the component; buildEnd moves the server-rendered not-found.html over 404.html and drops the stray copies. The page is noindex, excluded from search, llms.txt and the sitemap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CsPSwTnpsEb5c5Ud2CLrL8
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 28 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Item 3 from the
is-agenticscan (after #508, #509; independent of both).Problem. Unknown paths on both sites return a real 404 status, but the body is an empty app shell — VitePress deliberately writes
<div id="app"></div>into the404.htmlit generates (even with a custom404.md;hasCustom404only affects preload links). Agents and no-JS clients get nothing to recover from, and humans only see content after JS loads:Fix. One shared component, rendered in two places so humans and agents always see the same thing:
packages/theme/src/components/NotFound.vue— "Page not found" with where-to-look-next links: home, search (⌘K),/sitemap.xml,/llms.txt,/llms-full.txt, the other Plane docs site (so someone looking for the API on docs.plane.so gets pointed at developers.plane.so and vice versa), a help link, and a one-line hint for agents (append.mdor sendAccept: text/markdown). Registered as<PlaneNotFound>and used as the Layout's defaultnot-foundslot for client-side navigation to a missing page. Site-specific wording comes from a newnotFoundoption oncreatePlaneTheme.apps/*/docs/not-found.mdrenders the component as a normal page so VitePress fully server-renders it; each app's existingbuildEndthen movesnot-found.htmlover404.htmland removes the straynot-found.*copies. The page isnoindex,search: false,copyPage: false, excluded fromllms.txtand filtered out of the sitemap.Both sites are configured identically apart from the wording (site name, sibling site, help link).
Verification
pnpm check:types,check:format, andpnpm buildpass.dist/s:404.htmlcontains the full rendered content and all links;<title>Page not found | Plane</title>;robots: noindex, nofollow;not-found/404absent fromsitemap.xml,llms.txt,llms-full.txt; no leftovernot-found.html/.md.curl -s https://docs.plane.so/does-not-exist | grep -c "Where to look next"→1(and status stays 404).Checklist
llms.txtimprovements (cross-site links,## Optional, dedupe) — nextopenapi.jsonon developers.plane.so — blocked on a spec sourcenpx is-agenticon both hosts🤖 Generated with Claude Code
https://claude.ai/code/session_01CsPSwTnpsEb5c5Ud2CLrL8