Repository navigation
fix(darwin): admit running apps when Launch Services omits the start time - #36
Merged
Merged
Conversation
…time NSRunningApplication.launchDate is nil for live apps the Mac did not launch through Launch Services. listApps and pid lookup treated that as app_not_found. Keep the Launch Services date when it exists, and use the kernel start time otherwise, so process identity stays stable for the life of the pid.
…s it The ?? at the call site skips proc_pidinfo for apps that already have a launch date. The one-line combiner and the tests that pinned it are gone.
macos-15-intel compiles the universal release helper inside the packaging beforeAll. On Node 24 that build finished, then Vitest stopped the hook at 300s before pnpm pack. Ten minutes covers the pack step that follows.
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.
Why
macOS app lookup required
NSRunningApplication.launchDate. Launch Services leaves that date nil for live apps it did not start, including dev Electron, Ollama, Finder, and some Python processes. Name, bundle id, andpid:queries then returnedapp_not_foundeven though the process was running. Refreshing the app list could not help, because the same check ran every time.Scope
runningAppDescriptorusesapp.launchDate ?? kernelProcessStartDate(pid:). Apps that already have a Launch Services date keep it, and the kernel call runs only when that date is missing.listAppsandappByPidshare that function. Regular-app filtering and one-row-per-bundle-id dedupe are unchanged.Verification
swift test --package-path native/macos— 56 tests passed.com.electron.ollama), Electron (com.github.Electron, pid 47709), and severalorg.python.pythonprocesses. The installed helper was not replaced, so this desktop check used the same clock the new function reads.