Skip to content

Prevent the desktop app from sleeping during active generation or live sessions #77

@KSemenenko

Description

@KSemenenko

Problem

When dotPilot is actively generating output or running a live session, the desktop app should stop the computer from sleeping so long-running work is not interrupted.

Scope

  • Track OS-level sleep prevention while a session is actively generating or otherwise marked live
  • Define the exact trigger states that acquire the sleep-prevention lock
  • Define the exact release states that remove the lock when work is done, paused, failed, or otherwise no longer active
  • Cover macOS, Windows, and Linux desktop behavior
  • Keep the operator aware that the app is holding a sleep-prevention assertion

Out of scope

  • Browser or web-hosted behavior
  • Provider-specific keepalive hacks
  • Preventing sleep when no session is active
  • Hiding the sleep-prevention state from the operator

Implementation notes

  • Use native platform power-management APIs from the desktop host instead of fake background activity
  • Tie the behavior to explicit session lifecycle and generation state, not to vague heuristics
  • Acquire the assertion only while real foreground or background session work is active
  • Release it immediately when the session is completed, canceled, paused, failed, or otherwise no longer live
  • Make the state inspectable from the product so operators understand why the machine is being kept awake

Definition of Done

  • The issue defines when dotPilot must block system sleep and when it must release that block
  • The issue covers the operator-visible status for the sleep-prevention state
  • Later implementation can proceed without re-deciding the product behavior per OS

Verification

  • Review the issue against the session, fleet, and runtime-lifecycle backlog
  • The issue keeps sleep prevention explicit and bounded to active work only

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions