Desktop v0.1.4: fix dead tray click, template icon, and first-run window#322
Merged
Desktop v0.1.4: fix dead tray click, template icon, and first-run window#322
Conversation
added 2 commits
April 18, 2026 11:42
Three stacked bugs made the v0.1.3 macOS install unusable on first launch (black-square tray, dead left-click, no window ever appeared): 1. Tray icon was the full-color carrier-pigeon brand mark with iconAsTemplate: true. macOS template icons must be monochrome (black + alpha), so the cream/slate-blue PNG rendered as a solid black blob. Generated black-on-alpha derivatives at icons/tray-icon.png (22x22) and tray-icon@2x.png (44x44) and pointed trayIcon.iconPath at them. Bundle icon references unchanged. 2. TrayIconBuilder had no left-click affordance. Added show_menu_on_left_click(true) plus an on_tray_icon_event fallback that shows + focuses the main window on left-click up, so the tray is never a dead UI element even if the platform fails to pop the menu. 3. Main window had visible: false and no setup() show() call, so a broken tray meant no UI at all on first launch. Now show + focus the main window unless the user is a returning auto_start + non-empty worker_secret case (silent tray launch). Bumped Cargo.toml, tauri.conf.json, and Cargo.lock to 0.1.4 and added a CHANGELOG entry summarizing the three fixes.
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.
Why
The v0.1.3 macOS install was unusable on first launch:
Three stacked bugs caused it. This PR fixes all three and cuts desktop v0.1.4.
What
1. Real monochrome template tray icon
tauri.conf.jsondeclarediconAsTemplate: truebut pointediconPathaticons/icon.png, which is the full-color 1024×1024 carrier-pigeon brand mark (cream rounded-square background, deep slate-blue silhouette). macOS template icons must be monochrome (black + alpha) — anything else renders as a solid black blob.Added two new assets derived from the existing brand mark:
crates/modelrelay-desktop/icons/tray-icon.png(22×22)crates/modelrelay-desktop/icons/tray-icon@2x.png(44×44)Both are pure black RGB with alpha derived from a contrast-pushed luminance inversion of the source mark, then auto-cropped to the silhouette bbox and padded ~10% so the pigeon fills the tray frame at small sizes.
trayIcon.iconPathnow points aticons/tray-icon.png. Bundle icon references (bundle.icon) are unchanged — those use the full-color icons and are correct.2. Tray click reliability
TrayIconBuilderhad no left-click affordance. On macOS in Tauri 2.10, that means left-click is a dead no-op unless one of:.show_menu_on_left_click(true)— pops the menu on left-click.on_tray_icon_event(...)— gives you the click event to react toAdded both:
show_menu_on_left_click(true)so the menu opens on left-click like users expect.on_tray_icon_eventhandler that, onTrayIconEvent::Click { button: Left, button_state: Up, .. }, shows + focuses the main window. Even if the menu fails to pop on some platform, the tray is never a dead UI element.3. First-run window visibility
The single window in
tauri.conf.jsonhasvisible: falseandmain.rs::setup()never calledwindow.show(). So if the tray was broken (see #1 + #2), the user never saw any UI.The setup now shows + focuses the main window on launch unless the user is the returning silent-tray case (
auto_startenabled ANDworker_secretnon-empty). This means:auto_start: window appears.auto_startand a saved secret: silent tray launch as before.4. Version bump
crates/modelrelay-desktop/Cargo.toml: 0.1.3 → 0.1.4crates/modelrelay-desktop/tauri.conf.json: 0.1.3 → 0.1.4Cargo.lock:cargo update -p modelrelay-desktop --precise 0.1.4CHANGELOG.md: new Desktop 0.1.4 entry summarizing the three fixesValidation
cargo fmt --check -p modelrelay-desktop— cleancargo check --workspace --exclude modelrelay-desktop— cleantauri-2.10.3/src/tray/mod.rsin the local cargo cache:show_menu_on_left_click,on_tray_icon_event,TrayIconEvent::Click { button, button_state, .. },MouseButton::Left,MouseButtonState::Up, andTrayIcon::app_handle()all exist with the expected signatures.modelrelay-desktopcrate cannot be cargo-checked locally because GTK/webkit2gtk system libs are absent in the dev environment; CI runners on macOS / Windows / Linux will perform the full build.Tagging
This PR does not tag
desktop-v0.1.4. Tag after verifying the diff looks right.