Skip to content

Conversation

@mlsmaycon
Copy link
Collaborator

@mlsmaycon mlsmaycon commented Jun 22, 2025

Describe your changes

This PR fixes a bug by ensuring that the advanced settings and re-authentication windows are closed appropriately when the main GUI process exits.

  • Updated runSelfCommand calls throughout the UI to pass a context parameter.
  • Modified runSelfCommand’s signature and its internal command invocation to use exec.CommandContext for proper cancellation handling.

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Use CommandContext to close advanced settings and re-authentication windows
When the main GUI process exits
@mlsmaycon mlsmaycon requested review from Copilot and hakansa and removed request for Copilot June 22, 2025 08:08
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 fixes a bug by ensuring that the advanced settings and re-authentication windows are closed appropriately when the main GUI process exits.

  • Updated runSelfCommand calls throughout the UI to pass a context parameter.
  • Modified runSelfCommand’s signature and its internal command invocation to use exec.CommandContext for proper cancellation handling.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
client/ui/event_handler.go Updated runSelfCommand calls in handleAdvancedSettingsClick, handleCreateDebugBundleClick, and handleNetworksClick; modified runSelfCommand to accept context and use exec.CommandContext.
client/ui/client_ui.go Updated runSelfCommand call in onSessionExpire to pass the context parameter.

@sonarqubecloud
Copy link

@mlsmaycon mlsmaycon changed the title [client] close windows when process needs to exit [client] close window when process needs to exit Jun 22, 2025
@mlsmaycon mlsmaycon merged commit 08e9b05 into main Jun 22, 2025
32 of 33 checks passed
@mlsmaycon mlsmaycon deleted the fix/close-ui-windows branch June 22, 2025 08:33
hurricanehrndz added a commit to hurricanehrndz/netbird that referenced this pull request Jun 25, 2025
…false_enginerestarts

* upstream/main: (228 commits)
  [management] add breakdown of network map calculation metrics (netbirdio#4020)
  [client] Don't open cmd.exe during MSI actions (netbirdio#4041)
  [misc] Specify netbird binary location in Dockerfiles (netbirdio#4024)
  [management] check and log on new management version (netbirdio#4029)
  [misc] add additional metrics (netbirdio#4028)
  [client] close windows when process needs to exit (netbirdio#4027)
  [client] Refactor showLoginURL to improve error handling and connection status checks (netbirdio#4026)
  [client] Handle lazy routing peers that are part of HA groups (netbirdio#3943)
  [management] add transaction for integrated validator groups update and primary account update (netbirdio#4014)
  [management] export ephemeral peer flag on api (netbirdio#4004)
  [management] Add backward compatibility for older clients without firewall rules port range support (netbirdio#4003)
  [client] Fix port range squashing (netbirdio#4007)
  [client] Add more Android advanced settings (netbirdio#4001)
  Fix route notification
  [management] Refactor routes to use store methods  (netbirdio#2928)
  [client] fix connection state handling (netbirdio#3995)
  [client] Fix logic in updateStatus to correctly handle connection state (netbirdio#3994)
  [management] Avoid recalculating next peer expiration (netbirdio#3991)
  [client] Fix DNS Interceptor Build Error (netbirdio#3993)
  [client] Tighten allowed domains for dns forwarder (netbirdio#3978)
  ...
volkermauel pushed a commit to volkermauel/netbird that referenced this pull request Jun 30, 2025
This PR fixes a bug by ensuring that the advanced settings and re-authentication windows are closed appropriately when the main GUI process exits.

- Updated runSelfCommand calls throughout the UI to pass a context parameter.
- Modified runSelfCommand’s signature and its internal command invocation to use exec.CommandContext for proper cancellation handling.
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.

3 participants