/**
* In-window screen shown when the sidecar dies under a running window.
* Replaces the dead web UI (which would otherwise sit there failing every
* fetch) with an explanation and a recovery path. Rendered as a data: URL
* in the existing BrowserWindow, so the preload bridge stays available —
* the buttons drive the same `window.executor` IPC the settings page uses.
*/
export interface CrashScreenOptions {
/** Whether a crash report was sent upstream (DSN build, not opted out). */
readonly reported: boolean;
}
export const sidecarCrashHtml = ({ reported }: CrashScreenOptions): string => `
Executor
⚠️
The local Executor server stopped unexpectedly
Your data is safe.${reported ? " A crash report was sent automatically so this can get fixed." : ""}
Restart the server to keep working.
Still won't start after restarting?
Reset data
clears a damaged database to get the app running again.