Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Delivery Quality Checklist
Breaking Changes in API:
Does this PR introduce breaking changes in the API?
Changelog:
Version Update Handling:
Have you ensured that the version update by user is handled correctly?
PR Dependency:
Does this PR depend on another PR?
Documentation: