Skip to content

Keep the app alive when the tray menu closes on a daemon launch (#5407) - #5431

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/daemon-tray-menu-shutdown-5407
Sep 22, 2026
Merged

Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/daemon-tray-menu-shutdown-5407

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request introduces a minor update to the application startup logic by explicitly setting the shutdown mode for the desktop application. This change ensures more controlled application shutdown behavior.

Application lifecycle management:

  • Set desktop.ShutdownMode to ShutdownMode.OnExplicitShutdown in the CreateAndShowMainWindow method to require explicit shutdown, improving control over application exit.

Dependency management:

  • Added a missing using Avalonia.Controls; directive to support the use of ShutdownMode.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused lifecycle change fixes the daemon tray behavior while preserving existing explicit quit handling.

Review effort: Balanced
Findings: None

What changed in this PR

Ensures daemon-launched instances remain alive after the tray menu closes by requiring explicit application shutdown.

Changes:

  • Sets Avalonia’s shutdown mode to OnExplicitShutdown.
  • Imports the required Avalonia.Controls namespace.
File Description
src/​UniGetUI.Avalonia/​App.axaml.cs Configures explicit shutdown before creating the main window.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@randy-but-a-ro randy-but-a-ro Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉

Integration Details
{
	"deliveryId": "aee44700-b69e-11f1-9045-1a2460a0838e",
	"headSha": "708deb9c9837bc4188d088f5a9d84b24d6039612",
	"reviewer": "copilot-pull-request-reviewer[bot]"
}

@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit d0d5165 into main Sep 22, 2026
6 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the fix/daemon-tray-menu-shutdown-5407 branch September 22, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[CRASH] Crash when clicking on "Available Updates" option in the system tray icon

2 participants