Skip to content

[WEP] Expose the WebKit inactive scheduling policy on macOS - #6591

Draft
APshenkin wants to merge 1 commit into
wailsapp:masterfrom
APshenkin:wep-inactive-policy
Draft

APshenkin wants to merge 1 commit into
wailsapp:masterfrom
APshenkin:wep-inactive-policy

Conversation

@APshenkin

Copy link
Copy Markdown
Contributor

Description

Proposes Mac.WebviewPreferences.InactiveSchedulingPolicy, a per-window, opt-in option that maps one to one to WKPreferences.inactiveSchedulingPolicy on macOS 14+.

On macOS 14+ the WebContent process of a window that has never been shown is suspended by default, so a page in a Hidden: true window that waits on a timer before showing itself can hang. Applications cannot fix this themselves, because WebKit latches the policy when the page is created and Wails creates the WKWebView internally.

This overlaps with #5920, which uses the same WebKit preference and also covers Windows. The proposal explains the differences: named values instead of a boolean whose false is not the default, macOS only so it does not depend on the Windows dead-zone trade-off, and coverage of the CGO-free macOS backend. It also adds findings that apply either way, such as the behaviour being gated on the linked SDK.

The reference implementation is on darwin-inactive-policy. This PR contains only the proposal.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • WEP (proposal only; no implementation)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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.

1 participant