Skip to content

fix(ui): force immediate reboot when user clicks Reboot now - #40

Merged
carterscode merged 1 commit into
mainfrom
fix/force-reboot-now
Jun 12, 2026
Merged

fix(ui): force immediate reboot when user clicks Reboot now#40
carterscode merged 1 commit into
mainfrom
fix/force-reboot-now

Conversation

@carterscode

Copy link
Copy Markdown
Owner

Clicking "Reboot now" — from the auto-apply toast or the Apply results window — could silently never reboot: it ran shutdown /r /t 30 without an explicit force flag, so any app with unsaved state could hold Windows at the "these apps are preventing restart" screen, and launch failures were swallowed by an empty catch. Both buttons now call a shared RebootHelper.ForceRebootNow() that runs shutdown /r /f /t 0 — an immediate restart that force-closes open applications without prompting to save. If the reboot can't be started, a warning dialog now shows the actual error instead of failing silently. Verified with dotnet build (0 warnings, warnings-as-errors) and the full xUnit suite (387 passed).


Compound Engineering
Claude Code

"Reboot now" ran shutdown /r /t 30 without /f, so apps with unsaved
state could block the restart and it silently never happened; launch
failures were also swallowed by an empty catch. Both buttons now share
RebootHelper.ForceRebootNow() which runs shutdown /r /f /t 0 and shows
a warning dialog if the reboot cannot be started.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment on lines +25 to +32
catch (Exception ex)
{
System.Windows.MessageBox.Show(
$"Could not start the reboot: {ex.Message}\n\nYou can reboot manually instead.",
"GamerGuardian",
System.Windows.MessageBoxButton.OK,
System.Windows.MessageBoxImage.Warning);
}
@carterscode
carterscode merged commit 0d17890 into main Jun 12, 2026
5 checks passed
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