Skip to content

Feature: Refresh button#3447

Merged
mergify[bot] merged 4 commits into
mainfrom
feature/refresh-button
May 25, 2026
Merged

Feature: Refresh button#3447
mergify[bot] merged 4 commits into
mainfrom
feature/refresh-button

Conversation

@BornToBeRoot
Copy link
Copy Markdown
Owner

Changes proposed in this pull request

  • Refresh button in widgets

Copilot generated summary

Provide a Copilot generated summary of the changes in this pull request.

Copilot summary

This pull request refactors and streamlines the check/reload functionality across the dashboard widgets in the application. It replaces the previous "Reload" and "Check via hotkey" commands with a unified CheckCommand for each widget, updates the UI to include consistent reload buttons with animated feedback, and simplifies the codebase by removing redundant commands and methods. Additionally, it improves the user experience by providing visual feedback during ongoing checks.

Command and Code Refactoring:

  • Replaced all ReloadCommand and CheckViaHotkeyCommand implementations with a single CheckCommand for each widget's ViewModel, and removed associated redundant methods and actions (ReloadAction, CheckViaHotkeyAction). The new command also disables itself while a check is running for better UX. [1] [2] [3] [4]
  • Removed unnecessary duplicate checks for IsRunning in async check methods, as this is now handled by command logic. [1] [2]

UI/UX Improvements:

  • Updated the XAML for each widget to bind F5 and the reload button to CheckCommand instead of the old commands, and added a reload button with a spinning animation during checks, providing immediate visual feedback to the user. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Widget State Management:

  • Introduced an IsChecking property in NetworkConnectionWidgetViewModel (and used IsRunning in others) to track when a check is in progress, updating the UI accordingly. [1] [2] [3]

Dashboard Coordination:

  • Simplified dashboard logic by removing the global Check() method and directly invoking individual widget checks, ensuring all widgets are checked on dashboard load and only the network connection widget is checked when the view becomes visible.

Cleanup and Consistency:

  • Removed the old reload button from the window command bar, as each widget now has its own reload button for better clarity and user experience.

To-Do

Contributing

By submitting this pull request, I confirm the following:

Copilot AI review requested due to automatic review settings May 25, 2026 15:26
@github-actions github-actions Bot added this to the next-release milestone May 25, 2026
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 adds per-widget refresh controls to the Dashboard widgets and consolidates widget “check/reload” invocation under a single CheckCommand, with UI feedback (spinning refresh icon) during an active check.

Changes:

  • Replaced hotkey-only widget check commands with CheckCommand and bound F5 + a new refresh button to it in each widget view.
  • Added “reloading” animations in widget headers while checks are in progress.
  • Removed the StatusWindow-level reload button/command and adjusted dashboard check invocation behavior.

Reviewed changes

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

Show a summary per file
File Description
Source/NETworkManager/Views/NetworkConnectionWidgetView.xaml Binds F5 and a new header refresh button to CheckCommand and shows reload animation via IsChecking.
Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml Adds header refresh button + animation and rebinds F5 to CheckCommand.
Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml Adds header refresh button + animation and rebinds F5 to CheckCommand.
Source/NETworkManager/Views/DashboardView.xaml.cs Calls widget Check() methods directly; limits “visible” refresh to the network-connection widget.
Source/NETworkManager/ViewModels/NetworkConnectionWidgetViewModel.cs Introduces IsChecking for UI feedback and exposes CheckCommand.
Source/NETworkManager/ViewModels/IPApiIPGeolocationWidgetViewModel.cs Replaces hotkey command with CheckCommand and removes internal re-entrancy guard.
Source/NETworkManager/ViewModels/IPApiDNSResolverWidgetViewModel.cs Replaces hotkey command with CheckCommand and removes internal re-entrancy guard.
Source/NETworkManager/StatusWindow.xaml.cs Removes ReloadCommand.
Source/NETworkManager/StatusWindow.xaml Removes the window command-bar reload button.

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

Comment on lines 94 to 98
// Check is disabled via settings
if (!SettingsManager.Current.Dashboard_CheckIPApiDNSResolver)
return;

// Don't check multiple times if already running
if (IsRunning)
return;

IsRunning = true;
Comment on lines 568 to 572
_cancellationTokenSource.Dispose();
}
}

_cancellationTokenSource = new CancellationTokenSource();
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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Comment on lines +186 to +189
<Button Grid.Column="2" Command="{Binding CheckCommand}"
Style="{StaticResource CleanButton}"
VerticalAlignment="Center">
<Rectangle Width="20" Height="20"
Comment on lines +59 to +62
<Button Grid.Column="2" Command="{Binding CheckCommand}"
Style="{StaticResource CleanButton}"
VerticalAlignment="Center">
<Rectangle Width="20" Height="20"
Comment on lines +56 to +59
<Button Grid.Column="2" Command="{Binding CheckCommand}"
Style="{StaticResource CleanButton}"
VerticalAlignment="Center">
<Rectangle Width="20" Height="20"
Comment on lines +1 to 3

using NETworkManager.ViewModels;

@mergify mergify Bot merged commit 10f8aaa into main May 25, 2026
5 checks passed
@mergify mergify Bot deleted the feature/refresh-button branch May 25, 2026 16:26
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