Menu ▾ ▴

#175 macOS: Dock menu static actions (New Conversation, Settings)

closed
nobody
2026-07-22
2026-07-22
Anonymous
No

Originally created by: kristofferR

The Dock menu currently contains only recent conversations — with zero recents there's no custom menu at all (DOCK_NS_MENU stays null). Add static items, mirroring the Linux desktop actions (Ref [#170]).

  • Menu shape in menu.rs::rebuild_recent_menus (macOS branch): always build a menu — recents (if any) → separator (only when recents exist) → New Conversation (dock:new_conversation) → Settings… (dock:settings). Remove the null-pointer branch and its keepalive-clear in macos/dock.rs (doc comment update).
  • Routing already works: muda Dock clicks land in the app-wide handle_menu_event (the recent: arm proves it). New arms: dock:new_conversation → show_main then eval window.__carrierShortcuts && window.__carrierShortcuts.newConversation() — a distinct id from the menubar's because a Dock click can arrive with the window hidden and must surface it first; dock:settings → same body as preferences. Extract the eval string into a shared const (coordinate with [#170], which needs the same one — whichever lands first extracts it).
  • No extra call sites needed: rebuild_recent_menus already runs from apply_settings at startup and the carrier:recent-threads listener, so the static items appear from launch.
  • Edge cases: Hide Names & Avatars clears recents but statics remain; New Conversation before Messenger loads is a guarded no-op (same as menubar today) — if the carrier:// URL-scheme issue's run_app_action dispatch lands first, route through it for retry behavior instead.
  • Testing: pure dock_menu_entries(threads) -> Vec<DockEntry> helper unit-tested for ordering/separator with 0 and N threads; manual — right-click Dock icon with zero recents and with recents, click both items with window hidden and visible.

Part of [#179].

Related

Tickets: #170
Tickets: #179
Tickets: #188

Discussion

  • Anonymous

    Anonymous - 2026-07-22

    Originally posted by: kristofferR

    Implemented in [#188] and merged to main. The macOS Dock menu now always includes New Conversation and Settings, even with no recent conversations.

     

    Related

    Tickets: #188

  • Anonymous

    Anonymous - 2026-07-22

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.