[v3] Add systray smart-default tests and finish popup-window documentation
Summary
Add regression coverage for v3 system-tray smart defaults and finish documenting attached-window auto-hide behaviour.
This consolidates two open records from the repository's retired local beads tracker (wails-webview2gtk6-m4c.5 and .6). The implementation, manual test suite, examples, and main systray guide now exist, but the intended unit coverage is still missing and two window behaviours are not fully described in the user guide.
Test coverage
Add focused tests for:
- window only: left click toggles the attached window; right click does nothing;
- menu only: left click does nothing; right click opens the menu;
- window plus menu: left click toggles the window; right click opens the menu;
- neither resource: both clicks are no-ops;
- custom left/right handlers override the corresponding default;
HideOnFocusLostbehaviour;HideOnEscapebehaviour;- focus-follows-mouse environments do not produce unusable auto-hide behaviour.
The repository currently has manual coverage under v3/test/manual/systray/ and race/benchmark tests, but no focused unit tests for these smart-default cases.
Documentation
The main guide at docs/src/content/docs/features/menus/systray.mdx already explains attached-window click behaviour and custom handlers. Complete it by documenting:
HideOnFocusLostandHideOnEscapefor tray popup windows;- focus-follows-mouse/platform caveats;
- that explicit click handlers override smart defaults;
- links to the manual tests/examples where appropriate.
Also ensure HideOnEscape appears in the window-options reference alongside HideOnFocusLost.
Acceptance criteria
- Automated regression tests cover the smart-default matrix and overrides.
- User-facing documentation covers both auto-hide options and Linux compositor caveats.
- Documentation examples match the current API.
The popup-window documentation and manual systray coverage are already present. The remaining unit-test expansion is valuable hardening, but it is not a Beta 3 regression or release-evidence blocker, so it is scheduled for v3.1.0 rather than holding tonight’s stabilization release.