fix: SPA routing was returning index.html for js assets too
the @app.get("/{full_path:path}") catch-all was registered before the
StaticFiles mount, so /_app/immutable/entry/start.*.js requests matched
the catch-all and returned index.html — browsers refuse to load JS
modules served as text/html, so the SPA never booted.
correct pattern:
1. StaticFiles mount serves real files (index.html, _app/*, favicon)
2. 404 handler catches client-side routes (/feed, /mind, ...) and
falls back to index.html — except for /api/* and /health which
stay JSON 404s.
also documented the routing layering so this doesn't get re-introduced.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>