mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-16 19:36:54 +00:00
The setup launcher had no LSUIElement, and its already-installed hand-off ran after Tauri/AppKit, whose default activation policy is Regular. That registered the setup bundle as a second Dock app beside the real desktop. Hand off before constructing Tauri, and restore Regular activation only when the installer UI is actually shown. On macOS the Electron single-instance lock also ran before deep-link registration. setAsDefaultProtocolClient relaunches the app through Launch Services, so the loser already had a Dock icon by the time the lock failed and app.exit(0) ran. Register the protocol first. The lock-losing instance still hard-exits before ready. Fixes #73151
17 lines
774 B
TypeScript
17 lines
774 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { deepLinkRegistersBeforeSingleInstanceLock, preReadyDockLaunchSteps } from './dock-launch-order'
|
|
|
|
describe('macOS Dock launch order', () => {
|
|
it('registers the deep link before the single-instance lock', () => {
|
|
expect(preReadyDockLaunchSteps('darwin')).toEqual(['register-deep-link', 'single-instance-lock'])
|
|
expect(deepLinkRegistersBeforeSingleInstanceLock('darwin')).toBe(true)
|
|
})
|
|
|
|
it('keeps non-macOS platforms on the lock at module load, with no Dock race', () => {
|
|
for (const platform of ['win32', 'linux', 'freebsd']) {
|
|
expect(preReadyDockLaunchSteps(platform)).toEqual(['single-instance-lock'])
|
|
expect(deepLinkRegistersBeforeSingleInstanceLock(platform)).toBe(false)
|
|
}
|
|
})
|
|
})
|