1.7 KiB
1.7 KiB
Summary
This PR fixes the production white-screen regression and adjusts the GPU fallback so the Office tab does not get stuck on slow software rendering on macOS.
What Changed
-
Fixed packaged renderer loading after the main-process refactor.
electron-viteemits the bundled main process atout/main/index.js.- The release app must resolve
../renderer/index.htmlfrom that runtime directory, not../../renderer/index.html. - This fixes the production error:
Not allowed to load local resource: .../renderer/index.html.
-
Added production diagnostics for startup failures.
HERMES_OPEN_DEVTOOLS=1opens DevTools on launch.- Release builds expose
Help -> Toggle Developer Tools.
-
Aligned packaged renderer CSP with the main-process CSP.
- Allows file-backed startup assets for images, media, fonts, and frames.
- Keeps object loading blocked and base URI constrained.
-
Tuned GPU fallback behavior.
- macOS now ignores and clears stale
disable-gpu.flagby default to avoid permanently forcing the Office tab onto SwiftShader/software rendering. - Windows/Linux still honor the persistent GPU fallback by default for GPU crash-loop protection.
HERMES_GPU_FALLBACK=1can force the persistent fallback on any platform.HERMES_DISABLE_GPU=0still force-enables hardware acceleration and clears the stale flag.
- macOS now ignores and clears stale
Verification
npm run test -- tests/electron-security.test.ts tests/dashboard-csp.test.ts tests/gpu-fallback.test.tsnpm run test -- tests/gateway-restart.test.tsnpm run buildlat check
Notes
For immediate local recovery from the Office lag on macOS:
rm "$HOME/Library/Application Support/hermes-desktop/disable-gpu.flag"
Then relaunch Hermes One.