From 78e2e310fb8b9f8d0b0f590d539d52937794386c Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Thu, 19 Mar 2026 21:11:25 -0400 Subject: [PATCH 1/2] Add confirmation dialog before update restart Shows "The application will close and restart with the new version. Continue?" with Restart Now / Later buttons before applying the update and restarting. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/PlanViewer.App/AboutWindow.axaml.cs | 43 +++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/src/PlanViewer.App/AboutWindow.axaml.cs b/src/PlanViewer.App/AboutWindow.axaml.cs index d05e435..c66bdca 100644 --- a/src/PlanViewer.App/AboutWindow.axaml.cs +++ b/src/PlanViewer.App/AboutWindow.axaml.cs @@ -136,10 +136,49 @@ private async void CheckUpdate_Click(object? sender, RoutedEventArgs e) private async void UpdateLink_Click(object? sender, PointerPressedEventArgs e) { - // Step 3: User clicks "Restart now" after download + // Step 3: User clicks "Restart now" after download — confirm first if (_updateDownloaded && _velopackMgr != null && _velopackUpdate != null) { - _velopackMgr.ApplyUpdatesAndRestart(_velopackUpdate.TargetFullRelease); + var dialog = new Avalonia.Controls.Window + { + Title = "Update Ready", + Width = 350, Height = 150, + WindowStartupLocation = Avalonia.Controls.WindowStartupLocation.CenterOwner, + CanResize = false + }; + + var result = false; + var panel = new Avalonia.Controls.StackPanel + { + Margin = new Avalonia.Thickness(20), + Spacing = 15 + }; + panel.Children.Add(new Avalonia.Controls.TextBlock + { + Text = "The application will close and restart with the new version. Continue?", + TextWrapping = Avalonia.Media.TextWrapping.Wrap + }); + var buttonPanel = new Avalonia.Controls.StackPanel + { + Orientation = Avalonia.Layout.Orientation.Horizontal, + HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Right, + Spacing = 8 + }; + var okButton = new Avalonia.Controls.Button { Content = "Restart Now" }; + var cancelButton = new Avalonia.Controls.Button { Content = "Later" }; + okButton.Click += (_, _) => { result = true; dialog.Close(); }; + cancelButton.Click += (_, _) => { dialog.Close(); }; + buttonPanel.Children.Add(okButton); + buttonPanel.Children.Add(cancelButton); + panel.Children.Add(buttonPanel); + dialog.Content = panel; + + await dialog.ShowDialog(this); + + if (result) + { + _velopackMgr.ApplyUpdatesAndRestart(_velopackUpdate.TargetFullRelease); + } return; } From 0b5d2784cd1c909fdaea681bedf6974d520d8fd2 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Thu, 19 Mar 2026 21:15:51 -0400 Subject: [PATCH 2/2] Bump to v1.2.5 --- src/PlanViewer.App/PlanViewer.App.csproj | 2 +- src/PlanViewer.Cli/PlanViewer.Cli.csproj | 2 +- src/PlanViewer.Core/PlanViewer.Core.csproj | 2 +- src/PlanViewer.Ssms.Installer/PlanViewer.Ssms.Installer.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PlanViewer.App/PlanViewer.App.csproj b/src/PlanViewer.App/PlanViewer.App.csproj index 3ed5833..54f8908 100644 --- a/src/PlanViewer.App/PlanViewer.App.csproj +++ b/src/PlanViewer.App/PlanViewer.App.csproj @@ -6,7 +6,7 @@ app.manifest EDD.ico true - 1.2.4 + 1.2.5 Erik Darling Darling Data LLC Performance Studio diff --git a/src/PlanViewer.Cli/PlanViewer.Cli.csproj b/src/PlanViewer.Cli/PlanViewer.Cli.csproj index 111629e..66a0e68 100644 --- a/src/PlanViewer.Cli/PlanViewer.Cli.csproj +++ b/src/PlanViewer.Cli/PlanViewer.Cli.csproj @@ -11,7 +11,7 @@ enable PlanViewer.Cli planview - 1.2.4 + 1.2.5 Erik Darling Darling Data LLC Performance Studio diff --git a/src/PlanViewer.Core/PlanViewer.Core.csproj b/src/PlanViewer.Core/PlanViewer.Core.csproj index 5c277ec..f02483d 100644 --- a/src/PlanViewer.Core/PlanViewer.Core.csproj +++ b/src/PlanViewer.Core/PlanViewer.Core.csproj @@ -5,7 +5,7 @@ enable enable PlanViewer.Core - 1.2.4 + 1.2.5 Erik Darling Darling Data LLC SQL Performance Studio diff --git a/src/PlanViewer.Ssms.Installer/PlanViewer.Ssms.Installer.csproj b/src/PlanViewer.Ssms.Installer/PlanViewer.Ssms.Installer.csproj index 469a553..a8f8bc0 100644 --- a/src/PlanViewer.Ssms.Installer/PlanViewer.Ssms.Installer.csproj +++ b/src/PlanViewer.Ssms.Installer/PlanViewer.Ssms.Installer.csproj @@ -6,7 +6,7 @@ InstallSsmsExtension PlanViewer.Ssms.Installer app.manifest - 1.2.4 + 1.2.5 Erik Darling Darling Data LLC SQL Performance Studio