Skip to content

[client] Fix exit node deselection #3722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged

[client] Fix exit node deselection #3722

merged 1 commit into from
Apr 24, 2025

Conversation

lixmal
Copy link
Contributor

@lixmal lixmal commented Apr 23, 2025

Describe your changes

When deselecting a single exit node in the menu the exit node was deselected but the checkbox wasn't unchecked properly. This fixes it

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

@Copilot Copilot AI review requested due to automatic review settings April 23, 2025 10:31
Copy link
Contributor

@Copilot 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 the exit node deselection behavior in the client systray menu by properly updating the checkbox state when a single exit node is deselected.

  • Updated the toggling logic to use a deselect flag and update node states accordingly
  • Removed the redundant parameter from the deselectOtherExitNodes function and added logging for clarity
Comments suppressed due to low confidence (2)

client/ui/network.go:460

  • [nitpick] Consider renaming 'deselectAll' to a more descriptive name (e.g., 'shouldDeselect') to better reflect its purpose.
deselectAll := item.Checked() && len(ids) == 0

client/ui/network.go:490

  • The updated deselectOtherExitNodes function now unchecks all exit node menu items without skipping the current one. Please verify that this change is intentional and that selectNewExitNode reliably re-checks the active item when needed.
func (s *serviceClient) deselectOtherExitNodes(conn proto.DaemonServiceClient, ids []string) error {

Copy link

sonarqubecloud bot commented Apr 23, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@lixmal lixmal merged commit 714beb6 into main Apr 24, 2025
31 of 32 checks passed
@lixmal lixmal deleted the fix-exit-node-menu branch April 24, 2025 10:36
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