mount_spa's WEB_DIST.exists() check ran ONCE at mount time: a long-lived 'hermes dashboard --skip-build' that survived a git pull (or launched before the first build) installed a permanent no_frontend catch-all and answered 404 'Frontend not built' on every route forever — even after npm run build completed. Remote Desktop clients saw ERR_EMPTY_RESPONSE. The missing-dist branch is now reserved for the headless-serve contract only. The SPA routes mount unconditionally and already cope with a missing dist per-request (_serve_index returns the same 404 JSON when index.html is unreadable; the /assets mount gains check_dir=False so StaticFiles 404s instead of raising at mount). The dashboard recovers the moment a build lands on disk — no restart needed. Direction from #82666 by @codexbt (his PR's rebase dropped the product hunk, leaving only the test; the test is cherry-picked as-is and this commit restores the behavior it pins, adapted to the current mount_spa shape: headless guard preserved, per-request recovery instead of a per-request exists() check).
2 lines
8 B
Plaintext
2 lines
8 B
Plaintext
codexbt
|