You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request introduces comprehensive support for tracking and handling system restarts required by package operations. It updates both backend data structures and the user interface to inform users when a restart is needed, provides clear notifications, and enables users to initiate a restart directly from the application. Documentation and localization are also updated to reflect these changes.
The most important changes are:
System Restart Tracking and Exposure:
Added fields to API responses and documentation to expose when a system restart is pending and which packages require it, including new documentation for "Pending machine restarts" in docs/IPC.md. [1][2][3]
User Interface Enhancements:
Added a new SystemRestartService to prompt the user and initiate a system restart, including confirmation dialogs and error handling.
Updated the tray icon and menu to display restart status, show a "Restart computer" option when needed, and update tooltips to reflect restart requirements. [1][2][3][4][5][6]
Notifications and Operation Feedback:
Refactored operation success notifications to append a restart-required message when applicable, using a new OperationNotificationText helper. [1][2][3][4]
ViewModel and State Management:
Updated application and operation state to track and expose restart requirements, including new fields in app info and operation history status labels. [1][2][3]
Localization and Documentation:
Added and updated English strings for all new user-facing messages related to restarts.
These changes ensure that users and fleet tools are clearly informed about pending restarts, can see which packages require them, and have an integrated way to complete the process.
The documented fields do not actually let a client enumerate all pending packages: the app response exposes only a count, while systemRestartPending only decorates packages returned by another query. A reboot-required uninstall is removed from the installed/upgradable loaders (PackageOperations.cs:1561-1566), so its pending record may have no package payload to query. Expose the pending entries through the app response or a dedicated endpoint, or narrow the claim that fleet tools can identify which packages are waiting.
Announce immersive restart confirmation to screen readers
This immersive confirmation is not guaranteed to be announced as a native modal window. The established pattern explicitly announces these prompts (PolicyEditorConfirmationPrompt.cs:43-48); without that, a screen-reader user may miss both the imminent restart warning and the focused action buttons.
Inserting enum member changes AutoRetry's numeric value
src/UniGetUI.PackageEngine.Enums/Enums.cs:47
Inserting RestartRequired before AutoRetry changes the existing public enum member's numeric value from 4 to 5. Previously built consumers or persisted numeric values for AutoRetry would now be interpreted as a restart requirement. Append the new member instead (or assign explicit stable values).
Reset SystemRestartRequired before each operation run
SystemRestartRequired is assigned only after _runOperation returns. The UI and IPC API allow retrying a succeeded operation, so a prior true remains exposed while the rerun is queued/running and remains set if that rerun takes an early cancellation path. Reset this per-run flag at the start of MainThreadCore, before any early return, so canceled history and live IPC do not report the previous attempt's result.
Persist restart-required result before post-operation cancellation
The store update only runs for the final OperationSucceeded event. Once a manager returns RestartRequired, _runOperation continues into post-operations; if the user cancels during one, the final event is canceled and no pending reboot is recorded even though the installer has already requested one. Capture and persist the restart-required result before post-operations or other late cancellation paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive support for tracking and handling system restarts required by package operations. It updates both backend data structures and the user interface to inform users when a restart is needed, provides clear notifications, and enables users to initiate a restart directly from the application. Documentation and localization are also updated to reflect these changes.
The most important changes are:
System Restart Tracking and Exposure:
docs/IPC.md. [1] [2] [3]User Interface Enhancements:
SystemRestartServiceto prompt the user and initiate a system restart, including confirmation dialogs and error handling.Notifications and Operation Feedback:
OperationNotificationTexthelper. [1] [2] [3] [4]ViewModel and State Management:
Localization and Documentation:
These changes ensure that users and fleet tools are clearly informed about pending restarts, can see which packages require them, and have an integrated way to complete the process.