Skip to content

Desktop: make startup warmups cancellable and user-session scoped #8123

Closed

Description

@Git-on-my-level

Context

PR #8013 improves macOS desktop startup by deferring non-critical warmups. The direction is good, but follow-up cleanup should make the delayed warmup lifecycle explicit and user/session-scoped instead of leaving cancellation semantics spread across views/services.

Problem

Several post-interactive warmups are scheduled as delayed Task { sleep; work } blocks from different owners:

  • StartupWarmupCoordinator owns some DB/service/chat warmups and exposes cancel(), but no production caller currently cancels it on sign-out/reset.
  • DesktopHomeView schedules additional delayed side-effectful work such as Agent VM provisioning, conversation warmup, file indexing, and proactive monitoring.
  • CrispManager owns its own delayed initial poll.

This makes it easy for old delayed tasks to wake after sign-out, onboarding reset, auth-user switch, or app lifecycle changes.

Desired outcome

Create a single cancellable, user/session-scoped startup warmup owner (or equivalent lifecycle model) so delayed post-interactive work is:

  • tied to the signed-in user/session it was scheduled for,
  • cancelled on sign-out/reset/app termination where appropriate,
  • protected by post-delay cancellation/auth checks,
  • covered by focused scheduler/lifecycle tests rather than only policy-constant tests.

Notes

PR #8013 should keep only the minimal safety fixes needed to preserve the startup performance win. This issue tracks the broader lifecycle architecture cleanup.

Activity

  1. added a commit that references this issue on Jun 24, 2026
    620aa1d
  2. added
    p3
    on Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    desktopp3performancerefactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions