Originally created by: kristofferR
On macOS the menu-bar (tray) icon misbehaves in two ways.
build_tray (src-tauri/src/lib.rs:327) is written to toggle the window on left-click and only show the Quit menu on right-click:
.menu(&menu) // menu = just "Quit Carrier"
.show_menu_on_left_click(false)
.on_tray_icon_event(|tray, event| {
if let TrayIconEvent::Click { button: MouseButton::Left, button_state: Up, .. } = event {
toggle_main(tray.app_handle());
}
})
But on macOS, attaching a .menu() makes a left-click open the menu anyway — show_menu_on_left_click(false) doesn't suppress it reliably, and the TrayIconEvent::Click for the left button often never fires because the menu intercepts it. Result: clicking the icon just shows a menu whose only entry is "Quit Carrier" (see screenshot), and there's no way to show/hide the window from the tray.
Expected: left-click toggles (focus if hidden/unfocused, hide if it's the focused window) — toggle_main() already exists and does exactly this. Right-click (or ctrl-click) shows the Quit menu.
Likely fix: on macOS, don't attach the menu unconditionally — either drop .menu() and open a menu manually on MouseButton::Right, or use menu_on_left_click(false) semantics that actually hold on macOS. (Windows/Linux already behave: left toggles, right shows the menu.)
Today the unread count from the page (carrier:unread) only updates the tray tooltip (lib.rs:1813-1826) — invisible until you hover. The count should be shown inline, to the right of the menu-bar icon, like other macOS menu-bar apps.
Expected:
unread_badge is enabled (and per badge_mode = messages/conversations), set the tray title to the unread number on macOS via tray.set_title(Some(n)) so it renders next to the icon; clear it (empty/None) when the count is 0 or the setting is off.carrier:unread listener — it already has the number and the tray handle.Gate all of this on the existing unread_badge / badge_mode settings so it follows the user's preference, consistent with the Dock badge.
set_title next-to-icon text is a macOS menu-bar affordance; on Windows/Linux the count stays in the tooltip (no inline title slot).
Originally posted by: kristofferR
Completed in [#140] and shipped in v1.4.0. On macOS, the tray menu is no longer attached unconditionally: left-click toggles the window, while right-click opens the menu manually. The unread listener also sets and clears the tray title according to the existing unread-badge setting.
Related
Tickets:
#140Ticket changed by: kristofferR