Bug 488204 - Klipper messages are saved in the Notification History since Plasma 6.0
Summary: Klipper messages are saved in the Notification History since Plasma 6.0
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 6.0.0
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression, usability
Depends on:
Blocks:
 
Reported: 2024-06-08 11:13 UTC by Yevhen Popok
Modified: 2024-11-27 20:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments
Screencast demonstrating the issue (Plasma 5.27 vs Plasma 6.0) (1.73 MB, video/x-matroska)
2024-06-08 11:13 UTC, Yevhen Popok
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yevhen Popok 2024-06-08 11:13:29 UTC
Created attachment 170267 [details]
Screencast demonstrating the issue (Plasma 5.27 vs Plasma 6.0)

SUMMARY
Plasmashell native clipboard manager sometimes generates messages (e.g., when user cycles through history items using hotkeys).

On Plasma 5.27 they were not saved on Notification History (presumably thanks to commit 120aed57 ("Keep Klipper notifications out of notification history") - https://invent.kde.org/plasma/plasma-workspace/-/commit/120aed57ced1530d85e4d522cfb3697fbce605fc). However, on Plasma 6.0 and 6.1 Beta Notification tray item (or a separate widget) notifies user of new unread messages whenever the notification for the current history item expires.

This regression may be related to Plasma 6 cleanup (e.g., commits a5e40fe5 and 8fa3fbf2).

STEPS TO REPRODUCE (screencast attached as well)
1. Right click on clipboard system tray item and select "Configure Clipboard..."
2. On "Shortcuts" section set some shortcuts for "Previous History Item" (e.g., Meta+Shift+z)
3. Copy few times different text so it will be saved as Clipboard Manager item
4. Press the "Previous History Item" shortcut 
5. Wait ~5 seconds until Clipboard Notification expires

OBSERVED RESULT
Notification tray item informs that there's a new item in the Notification History 

EXPECTED RESULT
Clipboard Manager notification is not saved to Notification History.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Fedora Kinoite 40
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
I didn't figured out how to set make configuration specifically for Klipper so for now as a workaround I've set "urgency level" for plasmashell "Notifications"  to "Low" (notification with the "Low" urgency are not saved to Notification History by default)

~/.config/plasmanotifyrc
[Event/notification]
Action=Popup
Urgency=Low
Comment 1 Nate Graham 2024-06-10 18:41:41 UTC
> This regression may be related to Plasma 6 cleanup (e.g., commits a5e40fe5 and 8fa3fbf2).
Can you share Invent URLs to these commits? I can't figure out which repo they're in.
Comment 2 Yevhen Popok 2024-06-10 19:08:55 UTC
(In reply to Nate Graham from comment #1)
> > This regression may be related to Plasma 6 cleanup (e.g., commits a5e40fe5 and 8fa3fbf2).
> Can you share Invent URLs to these commits? I can't figure out which repo
> they're in.

Sure. It's on the plasma-workspace repo:
https://invent.kde.org/plasma/plasma-workspace/-/commit/a5e40fe5
https://invent.kde.org/plasma/plasma-workspace/-/commit/8fa3fbf2
Also here's Kai's fix for bug 408989 - https://phabricator.kde.org/D21963

Though it's just my theory, I didn't try to get standalone Klipper back.
Comment 3 Yevhen Popok 2024-06-10 19:13:14 UTC
(In reply to Yevhen Popok from comment #0)
> ADDITIONAL INFORMATION
> I didn't figured out how to set make configuration specifically for Klipper
> so for now as a workaround I've set "urgency level" for plasmashell
> "Notifications"  to "Low" (notification with the "Low" urgency are not saved
> to Notification History by default)
> 
> ~/.config/plasmanotifyrc
> [Event/notification]
> Action=Popup
> Urgency=Low
Here I mentioned incorrect file, should be
~/.config/plasma_workspace.notifyrc
Comment 4 Yevhen Popok 2024-06-28 10:31:39 UTC
(In reply to Yevhen Popok from comment #3)
> (In reply to Yevhen Popok from comment #0)
> > ADDITIONAL INFORMATION
> > I didn't figured out how to set make configuration specifically for Klipper
> > so for now as a workaround I've set "urgency level" for plasmashell
> > "Notifications"  to "Low" (notification with the "Low" urgency are not saved
> > to Notification History by default)
> > 
> >  ~/.config/plasma_workspace.notifyrc
> > [Event/notification]
> > Action=Popup
> > Urgency=Low
Turns out, it's mostly useless workaround because sometimes it breaks switching between entries (e.g., keyboard shortcut triggers notification but doesn't switch to the next/previous entry). for now I just hide the Notifications element in System Tray.
Comment 5 Nate Graham 2024-11-27 20:41:33 UTC
I was able to reproduce this in the past but can't anymore with today's git master. Looks fixed for Plasma 6.3.0.