Background
Originally proposed in Discussion #3718 by @gaursomya777-dev.
On multi-monitor or busy setups, users lose track of whether AionUi is still running when the main window is hidden to tray. Today the tray icon only has a context menu — a single left-click does nothing on many Linux DEs / Windows setups, or behaves inconsistently.
Acceptance criteria
- Left-click the tray icon toggles the main window (Windows / Linux):
- visible → hide to tray
- hidden / minimized → show + focus
- Right-click still opens the existing context menu (unchanged).
- macOS keeps the platform convention (click → menu); do not change macOS behavior.
- Reuse the existing show/hide helpers in
tray.ts (showAndFocus / hideToTray or equivalent) rather than duplicating logic.
- A unit-testable pure toggle helper for the visibility state.
- No AionCore / data-layer changes — main-process (
tray.ts) only.
Scope
packages/desktop/src/process/utils/tray.ts + a small pure helper + tests. Matches the standard pattern in Discord / Slack / VS Code.
Related
Background
On multi-monitor or busy setups, users lose track of whether AionUi is still running when the main window is hidden to tray. Today the tray icon only has a context menu — a single left-click does nothing on many Linux DEs / Windows setups, or behaves inconsistently.
Acceptance criteria
tray.ts(showAndFocus/hideToTrayor equivalent) rather than duplicating logic.tray.ts) only.Scope
packages/desktop/src/process/utils/tray.ts+ a small pure helper + tests. Matches the standard pattern in Discord / Slack / VS Code.Related