Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

Project time: pass the app's pid to the main actor, not the notification

Claude8f55d3f3d5a3
diff --git a/NotchBuddy/Sources/App/ProjectTime.swift b/NotchBuddy/Sources/App/ProjectTime.swift
index 7811ac0a..94311ed6 100644
--- a/NotchBuddy/Sources/App/ProjectTime.swift
+++ b/NotchBuddy/Sources/App/ProjectTime.swift
@@ -42,8 +42,9 @@ final class ProjectTime: ObservableObject {
started = true
let ws = NSWorkspace.shared.notificationCenter
ws.addObserver(forName: NSWorkspace.didActivateApplicationNotification, object: nil, queue: .main) { note in
+ let pid = (note.userInfo?[NSWorkspace.applicationUserInfoKey] as? NSRunningApplication)?.processIdentifier
MainActor.assumeIsolated {
- ProjectTime.shared.follow(note.userInfo?[NSWorkspace.applicationUserInfoKey] as? NSRunningApplication)
+ ProjectTime.shared.follow(pid.flatMap { NSRunningApplication(processIdentifier: $0) })
}
}
for name in [NSWorkspace.screensDidSleepNotification, NSWorkspace.willSleepNotification] {