* fix: detect stale static bundles in build pipeline and at runtime (#1064)
Add a packaging-time sanity check and a backend startup self-check that
verifies index.html only references /assets/*.js and /assets/*.css files
that actually exist on disk. This is the most common root cause of the
'Preparing backend...' / blank-page bug seen on the Windows immutable
Release packages: vite emits a fresh index.html with new content hashes,
but the desktop packaging step picks up a stale static/ directory, so
the browser receives a 404 (returned as application/json) for the main
bundle and refuses to execute it.
- scripts/check_static_assets.py: cross-platform sanity script.
- scripts/build-backend{.ps1,-macos.sh}: run the script after npm build
on the source static/, and again after PyInstaller on the packaged
static directory; fail the build on mismatch.
- api/app.py: log an actionable ERROR when an inconsistency is detected
at startup so the root cause appears in logs/desktop.log instead of
surfacing as a silent blank page.
- api/app.py: replace the StaticFiles mount with an explicit /assets/*
route so misses return a plain-text 404 with a JS/CSS Content-Type,
not the default JSON error response that masked diagnosis in #1064.
- tests/test_static_assets_consistency.py: 7 deterministic tests for
both code paths.
Refs #1064#1065#1050