You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Application: One instance on Windows and Linux #1384
Part of #1306. The roadmap's Application and windows section lists this item (line 151 of docs/roadmap.md at f7fc2f5c) with no issue.
Reference: A named mutex and pipe; a Unix socket; NSH's #1563
Acceptance
A second launch hands its arguments to the running app, which hears OnReopen, and the files it names OnOpenFiles; the mutex/pipe and socket handoff is implemented, and nsgo.InstanceKey scopes it so separate profiles or test runs each own one, while surfaces, tray icons and global shortcuts remain
Audited current main ab9bfd1 against this acceptance. The requested single-instance behavior is already implemented:
nsgo.InstanceKey scopes the app ID's lock/channel; the default and distinct profile keys can own separate instances.
Linux Run claims its private flock/Unix socket before starting GTK or the engine; Windows Run claims its session-scoped named mutex/pipe before creating the app. A later launch hands over and returns early.
Both backends route the received launch to EventReopen / OnReopen, file arguments to EventOpenFiles / OnOpenFiles, and links to their separate handler. Files received before a handler registers are queued.
Verification: all six existing Linux instance tests passed using real sockets/locks, including keyed isolation, Flatpak shared runtime paths, stale sockets and private paths. Three core reopen/open-file/open-link tests passed. On Windows 11, an isolated kernel-only fixture compiled from the unmodified Windows instance implementation and its existing TestInstanceHandsOffByKey passed against actual named mutexes/pipes (default plus two profile owners, files and links); no GUI simulation or desktop-visibility claim is involved.
No missing implementation was found, so no source change or new PR is needed. The remaining surface, tray and shortcut work has separate issues, including #1374, #1382 and #1383. Closing this already-completed item.
Activity
houko commentedon Nov 22, 2026
Audited current main ab9bfd1 against this acceptance. The requested single-instance behavior is already implemented:
nsgo.InstanceKeyscopes the app ID's lock/channel; the default and distinct profile keys can own separate instances.Runclaims its private flock/Unix socket before starting GTK or the engine; WindowsRunclaims its session-scoped named mutex/pipe before creating the app. A later launch hands over and returns early.EventReopen/OnReopen, file arguments toEventOpenFiles/OnOpenFiles, and links to their separate handler. Files received before a handler registers are queued.Sources: public option, Linux transport, Windows transport, and application contract.
Verification: all six existing Linux instance tests passed using real sockets/locks, including keyed isolation, Flatpak shared runtime paths, stale sockets and private paths. Three core reopen/open-file/open-link tests passed. On Windows 11, an isolated kernel-only fixture compiled from the unmodified Windows instance implementation and its existing
TestInstanceHandsOffByKeypassed against actual named mutexes/pipes (default plus two profile owners, files and links); no GUI simulation or desktop-visibility claim is involved.No missing implementation was found, so no source change or new PR is needed. The remaining surface, tray and shortcut work has separate issues, including #1374, #1382 and #1383. Closing this already-completed item.