fix(linux): the Pomodoro timer shows in the top bar from the snap too
All checks were successful
CI / check (push) Successful in 9m41s
CI / deploy (push) Successful in 14s

From the snap, nothing showed in the top bar: AppArmor refused the
item's bus name (dbus_bind org.freedesktop.StatusNotifierItem-<pid>-1),
which snapd's desktop plug doesn't grant, contrary to what the research
found. The item is now laid out as libayatana-appindicator lays itself
out, within what snapd v2.77's desktop-legacy plug allows: at
/org/ayatana/NotificationItem/halkyon_learn, the only path from which
the label's signal (XAyatanaNewLabel) may come, and registered with the
watcher by that path under the connection's own name, binding no name
at all. Checked against GNOME's watcher here: it registers as the
system's own indicators do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-07 13:21:07 +02:00
commit 2030e397cc
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -187,13 +187,17 @@ void main() {
await platform.show(notice(run));
final [name] = watcher.registered;
expect(name, startsWith('org.freedesktop.StatusNotifierItem-'));
// Registered by its path, as libayatana-appindicator does: the snap's
// rules let the item bind no name, and send the label's signal only
// from there.
final [registered] = watcher.registered;
expect(registered, '/org/ayatana/NotificationItem/halkyon_learn');
final name = app.uniqueName;
expect(notifications.notified, isEmpty);
final item = DBusRemoteObject(
shell,
name: name,
path: DBusObjectPath('/StatusNotifierItem'),
path: DBusObjectPath(registered),
);
expect(
await item.getProperty('org.kde.StatusNotifierItem', 'XAyatanaLabel'),