Repository navigation
fix(app): keep Spotlight, Shortcuts and notification clicks from opening Settings - #546
Conversation
…ng Settings Spotlight and Shortcuts run MacTools actions through the system App Intents service (linkd), which reopens the app and later asks it to quit. Neither is a person asking for Settings, and quitting stopped features such as Keep Awake; MacTools now ignores both. A click on one of MacTools' own notifications also reopens the app: it no longer opens Settings, and a notification that names a file (a finished download) shows that file in Finder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the fix! One remaining issue is the notification delegate's registration timing. The delegate is still assigned in Please register I haven't verified this cold-start flow manually yet. A useful check would be to quit MacTools, click an existing file notification, and confirm that Finder reveals the file while Settings stays closed. |
The delegate was set when the runtime started, after instance coordination, so a click on a notification that launched MacTools could arrive with no delegate and the file was not shown. It is now set in applicationWillFinishLaunching, as Apple requires; the click handler needs nothing from the runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, good catch. Fixed in 3168ad1: the delegate is now set in
|
…and-downloads # Conflicts: # docs/plugins/preferences-backup-inventory.md
Problem and result
Running a MacTools action from Spotlight or Shortcuts goes through the system App Intents service (
linkd). That service reopens the app, which MacTools treated as a request to show Settings, and later asks the app to quit, which stopped features such as Keep Awake. Clicking one of MacTools' own notifications also reopens the app, so Settings opened then too.Now:
MacTools.revealFileURL, an existing absolute path) shows that file in Finder when clicked. Nothing is opened or run.linkdlimits how often it accepts updates.Changes
MacToolsAppDelegate:linkdfor the App Intents service, and Notification Centre orusernotedfor notification clicks.applicationWillFinishLaunching, before instance coordination starts, so a click that launches MacTools is handled.MacToolsAppIntentCoordinator: publishes the actions to Spotlight and Shortcuts only when they differ from the last ones published.MacToolsAppIntents: action lookups from Spotlight and Shortcuts count as activity.There is no change to permissions or stored data, and no PluginKit change.
Verification
MacToolsAppDelegateTestsandMacToolsAppIntentCoordinatorTests, within the full XCTest suite: pass, 3,327 tests, 0 failures (6 skipped by upstream's own settings)make script-tests: pass (changelog, localization, website data, backup inventory, and 275 tooling tests)UI evidence
Not applicable: nothing on screen changes, except that Settings no longer opens.
Checklist
🤖 Generated with Claude Code