Skip to content

add systray menu network selection#1445

Merged
peterjah merged 2 commits into
mainfrom
systray
Jan 7, 2026
Merged

add systray menu network selection#1445
peterjah merged 2 commits into
mainfrom
systray

Conversation

@peterjah

@peterjah peterjah commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds network selection functionality to the system tray menu, enabling users to switch networks directly from the tray without opening the web UI. The implementation includes a callback mechanism to synchronize network changes between the systray and web interface, with the web UI polling every 2 seconds to detect changes.

Key changes:

  • Added network change callback system in the config manager to notify the systray when networks change
  • Implemented a dynamic network submenu in the systray with checkmarks showing the active network
  • Enhanced the web UI to poll the network endpoint every 2 seconds to detect systray-initiated changes

Reviewed changes

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

Show a summary per file
File Description
web/massastation/src/custom/api/useResource.ts Extended useResource hook to accept optional query options for configurable polling behavior
web/massastation/src/layouts/LayoutStation/LayoutStation.tsx Added 2-second polling to network endpoint to detect changes from systray
int/systray/systray.go Implemented NetworkMenuRefresher and dynamic network menu with sorted networks and callback-based updates
int/config/manager.go Added network change callback mechanism with mutex protection for concurrent network operations
cmd/massastation/main.go Updated initialization to use MakeGUIWithRefresher for systray-config manager integration

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

Comment thread web/massastation/src/layouts/LayoutStation/LayoutStation.tsx Outdated
Comment thread int/config/manager.go
Comment thread cmd/massastation/main.go Outdated
Comment thread int/config/manager.go
Comment thread int/systray/systray.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


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

Comment thread web/massastation/src/layouts/LayoutStation/LayoutStation.tsx Outdated
Comment thread int/config/manager.go Outdated
Comment thread int/config/manager.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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


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

Comment thread int/systray/systray.go
Comment thread int/systray/systray.go Outdated
Comment thread int/config/manager.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.


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

Comment thread web/massastation/src/layouts/LayoutStation/LayoutStation.tsx
Comment thread int/systray/systray.go
Comment thread int/systray/systray.go Outdated
Comment thread int/systray/systray.go
Comment thread int/systray/systray.go Outdated
Comment thread int/systray/systray.go
@peterjah peterjah merged commit 244b854 into main Jan 7, 2026
10 checks passed
@peterjah peterjah deleted the systray branch January 7, 2026 09:21
@peterjah peterjah linked an issue Jan 7, 2026 that may be closed by this pull request
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.

Change network from icontray menu

2 participants