Skip to content

fix(tray): improve app launcher ordering and lifecycle - #818

Merged
kernalix7 merged 5 commits into
kernalix7:mainfrom
silentone12725:fix/tray-app-menu
Aug 13, 2026
Merged

fix(tray): improve app launcher ordering and lifecycle#818
kernalix7 merged 5 commits into
kernalix7:mainfrom
silentone12725:fix/tray-app-menu

Conversation

@silentone12725

@silentone12725 silentone12725 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Improve the WinPodX system-tray application launcher so tray-launched
Windows applications use the same launch metadata and lifecycle handling
as the rest of the application-launch path.

Previously, the tray menu built launch callbacks from only an application's
executable and display name. This meant tray launches could lose additional
AppInfo launch metadata such as URI handling, window-class hints, default
arguments, icons, and RDP overrides.

This PR keeps the complete AppInfo object with each tray action and passes
its launch configuration through to launch_app().

Changes

Tray application launcher

Updated src/winpodx/desktop/tray.py so tray launch actions now:

  • retain the complete AppInfo object instead of reducing it to only the
    executable and display name;
  • pass launch_uri through to launch_app();
  • pass wm_class_hint through to launch_app();
  • pass application args through as default_args;
  • pass the application's icon path through as app_icon;
  • pass rdp_overrides through to launch_app();
  • continue displaying the application's full name in the tray notification;
  • preserve the existing runtime-error handling and launch notification flow.

This ensures applications launched from the system tray retain the same
launch contract expected by the rest of WinPodX.

Tray menu handling

The tray launcher callback now operates directly on AppInfo, avoiding the
previous loss of application metadata when constructing the QAction
callbacks.

This also keeps the tray application's launch behavior aligned with the
application discovery model rather than reconstructing launch information
from individual fields.

Tests

Added dedicated coverage in:

text
tests/test_tray_app_menu.py

Focused tray test suite:

text
env PYTHONPATH="$PWD/src" python -m pytest tests/test_tray_app_menu.py -q

10 passed in 0.02s

Checklist

  • pytest tests/test_tray_app_menu.py -q: all tests pass (10 passed)
  • pytest tests/ -v: all tests pass
  • ruff check src/ tests/: zero errors
  • ruff format --check src/ tests/: formatted
  • Documentation updated (CHANGELOG, docs: both ko & en)
  • No hardcoded paths, credentials, or personal info

Screenshots

image

@silentone12725
silentone12725 marked this pull request as draft August 8, 2026 09:36
@silentone12725
silentone12725 marked this pull request as ready for review August 8, 2026 12:18
@kernalix7 kernalix7 self-assigned this Aug 10, 2026
@kernalix7
kernalix7 merged commit 9c5d0ba into kernalix7:main Aug 13, 2026
@kernalix7

Copy link
Copy Markdown
Owner

Thanks — merged.

I kept the full AppInfo launch path, hidden-app filtering, tiered ordering, and removal of the 20-app cap. Before merging, I added two tray-specific safeguards: menu rebuilding now preserves the last working menu when the app catalogue or metadata cannot be read, and the app submenu also refreshes on the existing status timer because KDE Plasma does not reliably deliver nested aboutToShow signals. I also kept the original translated empty-state key.

The source-shape checks were replaced with behavioral coverage for ordering, filtering, launch metadata, QAction ownership, the empty state, and failed refreshes. Focused tray tests pass (19 passed), Ruff and formatting are clean, version stamps remain consistent, and the changed code parses under the Python 3.9 grammar. The older branch still has eight unrelated setup/migrate tests that reach the real Podman/RDP environment; those were not caused by this PR.

Appreciate the contribution — the tray now launches apps through the same metadata contract as the other entry points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants