id: b83b91fd-f161-4b1f-af8c-a735351379a9 title: '404: emit branded 404.html and serve it on unknown paths' state: closed labels:
- ui assignees: [] milestone: null created: 2026-10-27T17:24:52.418458801Z updated: 2026-10-27T17:45:41.701471997Z
What
dist/ has no 404.html, and serve falls back to a bare stub (src/serve.rs:418) that differs from built pages:
- no footer/brand links
- stale nav (shows
taskseven when the built nav hides it) - only
not found/Nothing here.
On Cloudflare Pages and nginx, unknown paths show the host's default 404 instead of the site.
Reproduced
ls /tmp/rev/404.html # missing
curl -s http://127.0.0.1:39320/nope # stub page
Impact
Breaks the "one shape" requirement and looks broken at the most visible failure state.
Fix
- Emit a branded
404.htmlthrough the normal layout (nav/footer/provenance; empty-ish body). serve: for unknown paths, serve404.htmlwith status 404 if present; keep the stub only as a fallback.- Ensure
GET /and real files still 200; add tests for status + footer + nav consistency.