Repository navigation
Pause data services while the dashboard is hidden - #36
Open
edward-mcnair wants to merge 1 commit into
Open
edward-mcnair wants to merge 1 commit into
edward-mcnair wants to merge 1 commit into
Conversation
When the displays sleep or the dashboard waits for its display, nothing is on screen to update, but metrics, network, disk, SMC, process, Wi-Fi, Bluetooth and Now Playing kept polling (Now Playing runs an AppleScript helper every 5 s) all night. AppModel.suspendBackgroundWork() stops them when the dashboard is parked or its display is missing; resumeBackgroundWork() restarts them when it is placed again. Touch keeps running. Widgets added while suspended start on resume. The staggered start also re-checks, after its delay, that the service is still wanted and that nothing suspended in between. Before, removing a widget (or undoing an add) within that delay left the service polling with nothing to stop it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
When the displays sleep, or the dashboard waits for its display, nothing is on screen to update. Even so, metrics, network, disk, SMC, process, Wi-Fi, Bluetooth and Now Playing kept polling all night; Now Playing runs an AppleScript helper every 5 s.
AppModel.suspendBackgroundWork()stops them when the dashboard is parked or its display is missing.resumeBackgroundWork()restarts them when it's placed again.Tests: none new. The behaviour lives in
AppModel, whose services can't run headless in the test target. Running on a XENEON EDGE in a fork through sleep, wake and screen lock.Screenshots
No UI change.
Checklist
swift-formatlint clean)Note: overlaps #30 in
retryRepin; I'll rebase whichever lands second.🤖 Generated with Claude Code