Skip to content

Conversation

@BornToBeRoot
Copy link
Owner

@BornToBeRoot BornToBeRoot commented Nov 12, 2025

Changes proposed in this pull request

  • PowerShell connect dialog
  • PuTTY connect dialog
  • Web Console dialog

To-Do

Contributing

By submitting this pull request, I confirm the following:

Copy link
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 migrates the PowerShell, PuTTY, and Web Console connect dialogs from the MahApps CustomDialog system to the SimpleChildWindow implementation, consistent with the recent RDP connect dialog changes. This migration improves usability and consistency across the application.

Key Changes:

  • Converted three connect dialogs (PowerShell, PuTTY, Web Console) from CustomDialog to ChildWindow
  • Removed old dialog UserControl files and created new ChildWindow implementations
  • Updated ViewModels to use synchronous callbacks and ChildWindow.IsOpen pattern instead of async dialog coordinator

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Website/docs/changelog/next-release.md Added changelog entries for the three new child window dialogs and fixed indentation formatting
Source/NETworkManager/Views/WebConsoleConnectDialog.xaml.cs Removed old UserControl-based dialog code-behind
Source/NETworkManager/Views/WebConsoleConnectChildWindow.xaml.cs Added new ChildWindow implementation with deferred focus using Dispatcher
Source/NETworkManager/Views/WebConsoleConnectChildWindow.xaml Converted from UserControl to ChildWindow with updated styling and margins
Source/NETworkManager/Views/RemoteDesktopConnectChildWindow.xaml.cs Removed unused parentWindow constructor parameter for consistency
Source/NETworkManager/Views/RemoteDesktopConnectChildWindow.xaml Fixed DataContext to use correct RemoteDesktopConnectViewModel
Source/NETworkManager/Views/PuTTYConnectDialog.xaml.cs Removed old UserControl-based dialog code-behind
Source/NETworkManager/Views/PuTTYConnectChildWindow.xaml.cs Added new ChildWindow implementation with deferred focus using Dispatcher
Source/NETworkManager/Views/PuTTYConnectChildWindow.xaml Converted from UserControl to ChildWindow with updated styling and margins
Source/NETworkManager/Views/PowerShellConnectDialog.xaml.cs Removed old UserControl-based dialog code-behind
Source/NETworkManager/Views/PowerShellConnectChildWindow.xaml.cs Added new ChildWindow implementation with deferred focus using Dispatcher
Source/NETworkManager/Views/PowerShellConnectChildWindow.xaml Converted from UserControl to ChildWindow with updated styling and margins
Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs Refactored Connect method to use ChildWindow with synchronous callbacks
Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs Removed parentWindow parameter from ChildWindow instantiation
Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs Refactored Connect method to use ChildWindow, simplified PuTTY.BuildCommandLine call
Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs Refactored Connect method to use ChildWindow with synchronous callbacks
Source/NETworkManager/ViewModels/PowerShellConnectViewModel.cs Modernized collection initialization syntax (new() to [])
Source/NETworkManager/Resources/Styles/ChildWindowStyles.xaml Increased default ChildWindow width from 450 to 500 pixels
Comments suppressed due to low confidence (3)

Source/NETworkManager/Views/WebConsoleConnectChildWindow.xaml:11

  • The xmlns:iconPacks namespace declaration is not used in this file and should be removed to keep the code clean.
    Source/NETworkManager/Views/PuTTYConnectChildWindow.xaml:12
  • The xmlns:iconPacks namespace declaration is not used in this file and should be removed to keep the code clean.
    Source/NETworkManager/Views/PowerShellConnectChildWindow.xaml:12
  • The xmlns:iconPacks namespace declaration is not used in this file and should be removed to keep the code clean.

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

Comment on lines 633 to 639
}, _ =>
{
childWindow.IsOpen = false;
ConfigurationManager.Current.IsChildWindowOpen = false;

customDialog.Content = new PuTTYConnectDialog
{
DataContext = connectViewModel
};
ConfigurationManager.OnDialogClose();
}, host);
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Inconsistent indentation in the cancel callback. The callback body is indented with extra spaces instead of following the standard indentation pattern used in the connect callback above and in the corresponding PowerShell and WebConsole implementations.

Copilot uses AI. Check for mistakes.
// Connect
Connect(sessionInfo);
}, async _ =>

Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Inconsistent blank line added after Connect(sessionInfo);. The WebConsole and PuTTY implementations don't have this extra blank line before the closing brace of the connect callback. For consistency, this blank line should be removed.

Suggested change

Copilot uses AI. Check for mistakes.
BornToBeRoot and others added 2 commits November 12, 2025 22:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mergify mergify bot merged commit 05d6666 into main Nov 12, 2025
4 checks passed
@mergify mergify bot deleted the feature/more_child_windows branch November 12, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants