Skip to content

Fix desktop notifications on GNOME 46+ Linux#1246

Merged
wesbillman merged 1 commit into
block:mainfrom
benthecarman:ubuntu-notifs
Jun 26, 2026
Merged

Fix desktop notifications on GNOME 46+ Linux#1246
wesbillman merged 1 commit into
block:mainfrom
benthecarman:ubuntu-notifs

Conversation

@benthecarman

@benthecarman benthecarman commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Desktop notifications didn't work for me. Claude's vibe coded fix. This fixes the problem for me

The app posts every desktop notification through the Web Notification constructor, which tauri-plugin-notification routes to its notify command. That command calls notify-rust's show() and then drops the returned handle immediately. The handle owns the D-Bus connection used to post the notification, and on GNOME 46+ (Ubuntu 24.04, Fedora 41+) tearing that connection down dismisses the notification the instant it appears, so nothing is ever seen. macOS uses a different backend and is unaffected.

Add a Linux-only show_native_notification command that posts from a dedicated thread and holds the connection open via wait_for_action until the notification is closed. The same wait surfaces the default click action, which is forwarded to the frontend so clicking focuses the window and routes to the notification target. The web client now sends through this command on Linux and keeps the plugin path on macOS and Windows.

@wesbillman

Copy link
Copy Markdown
Collaborator

Blocking: desktop/src-tauri/Cargo.toml now declares the Linux target dependency table twice:

[target.'cfg(target_os = "linux")'.dependencies]

Cargo rejects duplicate TOML tables before it can compile, so the desktop crate fails immediately with:

error: duplicate key
  --> desktop/src-tauri/Cargo.toml:50:2

This is from adding the notify-rust Linux table above the existing Linux keyring table. Please merge notify-rust = "4" into the existing [target.'cfg(target_os = "linux")'.dependencies] block instead of creating a second one.

The app posts every desktop notification through the Web Notification
constructor, which tauri-plugin-notification routes to its `notify`
command. That command calls notify-rust's `show()` and then drops the
returned handle immediately. The handle owns the D-Bus connection used
to post the notification, and on GNOME 46+ (Ubuntu 24.04, Fedora 41+)
tearing that connection down dismisses the notification the instant it
appears, so nothing is ever seen. macOS uses a different backend and is
unaffected.

Add a Linux-only `show_native_notification` command that posts from a
dedicated thread and holds the connection open via `wait_for_action`
until the notification is closed. The same wait surfaces the default
click action, which is forwarded to the frontend so clicking focuses
the window and routes to the notification target. The web client now
sends through this command on Linux and keeps the plugin path on macOS
and Windows.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: benthecarman <benthecarman@live.com>
@benthecarman

Copy link
Copy Markdown
Contributor Author

@wesbillman sorry, was not on latest master. Fixed!

@wesbillman wesbillman merged commit ca50d83 into block:main Jun 26, 2026
25 checks passed
@benthecarman benthecarman deleted the ubuntu-notifs branch June 26, 2026 19:00
wpfleger96 added a commit that referenced this pull request Jun 26, 2026
…event

Two CI failures on main:

1. File-size guard: lib.rs grew by one line in PR #1246
   (show_native_notification added to Tauri command list). Bump the
   approved override from 1034 to 1035 and update the comment.

2. Scroll-history regression (scroll-history.spec.ts:1363): when the
   user scrolls back past MAX_TIMELINE_MESSAGES (2000) events, a live
   subscription event arriving via mergeTimelineCacheMessages triggered
   normalizeTimelineMessages, which caps to the newest 2000. This evicted
   the backward-paged roots, reset oldestAfterMerge, and stalled
   pagination — deepest stalled at ~471 instead of reaching < 50.

   Fix: mergeTimelineCacheMessages now checks the content-event count on
   the ORIGINAL current array (before dedup+incoming). If the cache is
   already in backward-paged state (> MAX_TIMELINE_MESSAGES content
   events), it skips the cap and returns sort+dedupe only. The cap still
   applies during normal live sessions (cache at or under the limit).

   Also exports isTimelineWindowContentEvent and MAX_TIMELINE_MESSAGES
   from messageQueryKeys.ts so hooks.ts can reference them directly.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
tellaho added a commit that referenced this pull request Jun 26, 2026
Reconcile the persona-template UX feature with 60 commits of main.
Three conflicts resolved:

- ManagedAgentRow.tsx: took main's version. Main deleted the per-row
  AgentActionsMenu entirely and consolidated agent actions into
  UserProfileAgentActions.tsx (UserProfileAgentSettingsMenu). The
  original Part 2 row-menu target no longer exists.
- UserProfilePanel.tsx / UserProfilePanelSections.tsx: took main's
  reworked versions, then re-applied the save-as action on top.

Part 2 re-home (decision (a), flagged to Ned): the "Save as persona
template" action now lives in main's UserProfileAgentSettingsMenu,
reusing main's persona-dialog infra (setPersonaDialogState +
saveAsPersonaTemplateDialogState + submitProfilePersonaDialog). This
makes useSaveAsPersonaTemplate.ts dead code (its only consumers were
the deleted row-menu and the stale profile wiring) -- deleted.

Provider source stays backend.id via providerForAgentBackend (Ned
confirmed: top-level agent.provider is a derived snapshot/output,
backend.id is the canonical create input). Stale comments claiming
"ManagedAgent has no top-level provider on main" corrected; logic
unchanged.

File-size overrides bumped: lib.rs 1034->1035 (main grew it via
ca50d83 #1246 without bumping); UserProfilePanel.tsx 1000->1014 (the
~15-line save-as re-home on an edge-riding panel).

Gate green on the merged tree: pnpm typecheck, biome, check:file-sizes,
check:px-text, 1194 unit tests.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
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