fix(app-detection): match macOS nested app identities#196
Conversation
|
@chenqianhe can you provide an example app we can test with? |
I originally ran into this with a game platform app, but that may not be a convenient test case for everyone. I asked AI to help find some more common examples of real nested macOS apps that should be easier to test, such as Xcode Simulator or Instruments. The key case is a focusable app whose .app bundle lives inside another .app bundle, not just an Electron helper process. Examples:
These are normal focusable apps/windows, but their bundle path is nested under another outer .app. The behavior to test is: when the foreground app resolves to the nested bundle, Mouser should include both the inner app identity and the outer containing .app identity, so a specific nested profile can win while an outer-app profile can still work as fallback. |
|
@chenqianhe thanks will try with ios simulator |
Fix macOS per-app profile matching for apps that launch nested or helper app bundles.
Previously, Mouser matched the foreground macOS app using a single identifier. Some apps launch secondary
.appbundles from inside the main application bundle, which caused profile matching to miss the configured host app profile. This PR changes foreground app detection to return an ordered tuple of app identities, from the most specific nested app to broader host app identities, so profile lookup can first match a nested app profile and then fall back to the host app profile.Changes