Skip to content

fix(notifications): name the iPhone app in GNOME popups, not Tether - #342

Merged
zackb merged 1 commit into
zackb:mainfrom
fernando2393:pr/gnome-app-name
Nov 23, 2026
Merged

zackb merged 1 commit into
zackb:mainfrom
fernando2393:pr/gnome-app-name

Conversation

@fernando2393

@fernando2393 fernando2393 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On GNOME every mirrored notification is titled Tether, whatever iPhone app sent it. GNOME Shell (notificationDaemon.js, _getApp) resolves the sender through the desktop-entry hint, which is always tether-gtk, and the source title is that app's name. KDE already shows the iPhone app thanks to x-kde-display-appname; GNOME ignores that hint.

Change

In set_identity(), when the server is gnome-shell (asked per notification, like the inline-reply capability) and the popup comes from an iPhone app (it has a bundle id):

  • send the app's name as the notification's app name (notify_notification_set_app_name),
  • send the popup's icon as the app icon too (notify_notification_set_app_icon, libnotify >= 0.8.4, compiled out before that), and
  • leave out desktop-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 carries com.apple.MobileSMS like 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

  • Suite passes (647); no new unit test, since the decision needs a live notification server.
  • By hand on GNOME 50.1 (libnotify 0.8.8): iPhone popups are titled with the app and show its icon in the header; checked against screenshots. Tether's own popups are unchanged.

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

@zackb zackb left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/daemon/notification.cpp Outdated
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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this comment seems too verbose and specific to the one problem

Comment thread src/daemon/main.cpp Outdated
repliable ? message.thread_key : std::string{},
otp,
"",
tether::bluetooth::ancs::APP_ID_MESSAGES,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@fernando2393

Copy link
Copy Markdown
Contributor Author

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 app-flatpak-io.github.zackb.tether-*.scope, so GNOME always resolves it to Tether. Nothing inside the sandbox can change that. Natively (tetherd.service) it works as intended, so the Flatpak behaves exactly as it does on main.

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.

@zackb
zackb merged commit de522cb into zackb:main Nov 23, 2026
7 checks passed
@fernando2393
fernando2393 deleted the pr/gnome-app-name branch November 23, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants