perf: reduce desktop quit risk polling

Refresh quit risk only when quitting
Use in-process status for Electron local server
Avoid repeated scheduled task status scans
This commit is contained in:
Bohdan Triapitsyn
2026-04-30 13:54:58 +03:00
parent bbd83d60c6
commit 8152bd7808
4 changed files with 50 additions and 21 deletions
+6
View File
@@ -1233,6 +1233,12 @@ async function main(options = {}) {
getPort: () => tunnelRuntimeContext.getActivePort(),
getOpenCodePort: () => openCodePort,
getTunnelUrl: () => tunnelService.getPublicUrl(),
getQuitRiskStatus: () => ({
tunnel: {
active: Boolean(tunnelService.getPublicUrl()),
},
scheduledTasks: scheduledTasksRuntime.getStatus(),
}),
isReady: () => isOpenCodeReady,
restartOpenCode: () => restartOpenCode(),
stop: (shutdownOptions = {}) =>