Skip to content

feat: support Notification action buttons on Linux - #54516

Merged
codebytere merged 1 commit into
mainfrom
feat/linux-notification-actions
Oct 13, 2026
Merged

codebytere merged 1 commit into
mainfrom
feat/linux-notification-actions

Conversation

@codebytere

Copy link
Copy Markdown
Member

Description of Change

Notification's actions option and action event were macOS and Windows only. On Linux the buttons were dropped without an error, even though libnotify and most desktop notification servers support them.

Each button entry in actions is now added to the notification when the server advertises the actions capability. Pressing one emits action with that entry's index and a selectionIndex of -1, as on macOS. Buttons go through the same callback as the default click, so the activation token is picked up first and an app can focus a window from the handler on Wayland. selection entries and buttons without text are skipped.

Tested against the fake notification daemon in spec/api-notification-dbus.spec.ts, and on GNOME Shell 50.4 (Wayland): the buttons render, pressing one emits action with the right index followed by close, and focusing a window from the handler raises it over another app's window.

A GNOME notification from an Electron app with Reply and Archive buttons

Checklist

Release Notes

Notes: Added support for Notification action buttons on Linux.

@codebytere codebytere added semver/minor backwards-compatible functionality target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 28, 2026

@MarshallOfSound MarshallOfSound left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

API LGTM

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

API LGTM

@codebytere
codebytere merged commit 74e535a into main Oct 13, 2026
156 of 158 checks passed
@release-clerk

release-clerk Bot commented Oct 13, 2026

Copy link
Copy Markdown

Release Notes Persisted

Added support for Notification action buttons on Linux.

@trop

trop Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #54889

@trop

trop Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "44-x-y", please check out #54890

@trop trop Bot added in-flight/45-x-y in-flight/44-x-y merged/45-x-y PR was merged to the "45-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. and removed target/45-x-y PR should also be added to the "45-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. in-flight/45-x-y in-flight/44-x-y labels Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y api-review/approved ✅ merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. semver/minor backwards-compatible functionality

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants