Skip to content

Systray#1448

Merged
peterjah merged 2 commits intomainfrom
systray
Jan 7, 2026
Merged

Systray#1448
peterjah merged 2 commits intomainfrom
systray

Conversation

@peterjah
Copy link
Contributor

@peterjah peterjah commented Jan 7, 2026

Delivery Quality Checklist

  • Breaking Changes in API:
    Does this PR introduce breaking changes in the API?

    • If yes, have you considered making it backward compatible?
    • If backward compatibility is not considered, set the "breaking-change" label.
  • Changelog:

    • For bugfix PR, set the "bugfix" label
    • If this change should not appear in changelog, use "ignore-for-changelog" label
  • Version Update Handling:
    Have you ensured that the version update by user is handled correctly?

  • PR Dependency:
    Does this PR depend on another PR?

    • If yes, is it necessary for the dependency to be released prior to merging this one?
  • Documentation:

    • Are any necessary changes made to user-facing documentation?
    • Confirm that API documentation is updated with any relevant changes.
    • Check that README and other documentation files are accurate and current.

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 modifies network management callbacks to ensure the systray menu is refreshed whenever networks are added, edited, or deleted, not just when the current network changes. The changes ensure consistent UI updates across all network configuration operations.

  • Modified callback invocation logic in AddNetwork, EditNetwork, and DeleteNetwork to always trigger callbacks
  • Removed binary file pattern from release workflow artifacts

Reviewed changes

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

File Description
int/config/manager.go Updated AddNetwork, EditNetwork, and DeleteNetwork to always invoke the onNetworkChange callback to support systray menu refresh functionality
.github/workflows/release.yml Removed massastation binary file pattern from release artifacts

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

Comment on lines +386 to 392
// Always call callback when a network is added (even if not default) to refresh systray menu
n.networkChangeMutex.RLock()
callback := n.onNetworkChange
n.networkChangeMutex.RUnlock()
if callback != nil {
callback()
}
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The callback is now invoked unconditionally when a network is added, but there are no tests validating this new callback behavior. Consider adding tests to verify that the callback is triggered correctly in all scenarios (when makeDefault is true and false).

Copilot uses AI. Check for mistakes.
Comment on lines +520 to 526
// Always call callback when a network is edited to refresh systray menu
n.networkChangeMutex.RLock()
callback := n.onNetworkChange
n.networkChangeMutex.RUnlock()
if callback != nil {
callback()
}
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The callback is now invoked unconditionally when a network is edited, but there are no tests validating this new callback behavior. Consider adding tests to verify that the callback is triggered correctly in various edit scenarios (URL changes, renames, makeDefault changes).

Copilot uses AI. Check for mistakes.
Comment on lines +601 to +608
// Call the network change callback if set
// Always call callback when a network is deleted to refresh systray menu
n.networkChangeMutex.RLock()
callback := n.onNetworkChange
n.networkChangeMutex.RUnlock()
if callback != nil {
callback()
}
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

A callback invocation has been added to DeleteNetwork, but there are no tests validating this new callback behavior. Consider adding tests to verify that the callback is triggered correctly when a network is deleted.

Copilot uses AI. Check for mistakes.
@peterjah peterjah merged commit e06ecc8 into main Jan 7, 2026
10 checks passed
@peterjah peterjah deleted the systray branch January 7, 2026 18:25
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