Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update PreferencesWindowController.strings#3

Closed
la32094uf wants to merge 1 commit into
domzilla:masterdomzilla/Caffeine:masterfrom
la32094uf:patch-1la32094uf/Caffeine:patch-1Copy head branch name to clipboard
Closed

Update PreferencesWindowController.strings#3
la32094uf wants to merge 1 commit into
domzilla:masterdomzilla/Caffeine:masterfrom
la32094uf:patch-1la32094uf/Caffeine:patch-1Copy head branch name to clipboard

Conversation

@la32094uf

Copy link
Copy Markdown

Better translation for the word Quit

Better translation for the word Quit
@domzilla domzilla closed this Nov 23, 2025
bubbleee030 added a commit to bubbleee030/Caffeine that referenced this pull request May 19, 2026
#1 SleepPreventionManager.refreshAssertions now creates the three new
   assertions before releasing the old IDs, so the kernel always sees at
   least one of each type during a refresh (swap-then-release, not
   release-then-create). The doc comment claimed overlap but the code
   left a microsecond gap. New testRefreshCreatesNewAssertionsBeforeReleasingOld
   pins the ordering via an operationLog on the test fake.

domzilla#2 NSWorkspace session observers now use the Combine publisher API with
   AnyCancellable, so they detach automatically when the manager
   deallocates. The previous selector-based addObserver retained the
   target forever — fine for the production singleton, but every test
   that constructed a SleepPreventionManager(backend:) leaked two
   observers. testManagerDeallocatesWhenOutOfScope proves the leak is
   fixed via a weak ref.

domzilla#3 LaunchAtLoginManager.setEnabled now logs the underlying error via
   os.Logger (subsystem net.domzilla.caffeine, visible in Console.app)
   and surfaces it on a public `lastError` property so the UI layer can
   present it to the user. refresh() still snaps the published isEnabled
   back to the backend truth, so a failed register visually pops the
   Toggle back to off. Two new tests cover lastError set on throw and
   cleared on next success.

domzilla#4 scripts/integration-test.sh replaces the fixed 3 s sleep with a
   poll_for_caffeine_assertions helper that retries pmset every second
   until Caffeine-owned assertions appear (default 30 s timeout,
   overridable via ASSERTION_POLL_TIMEOUT). Avoids flakiness on slow
   runners where SwiftUI initialization takes longer than 3 s.
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.