Repository navigation
Desktop notifications never write to the TUI terminal - #1235
Merged
Merged
Conversation
notifypy picks its notify-send path whenever notify-send is installed, and that path runs check_output with stderr inherited, so with no notification daemon every bus message printed "Failed to show notification: GDBus.Error ... ServiceUnknown" straight over Toad's screen. On Linux the policy now uses notifypy's D-Bus notifier, which starts no child process. That notifier reports a D-Bus error reply as a delivery, so the policy asks the session bus once whether org.freedesktop.Notifications is owned or activatable; when it is neither, the policy becomes AbsentDesktop, shows one in-app notice, and stops trying for the session. jeepney is declared, since Toad now imports it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
trissim
marked this pull request as ready for review
October 25, 2026 06:49
trissim
enabled auto-merge
October 25, 2026 06:49
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Toad froze for Tristan with its screen covered in
Failed to show notification: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable, one line per bus message.Cause: notifypy chooses its notify-send path whenever notify-send is installed (notifypy/notify.py:136-140). That path runs
subprocess.check_outputwith stderr inherited (notifypy/os_notifiers/linux.py:86), so with no notification daemon running, notify-send's error lands on Toad's terminal once per notification.Fix, at the owner (
NotificationPolicyin setting_choices.py):use_custom_notifierhook. It starts no child process, so nothing can write over the TUI.UncheckedDBusDesktopasks the session bus once whetherorg.freedesktop.Notificationsis owned or activatable. If neither, the policy becomesAbsentDesktop: one in-app warning, and no further attempts for the session.jeepney==0.9.0(linux) is declared, since Toad now imports it directly. uv.lock is updated by hand because uv isn't available on this machine.Manual check (installed runtime interpreter, this branch's src, Python stderr captured the way Textual captures it, fd 2 sent to a file):
main, notify-send path:send -> Falseand fd 2 gotFailed to show notification: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatableAbsentDesktop, 1 in-app notice, fd 2 0 bytesThere's no new test: it's a trivial edit, per Tristan.
Platform family (send-back fix, 051b834)
The first head chose the notifier with
toad.os == "linux"and the app name withtoad.os == "macos"(IMPL-1).toad.Platformis now one family decoded once fromplatform.system(): the base answersdesktop()->DesktopService(),application_name"Toad" andselect(matrix)(exact key or"*");LinuxPlatformoverridesdesktop()withUncheckedDBusDesktop(),MacPlatformoverrides the name. Deleted: both compares,_OS_map,toad.os,get_os_matrix(a second copy ofcommands_for's selection), the secondOSliteral in agent_schema, and agent_modal's cast. The catalog's TOML key stays a string, as the external format, carried once per member askey.Interpreter check on this machine:
toad.platform-> LinuxPlatform, key linux, name "Toad";NotificationPolicy.desktop-> UncheckedDBusDesktop; notifypy is not imported byimport toadorsetting_choices. No tests run (owner order).🤖 Generated with Claude Code
https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V