Repository navigation
gui.tray: tray icon for native apps - #3728
Conversation
…icon is unreadable
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
sha=d370874b4879ee91fcbbb172d15360abb6a4e97c
🤖 Salam AI reviewVerdict: 🛠️ Changes needed before merging commit SummaryThis PR adds a new std/gui/tray package providing a system tray/menu bar icon with a menu, click events and a thread-safe event queue, with Linux (StatusNotifierItem/D-Bus), Windows (Shell_NotifyIconW) and macOS (NSStatusItem) backends, plus Window.Hide/Show/IsVisible and ui close-to-tray hooks. The implementation is large and broadly follows the project's conventions, but the icon loading path mutates stored state before validating the file, so a failed read can discard a previously working icon. What changedA new Review
TestsThe added RisksThe icon-state mutation (findings 1-2) is the main functional risk: a transient unreadable icon path can permanently blank the tray icon until the process restarts. The platform backends are large FFI surfaces that cannot be compile-checked here for the non-Linux targets beyond what CI provides; macOS in particular is "compile-checked only" per the PR. If the diff was truncated for any of
|
New std/gui/tray package: tray or menu bar icon with a menu, click events and a thread-safe event queue, for apps on gui.window/gui.ui (until now only the webview package had a tray).
Also adds Window.Hide/Show/IsVisible and ui.OnCloseRequest/HideWindow/ShowWindow so closing the window can hide the app to the tray.
Linux checked end to end against a fake watcher on a private bus, Windows under wine. Docs page 189.