Skip to content

Feature: Redesign Status Window#3359

Merged
mergify[bot] merged 6 commits intomainfrom
feature/re-design-status-window
Mar 8, 2026
Merged

Feature: Redesign Status Window#3359
mergify[bot] merged 6 commits intomainfrom
feature/re-design-status-window

Conversation

@BornToBeRoot
Copy link
Owner

Changes proposed in this pull request

  • Re-design status window

Copilot generated summary

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

Copilot summary

This pull request introduces enhancements to the status window countdown functionality and improves localization support. The most significant changes include implementing a smooth, visually appealing countdown ring using a new converter, updating timer logic for accuracy and smoother UI, and adding new localized strings for better user experience.

Countdown ring and timer improvements:

  • Added TimeToStrokeDashOffsetConverter to calculate the stroke dash offset for a circular countdown ring, enabling a smooth visual countdown in the status window (TimeToStrokeDashOffsetConverter.cs).
  • Refactored timer logic in StatusWindow.xaml.cs to use double for Time and TimeMax, a Stopwatch for precise timing, and updated the dispatcher timer to DispatcherPriority.Render for smoother UI. The countdown is now based on elapsed time rather than decrementing an integer. [1] [2] [3] [4] [5]
  • Updated the XAML for StatusWindow.xaml to display a circular countdown ring using the new converter, reorganized window command buttons with icon pack visuals, and restored the title bar and close button for improved usability.

Localization enhancements:

  • Added new string resources NetworkConnection and NetworkStatus to Strings.resx and exposed them in Strings.Designer.cs for use in UI elements and window titles. [1] [2] [3]
  • Updated the window title in StatusWindow.xaml.cs to include the localized NetworkStatus string and application version.

These changes collectively improve the user interface responsiveness, provide a more intuitive countdown visualization, and enhance localization support.

To-Do

Contributing

By submitting this pull request, I confirm the following:

Copilot AI review requested due to automatic review settings March 8, 2026 00:01
@github-actions github-actions bot added this to the next-release milestone Mar 8, 2026
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 redesigns the StatusWindow UI and modernizes the auto-close countdown logic, including a new circular countdown indicator and additional localized strings.

Changes:

  • Reworked StatusWindow close-timer to use Stopwatch + high-frequency DispatcherTimer and expose Time/TimeMax as double.
  • Updated StatusWindow XAML to add a circular countdown ring and move actions to window command buttons (icon-based).
  • Added new localization keys (NetworkConnection, NetworkStatus) and introduced a new TimeToStrokeDashOffsetConverter to drive the ring animation.

Reviewed changes

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

Show a summary per file
File Description
Source/NETworkManager/StatusWindow.xaml.cs Refactors close-timer logic and window title; introduces stopwatch-based countdown updates.
Source/NETworkManager/StatusWindow.xaml Redesigns the window chrome and adds the countdown ring + command buttons.
Source/NETworkManager.Localization/Resources/Strings.resx Adds new localized strings used by the redesigned status window.
Source/NETworkManager.Localization/Resources/Strings.Designer.cs Regenerated designer to expose new string resources.
Source/NETworkManager.Converters/TimeToStrokeDashOffsetConverter.cs New converter to compute StrokeDashOffset for the circular countdown ring.
Files not reviewed (1)
  • Source/NETworkManager.Localization/Resources/Strings.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)

Source/NETworkManager/StatusWindow.xaml.cs:166

  • ShowWindow(bool enableCloseTimer = false) ignores its parameter by unconditionally setting enableCloseTimer = true;. This makes it impossible for callers to show the window without the auto-close behavior and contradicts the method XML doc. Remove the assignment and let the caller-controlled value drive whether SetupCloseTimer() runs (or introduce a separate overload/setting if the timer should always be enabled).
        enableCloseTimer = true;

        // Close the window after a certain time
        if (enableCloseTimer)
        {
            SetupCloseTimer();
            return;

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

Comment on lines +201 to 216
private async void DispatcherTimerTime_Tick(object sender, EventArgs e)
{
Time--;
Time = Math.Max(0.0, TimeMax - _stopwatch.Elapsed.TotalSeconds);

if (Time > 0)
return;

_dispatcherTimerClose.Stop();
_stopwatch.Stop();

await Task.Delay(250);

ShowTime = false;

Hide();
}
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

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

DispatcherTimerTime_Tick stops the timer and then awaits Task.Delay(250). If the window is shown again during that delay and a new close-timer session starts, the continuation from the previous tick can still run and call Hide()/set ShowTime = false, unexpectedly hiding the newly shown window. Consider removing the delay or guarding it with a cancellation token / monotonically increasing "session id" so only the latest timer session is allowed to hide the window.

Copilot uses AI. Check for mistakes.
@mergify mergify bot merged commit 9b1d374 into main Mar 8, 2026
4 checks passed
@mergify mergify bot deleted the feature/re-design-status-window branch March 8, 2026 00:40
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