Skip to content

Add apply configuration warning dialog and enhance connection status …#244

Merged
gokugiant merged 3 commits intomasterfrom
feature/introduce_reload_loading_element
Mar 19, 2026
Merged

Add apply configuration warning dialog and enhance connection status …#244
gokugiant merged 3 commits intomasterfrom
feature/introduce_reload_loading_element

Conversation

@gokugiant
Copy link
Contributor

This pull request enhances the user experience and robustness of the UC2ConfigurationController component by improving error handling during configuration application, adding a user warning dialog, and clarifying connection status feedback. The changes aim to prevent accidental misconfiguration, provide clearer feedback during restarts, and ensure more reliable state updates.

User interaction and feedback improvements:

  • Added a warning dialog (Dialog) that appears before applying a configuration, informing users of potential risks and requiring explicit confirmation before proceeding. This helps prevent accidental misconfigurations that could make the device temporarily unreachable. [1] [2] [3] [4]
  • Improved the connection status alert to distinguish between normal disconnections and expected temporary disconnects during a restart, including a new icon and message for the restart scenario. [1] [2]

Error handling and reliability:

  • Enhanced error handling logic when applying configurations by introducing a helper (isExpectedRestartHttpStatus) to better identify expected transient errors during restarts, ensuring appropriate user notifications and smoother restart monitoring. [1] [2] [3]
  • Updated dependencies for several hooks and callbacks to ensure correct and timely updates when relevant state changes, improving reliability. [1] [2]

Code cleanup:

  • Removed unused imports, such as Chip from MUI, for cleaner code.…handling

@gokugiant gokugiant requested a review from Copilot March 19, 2026 13:53
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 updates UC2ConfigurationController to improve the UX around applying UC2 configurations by adding a pre-apply warning dialog, improving restart/disconnect messaging, and making restart-related error handling more tolerant of transient gateway/network failures.

Changes:

  • Added an “Apply configuration?” warning dialog requiring explicit confirmation before applying a setup.
  • Improved restart handling by treating certain transient HTTP statuses as expected during restarts and refining connection-status messaging/icons.
  • Adjusted hook/callback dependencies to ensure state refreshes occur reliably after restarts.

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

You can also share your feedback on Copilot code review. Take the survey.

@@ -235,7 +239,7 @@ const UC2ConfigurationController = () => {

// Start checking after 5 seconds
@gokugiant gokugiant enabled auto-merge March 19, 2026 14:02
@gokugiant gokugiant added this pull request to the merge queue Mar 19, 2026
Merged via the queue into master with commit 8b424d5 Mar 19, 2026
14 checks passed
@gokugiant gokugiant deleted the feature/introduce_reload_loading_element branch March 19, 2026 14:16
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