Skip to content

feat(tray): left-click tray icon toggles show/hide main window (Windows/Linux) #3725

Description

@IceyLiu

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

  1. Left-click the tray icon toggles the main window (Windows / Linux):
    • visible → hide to tray
    • hidden / minimized → show + focus
  2. Right-click still opens the existing context menu (unchanged).
  3. macOS keeps the platform convention (click → menu); do not change macOS behavior.
  4. Reuse the existing show/hide helpers in tray.ts (showAndFocus / hideToTray or equivalent) rather than duplicating logic.
  5. A unit-testable pure toggle helper for the visibility state.
  6. 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

Metadata

Metadata

Labels

bonusCampaign bonus issue — claim it, propose a fix, get assigned, then PR countsenhancementNew feature or requestneeds-triageNeeds maintainer review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions