[PR #4711] [MERGED] [client] Fix Connect/Disconnect buttons being enabled or disabled at the same time #21036

Closed
opened 2026-08-05 05:08:00 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/4711
Author: @lixmal
Created: 10/28/2025
Status: Merged
Merged: 10/28/2025
Merged by: @lixmal

Base: mainHead: ui-buttons-fix


📝 Commits (4)

  • 0dab5ac Fix Connect/Disconnect buttons being enabled or disabled at the same time
  • da9ef3b Fix leak
  • cf42862 Remove mux
  • 61d1e6b Cancel on profile switch

📊 Changes

3 files changed (+91 additions, -59 deletions)

View changed files

📝 client/ui/client_ui.go (+33 -50)
📝 client/ui/event_handler.go (+43 -6)
📝 client/ui/profile.go (+15 -3)

📄 Description

Describe your changes

  • When the OIDC flow is in progress, enable the Disconnect button for cancellation. Otherwise both buttons are disabled and there is no way to cancel the flow.
  • On OIDC timeout, consult daemon status to enable correct buttons instead of relying on defer
  • Clean up error handling

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)

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

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/4711 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 10/28/2025 **Status:** ✅ Merged **Merged:** 10/28/2025 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `main` ← **Head:** `ui-buttons-fix` --- ### 📝 Commits (4) - [`0dab5ac`](https://github.com/netbirdio/netbird/commit/0dab5ac2716a21dbfaaaf51ac5ae334c0486e15e) Fix Connect/Disconnect buttons being enabled or disabled at the same time - [`da9ef3b`](https://github.com/netbirdio/netbird/commit/da9ef3bb54b1b5e9a22eff075535eeaadee3cfaf) Fix leak - [`cf42862`](https://github.com/netbirdio/netbird/commit/cf42862fd688c47efb9b467f6c8201f2159a0666) Remove mux - [`61d1e6b`](https://github.com/netbirdio/netbird/commit/61d1e6b4f33b796c3fe5989eb2be3070eedb0038) Cancel on profile switch ### 📊 Changes **3 files changed** (+91 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `client/ui/client_ui.go` (+33 -50) 📝 `client/ui/event_handler.go` (+43 -6) 📝 `client/ui/profile.go` (+15 -3) </details> ### 📄 Description ## Describe your changes - When the OIDC flow is in progress, enable the Disconnect button for cancellation. Otherwise both buttons are disabled and there is no way to cancel the flow. - On OIDC timeout, consult daemon status to enable correct buttons instead of relying on defer - Clean up error handling ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [x] 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) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 05:08:00 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#21036