Description
After minimizing to the system tray on Linux/Ubuntu, right-clicking the tray icon and selecting Quit does nothing. The app stays running and must be force-quit from the system monitor.
The tray Show option works fine — only Quit is broken.
Steps to Reproduce
- Launch Flo Cafe on Linux/Ubuntu
- Close the window — app minimizes to system tray
- Right-click the tray icon
- Click Quit
- App does not exit; process remains alive
Expected Behavior
Clicking Quit in the system tray context menu should cleanly terminate the app (tear down DB, servers, mDNS, destroy tray icon, exit process).
Current Behavior
Nothing happens. The app continues running in the background with no visible window and no tray icon interaction.
Investigation Notes
The tray Quit handler in main/index.ts does:
click: () => {
isQuitting = true;
app.quit();
}
This works on macOS/Windows but on Linux/Electron app.quit() can fail to terminate the process — especially when the window is minimized (not hidden) and the tray is the only remaining UI reference. The will-quit event may never fire, leaving the process stranded.
Possible fixes to explore:
- Use
app.exit(0) as a fallback after a short timeout if will-quit hasn't fired
- Ensure the window is destroyed before calling
app.quit() on Linux
- Listen for the
closed event on the window before calling app.quit()
Environment
- OS: Linux/Ubuntu
- Electron system tray via
Tray + Menu
- Window close is intercepted to minimize (not hide) on Linux
Description
After minimizing to the system tray on Linux/Ubuntu, right-clicking the tray icon and selecting Quit does nothing. The app stays running and must be force-quit from the system monitor.
The tray Show option works fine — only Quit is broken.
Steps to Reproduce
Expected Behavior
Clicking Quit in the system tray context menu should cleanly terminate the app (tear down DB, servers, mDNS, destroy tray icon, exit process).
Current Behavior
Nothing happens. The app continues running in the background with no visible window and no tray icon interaction.
Investigation Notes
The tray Quit handler in
main/index.tsdoes:This works on macOS/Windows but on Linux/Electron
app.quit()can fail to terminate the process — especially when the window is minimized (not hidden) and the tray is the only remaining UI reference. Thewill-quitevent may never fire, leaving the process stranded.Possible fixes to explore:
app.exit(0)as a fallback after a short timeout ifwill-quithasn't firedapp.quit()on Linuxclosedevent on the window before callingapp.quit()Environment
Tray+Menu