Add Windows tray companion for playitd#136
Merged
loriopatrick merged 24 commits intobetter-clifrom Apr 14, 2026
Merged
Conversation
- Build and install a new `playitd-tray` binary - Register a startup shortcut and poll the service to show the tray icon - Let the tray app open status or stop the installed service
- Add start/stop service actions to the tray menu - Keep tray icon status in sync with service state - Allow removing the tray startup shortcut
- Add a Windows resource build step for the tray binary - Load the embedded icon at startup with a fallback to the default icon
- Replace custom Win32 tray/menu code with `tray-icon` - Remove the `winres` build script and embed the tray icon asset - Add Windows tray menu handling for service actions
- Keep `refresh_tray_status` safe at the function boundary - Limit `unsafe` to the `get_state(hwnd).as_mut()` call
- Stop treating menu item enable/disable as fallible - Keep tray tooltip and service state in sync
- Wrap Win32 calls in explicit unsafe blocks - Keep tray event handlers using HWND values that outlive the closures - Make state access helpers safe wrappers around raw window data
- Add an optional `--debug-console` mode for the tray process - Attach or allocate a console and emit tray lifecycle logs
- Track tray menu visibility to defer tooltip refreshes until the menu closes - Avoid holding mutable app state across `show_menu()` on Windows - Clean up IPC and logging imports plus formatting
- Drop the macOS packaging, signing, and notarization job from the release pipeline - Leave Windows and Linux release jobs unchanged
- Add a Wix shell exec custom action for the tray executable - Start the tray app automatically after successful installs
- Change the Windows tray service to invoke `playit.exe auto` instead of `attach` - Update the launch error message to match the new subcommand
- add a Windows tray menu item for resetting the agent - reset the IPC secret and stop playitd after a successful reset - make the installer launch action wait for completion
- Add a helper to spawn `playit.exe` in a new console - Run the setup executable after successfully starting the Windows service
- Poll lifecycle until playitd leaves Starting - Return a timeout error if startup never completes - Reformat UI imports and widget lines
- Query playitd lifecycle over IPC before enabling the tray action - Block Reset Agent during WaitingForSecret and Stopping states - Keep the menu state in sync on startup and polling
- Run refresh, start, stop, and reset actions asynchronously - Disable tray controls while background work is in progress - Refresh tray state after each action completes
- detect invalid or expired agent secrets during startup - wait for reprovisioning before retrying agent creation - add tests for secret error classification
- keep the agent running flag until shutdown - await the agent task during teardown to avoid leaks
- add cooperative shutdown for tunnel and UDP tasks - clean up formatting and import ordering across agent core
- Left-click now opens playit directly - Rename helper calls so setup launches the status window with `attach`
- Add a tray stop path that sends IPC stop first, then falls back to the installed service - After agent secret reset, request the service stop separately before relaunching playit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
playitd-traybinary