Repository navigation
fix(notifications): name the iPhone app in GNOME popups, not Tether - #342
Conversation
zackb
left a comment
There was a problem hiding this comment.
Thanks, this looks good. Using app_id to tell iPhone popups from tether's is the right call. I added some very very small nitpicks but it is only preference not required.
Can you try the flatpak on GNOME? Touching this stuff always seems to break some crazy sandbox violation.
After that check I'm happy to merge.
| const std::string& app_name, | ||
| bool from_iphone_app, | ||
| const std::string& icon) { | ||
| // GNOME Shell titles a notification with the name of the app its |
There was a problem hiding this comment.
nit: this comment seems too verbose and specific to the one problem
| repliable ? message.thread_key : std::string{}, | ||
| otp, | ||
| "", | ||
| tether::bluetooth::ancs::APP_ID_MESSAGES, |
There was a problem hiding this comment.
super nit: as_notification.app_id is already set to APP_ID_MESSAGES a few lines up. Could you pass as_notification.app_id instead of the constant so they can drift.
GNOME Shell titles a notification with the name of the app it resolves the sender to, and the desktop-entry hint resolves every popup to tether-gtk. So on GNOME every mirrored notification read "Tether", whatever app it came from; KDE already showed the app through x-kde-display-appname. When the server is gnome-shell and the popup comes from an iPhone app (it has a bundle id), send the app's name as the notification's app name and leave out desktop-entry. GNOME then titles it "Instagram" and groups each iPhone app on its own. The popup's icon also goes out as the app icon (libnotify >= 0.8.4), which GNOME draws, greyed, in the header; without it the header shows a generic icon. Tether's own popups (files, errors, discovery) and every other server keep today's identity. The Messages popup built from MAP now carries the Messages bundle id like the ANCS ones, so it reads "Messages" too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
58297c9 to
6d15243
Compare
|
Thanks! Both nits are applied. I tested the Flatpak on GNOME Shell 50.1 with my iPhone. Nothing breaks: popups, icons and actions all work, with no sandbox errors. But in the Flatpak the title still reads "Tether". GNOME Shell matches a notification to an app by the sender's PID before it looks at the hints, and a Flatpak process lives in its If you'd like, a follow-up could put the iPhone app's name in the summary when sandboxed on GNOME ("Instagram · Guille"). Happy to do that separately or leave it. |
Problem
On GNOME every mirrored notification is titled Tether, whatever iPhone app sent it. GNOME Shell (
notificationDaemon.js,_getApp) resolves the sender through thedesktop-entryhint, which is alwaystether-gtk, and the source title is that app's name. KDE already shows the iPhone app thanks tox-kde-display-appname; GNOME ignores that hint.Change
In
set_identity(), when the server isgnome-shell(asked per notification, like the inline-reply capability) and the popup comes from an iPhone app (it has a bundle id):notify_notification_set_app_name),notify_notification_set_app_icon, libnotify >= 0.8.4, compiled out before that), anddesktop-entry.GNOME then titles the popup with the app name ("Instagram") and draws the app icon, greyed like every other app's, in the small header. Each iPhone app gets its own group in the notification list. Without the app icon, the header shows GNOME's generic application icon: libnotify sends a notification's icon as the image, not the app icon.
Unchanged: Tether's own popups (file arrivals, reply errors, discovery warnings) and every non-GNOME server still send
desktop-entry. The MAP-based Messages popup now carriescom.apple.MobileSMSlike the ANCS ones, so it reads "Messages" too. That field only drives the launcher and the mute action, and Messages has neither.Trade-off
On GNOME, iPhone popups are no longer covered by GNOME's per-app settings for Tether (Settings › Notifications › Tether). Tether's own controls still apply (desktop popups on/off, per-app mute), as does GNOME's Do Not Disturb.
Testing
Pairs with #341 (real app icons): together, GNOME popups show the app's name and real icon. The two merge cleanly in either order.
🤖 Generated with Claude Code