Skip to content

Enhance update functionality and logging#4726

Merged
Gabriel Dufresne (GabrielDuf) merged 7 commits intomainfrom
UpdateIssue
May 8, 2026
Merged

Enhance update functionality and logging#4726
Gabriel Dufresne (GabrielDuf) merged 7 commits intomainfrom
UpdateIssue

Conversation

@GabrielDuf
Copy link
Copy Markdown
Contributor

@GabrielDuf Gabriel Dufresne (GabrielDuf) commented May 8, 2026

This pull request introduces significant improvements to the update flow for UniGetUI, focusing on better logging, user feedback, and robustness in handling interrupted update attempts. The changes also add a user-facing command to manually check for updates in the Avalonia UI and ensure all running app variants are properly terminated during updates or installation.

Key changes include:

Auto-updater logging and robustness improvements:

  • Introduced a dedicated per-attempt updater log in AutoUpdater.cs, allowing users to view logs specific to their last update attempt. This log is now used for all update-related logging, with new helper methods (LogUpdateInfo, LogUpdateWarn, etc.) replacing direct Logger calls. A "View log" button is now provided in relevant update banners for better troubleshooting.
  • Added detection for interrupted (orphaned) update attempts: on startup, if the previous update was interrupted, a warning banner is shown with an option to view the update log. This helps users understand if their update succeeded or failed.
  • Update banners now include more detailed feedback, including severity, titles, messages, and actionable buttons, improving user experience during update flows.

User interface enhancements:

  • Added a "Check for UniGetUI updates" menu item to the sidebar in the Avalonia UI, allowing users to manually trigger update checks. This is backed by a new command in SidebarViewModel.
  • The update banner in the Avalonia UI now properly reflects update status changes and can show results from both automatic and manual checks.

Installer and process management:

  • Ensured that UniGetUI.Avalonia.exe is also terminated during updates or uninstallation, preventing conflicts when replacing files. This change is reflected in both the Inno Setup script and the KillRunningApps procedure.

These changes collectively make the update process more transparent, robust, and user-friendly.

@GabrielDuf Gabriel Dufresne (GabrielDuf) marked this pull request as draft May 8, 2026 15:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances UniGetUI’s self-update experience across WinUI and Avalonia by adding per-attempt update logging, improved user-facing update status reporting (including “View log” actions), a manual “check for updates” command in the Avalonia sidebar, and stronger process termination during install/uninstall.

Changes:

  • Added a per-update-attempt log (persisted to a temp file) and “View log” affordances for update banners, plus startup detection of interrupted/orphaned update attempts.
  • Added manual “Check for UniGetUI updates” UI entry points (WinUI menu item + Avalonia sidebar command) and richer Avalonia banner status updates via a new StatusChanged event.
  • Updated installer/uninstaller behavior to terminate UniGetUI.Avalonia.exe to prevent file-replacement conflicts.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
UniGetUI.iss Ensures the Avalonia executable is terminated during install/uninstall to avoid update conflicts.
src/UniGetUI/Pages/MainView.xaml Adds a WinUI menu item to manually trigger a UniGetUI update check.
src/UniGetUI/Pages/MainView.xaml.cs Wires the new WinUI menu item to invoke the updater in manual/verbose mode.
src/UniGetUI/AutoUpdater.cs Adds per-attempt update logging, orphaned-attempt detection, and improved installer-exit handling + “View log” actions.
src/UniGetUI.Avalonia/Views/SidebarView.axaml Adds “Check for UniGetUI updates” menu item to the Avalonia sidebar.
src/UniGetUI.Avalonia/ViewModels/SidebarViewModel.cs Adds a command to trigger manual update checks from the Avalonia UI.
src/UniGetUI.Avalonia/ViewModels/MainWindowViewModel.cs Subscribes to updater status events and surfaces them through the Updates banner; checks for orphaned attempts at startup.
src/UniGetUI.Avalonia/Infrastructure/AvaloniaAutoUpdater.cs Adds per-attempt logging, richer status reporting, orphaned-attempt detection, and multi-platform installer launch behaviors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/UniGetUI.Avalonia/Infrastructure/AvaloniaAutoUpdater.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@GabrielDuf Gabriel Dufresne (GabrielDuf) changed the title Enhance update functionality and logging in Avalonia Enhance update functionality and logging May 8, 2026
@GabrielDuf Gabriel Dufresne (GabrielDuf) marked this pull request as ready for review May 8, 2026 18:14
@GabrielDuf Gabriel Dufresne (GabrielDuf) merged commit 18ac9b4 into main May 8, 2026
3 checks passed
@GabrielDuf Gabriel Dufresne (GabrielDuf) deleted the UpdateIssue branch May 8, 2026 19:26
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.

3 participants