fix(wake-lock): allow display sleep during active work

Prevent idle system sleep on supported desktop runtimes without intentionally keeping the display awake. Narrow wake-lock activation to true active work states and drop the web screen-wake fallback where the platform cannot provide system-sleep-only behavior.
This commit is contained in:
Shantur Rathore
2026-04-21 20:58:40 +01:00
parent 1c317df6c0
commit 4a1147788c
9 changed files with 77 additions and 61 deletions

View File

@@ -92,7 +92,7 @@ export function setupCliIPC(mainWindow: BrowserWindow, cliManager: CliProcessMan
return { enabled: true }
}
try {
wakeLockId = powerSaveBlocker.start("prevent-display-sleep")
wakeLockId = powerSaveBlocker.start("prevent-app-suspension")
} catch {
wakeLockId = null
return { enabled: false }