Main window can be stranded on a dead Space and becomes unreachable in menu-bar-only mode
Symptom
With "Hide from Dock & App Switcher" enabled (accessory activation policy), the main window can become permanently invisible:
- App launches,
AppDelegatelogs "Brought main window to front", but the window never appears — on any Space - Menu bar → Settings... does nothing
- CGWindowList shows the window exists (alpha=1, layer 0) with
kCGWindowIsOnscreen=false - Accessibility/System Events reports 0 windows for the process
Root cause
The window server can leave the main window bound to another Space — including a defunct one left over from a previous session (observed after repeated relaunches; cleared only by a session lock/unlock). All reveal paths (orderFrontRegardless() / makeKeyAndOrderFront) order the window front within its own Space and report success. In accessory mode the user has no recovery affordance: no Dock icon, no Cmd+Tab, and macOS won't switch Spaces for an accessory app. With ShowInDock=true the same build recovers, because activating a regular app can jump to its window's Space — which is why the bug only manifests in menu-bar-only mode.
Fix
Insert .moveToActiveSpace into the main window's collection behavior at every reveal site, so the window is collected onto the Space the user is currently viewing instead of being ordered front on a Space they can't reach.
Affected paths: AppDelegate.bringMainWindowToFrontIfPresent(), MenuBarManager.bringToFront(_:).
@shreeraman96 Does this not work ? I just hit open fluidvoice from menu bar and it shows up
This was a very specific use case that created this. Honestly, I am not able to reproduce to test this fix after. Should be good to close this out . Will raise if it comes up again.,