hermes-agent/apps/desktop/scripts
Teknium bddc5fd087
fix(desktop): fail loudly instead of blank-paging when the renderer bundle is missing (#41729)
A packaged desktop app launches to a blank page with a bare
ERR_FILE_NOT_FOUND when dist/index.html isn't in the bundle (#39484).
This happens when the build step fails (e.g. a stale checkout that
fails typecheck) but electron-builder packages anyway, shipping an
empty dist/.

- build-time: scripts/assert-dist-built.cjs runs at the tail of the
  `build` script and aborts before electron-builder if dist/index.html
  or the vite JS bundle is missing/empty. Every packaging path
  (pack, dist*) inherits it via `npm run build &&`.
- runtime: resolveRendererIndex() now logs a clear 'packaged without a
  renderer bundle — rebuild with hermes desktop --force-build' message
  when no index.html exists, instead of silently loading a missing path.
- runtime: resolveWebDist() logs when it falls back to an asar-internal
  dist that isn't a real directory (the dashboard 404 class, #41327/#39472),
  rather than returning an unservable path silently.

Adds scripts/assert-dist-built.test.cjs (node:test) covering the guard.
2026-06-07 22:04:39 -07:00
..
after-pack.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
assert-dist-built.cjs fix(desktop): fail loudly instead of blank-paging when the renderer bundle is missing (#41729) 2026-06-07 22:04:39 -07:00
assert-dist-built.test.cjs fix(desktop): fail loudly instead of blank-paging when the renderer bundle is missing (#41729) 2026-06-07 22:04:39 -07:00
assert-root-install.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
before-build.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
before-pack.cjs fix(desktop): recover from corrupt cached Electron download on build 2026-06-04 07:17:33 -07:00
before-pack.test.cjs fix(desktop): recover from corrupt cached Electron download on build 2026-06-04 07:17:33 -07:00
click-session.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
dev-no-hmr.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
diag-jump.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
diag-scroll-reset.mjs fix(desktop): stop chat scroll jumping by disabling native scroll anchoring 2026-06-02 23:08:01 -05:00
eval.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
leak-typing.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-jump.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-latency.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-real-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-submit.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
measure-synthetic-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
notarize-artifact.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
notarize.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
probe-renderer.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
probe-thread.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-long-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-real-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-synth-stream.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-typing-lag.md Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-typing.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
reload-renderer.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
reload.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
set-exe-identity.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
stage-native-deps.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
test-desktop.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
write-build-stamp.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00