Skip to content

fix: refresh Claude widget on wake from sleep#22

Merged
bottlebrushes merged 1 commit intomainfrom
bettercoderthanyou/claude-sleep-fix
Feb 5, 2026
Merged

fix: refresh Claude widget on wake from sleep#22
bottlebrushes merged 1 commit intomainfrom
bettercoderthanyou/claude-sleep-fix

Conversation

@bottlebrushes
Copy link
Copy Markdown
Owner

Summary

  • Observes NSWorkspace.didWakeNotification to detect system wake
  • Restarts the 30-second polling timer and immediately fetches fresh data
  • Fixes stale Claude usage display after sleep/wake cycles

Test plan

  • Put Mac to sleep with Claude widget visible
  • Wake Mac and verify widget updates within a few seconds

🤖 Generated with Claude Code

The timer-based polling stops when macOS sleeps, leaving the widget
stale. Now observes NSWorkspace.didWakeNotification to restart the
timer and immediately fetch fresh data on wake.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bottlebrushes bottlebrushes merged commit e455793 into main Feb 5, 2026
@bottlebrushes bottlebrushes deleted the bettercoderthanyou/claude-sleep-fix branch February 5, 2026 20:34
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