You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(notifications): toast body-click invokes the default action; hide the default from the button row (#217)
The freedesktop notification spec reserves the action key `default` for
click-to-activate — servers may skip rendering it as a button. Trollshell
did neither: body-click on a toast was dismiss-only (an actionable
notification, e.g. a chat message, was discarded instead of opened), and
`default` survived `parse_actions` unfiltered, so it rendered as a literal
button — burning one of the 3 capped slots, or a blank ghost button when
the app sends an empty label (`["default", ""]`, common in practice).
- `overlays/notifications.rs::build_card`: body-click now invokes the
`default` action (if the notification carries one) then dismisses;
default-less toasts keep today's plain dismiss-on-click.
- The visible actions row now excludes `default`, so `.take(3)` caps real
secondary actions only.
- Added a small flat `x` dismiss button in the card header — load-bearing,
not just symmetry: once body-click can open instead of discard, a
default-carrying toast needs an explicit way to close it.
- `.ts-toast:hover { cursor: pointer }` so the card reads as clickable.
- `panels/notifications.rs::build_history_action_row` (the drawer history
consumer) gets the same default-exclusion — it rendered the identical
unfiltered actions list.
- Both consumers share the partition logic via a new
`components/notif_actions.rs` (`default_action` / `visible_actions`)
instead of duplicating the `key == "default"` check.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments