Menu ▾ ▴

#445 macOS: find conversations from Spotlight

open
nobody
6 days ago
6 days ago
Anonymous
No

Originally created by: kristofferR

Problem

To open a chat, the user has to bring Chatpane forward and then search inside it. macOS users expect to type a contact's name in Spotlight and jump straight there.

Goal

An opt-in setting lets Spotlight find Chatpane's conversations by name, and choosing a result opens that chat.

Scope

  • Index each conversation's display name, and optionally its picture, with Core Spotlight (CSSearchableIndex, CSSearchableItem), using the same data as the recent-conversations menus (#362). Never index message text, previews, or numeric IDs in searchable fields.
  • The item identifier stays internal, so it can be a thread ID. Opening a result arrives as an NSUserActivity (CSSearchableItemActionType). Validate it like a chatpane:// URL and open the chat.
  • Off by default, under Privacy. Turning it off, logging out, and Log out and reset all call deleteAllSearchableItems.
  • Update the index as the list changes. Keep it bounded, for example to recent and pinned conversations.
  • Hide Names & Avatars does not change the index. The setting's description says names are visible to Spotlight.

Open question

Can the index be refreshed while the window is hidden, or only once the conversation list has loaded?

Verification

  • Turn it on, search a contact's name in Spotlight, and the chat opens in Chatpane, including when Chatpane was not running.
  • Turn it off or log out, and the results disappear.
  • Check the index contents with mdfind. Only names appear.

Related

Tickets: #349

Discussion


Log in to post a comment.