Make GUI wake reliable + fail loud instead of silent no-op#24
Merged
Conversation
…nt no-op Two hardening fixes to the AppleScript that brings a target app to the front before keystroking a nudge (silent wake drops traced to this). - Force focus more reliably: `open -a` (forces launch + focus even when the app is hidden/minimized or another app holds focus — full-screen, Mission Control, a modal) followed by `activate`, instead of relying on `activate` alone. - Give the focus loop more budget: 5x0.2s (1s) -> 15x0.5s (7.5s). Stuck-poller incidents (2026-05-04) were ABORTs that cleared on the next nudge because activate needs longer when the user is across spaces / in another full-screen window. - Fail loud: on give-up, throw an AppleScript error (exit non-zero) instead of `return` (exit 0). Previously wake.sh logged "nudge sent" for what was actually a no-op (confirmed 3+ hours of silent ABORTs, 2026-05-05). No behavior change on the happy path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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.
Two hardening fixes to the AppleScript that brings a target app to the front before keystroking a nudge (silent wake drops traced to this). Recovered from the Mini clone.
open -a(forces launch + focus even when the app is hidden/minimized or another app holds focus — full-screen, Mission Control, a modal) followed byactivate, instead ofactivatealone.return(exit 0). Previouslywake.shlogged "nudge sent" for an actual no-op (3+ hours of silent ABORTs, 2026-05-05).No behavior change on the happy path.