Skip to content

feat(desktop): prevent system sleep while app is running#299

Merged
anthhub merged 2 commits intomainfrom
feat/desktop-prevent-sleep
Mar 20, 2026
Merged

feat(desktop): prevent system sleep while app is running#299
anthhub merged 2 commits intomainfrom
feat/desktop-prevent-sleep

Conversation

@anthhub
Copy link
Copy Markdown

@anthhub anthhub commented Mar 20, 2026

Summary

  • Use Electron powerSaveBlocker API (prevent-app-suspension mode) to prevent the system from suspending the app while sidecar processes are running
  • Blocker starts after main window creation in app.whenReady(), released cleanly in before-quit
  • Zero new files, zero new dependencies — 7 lines added to apps/desktop/main/index.ts

Test plan

  • pnpm desktop:start — verify app launches normally
  • Confirm system does not auto-sleep while desktop app is running
  • Quit app and verify blocker is released (system resumes normal sleep behavior)

🤖 Generated with Claude Code

anthhub and others added 2 commits March 20, 2026 15:28
Use Electron's powerSaveBlocker API with "prevent-app-suspension" mode
to keep sidecar processes (controller, openclaw, web) alive during
system idle. The blocker starts after window creation and is released
on before-quit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@anthhub anthhub merged commit 663f288 into main Mar 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants