Bug 486070

Summary: Quitting an app that sent a flood of notifications doesn't stop the flood
Product: [Plasma] plasmashell Reporter: Nate Graham <nate>
Component: NotificationsAssignee: Plasma Bugs List <plasma-bugs>
Status: REPORTED ---    
Severity: normal CC: fanzhuyifan, kde, postix
Priority: NOR Keywords: usability
Version: 6.0.4   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=441906
Latest Commit: Version Fixed In:

Description Nate Graham 2024-04-24 13:06:14 UTC
SUMMARY
When Bug 441906 happens, the user cannot recover by quitting the app sending a flood of notifications; only by manually restarting plasmashell.

I understand the technical reasons behind why this happens (Plasma already got the list of notifications to display) but the UX for a normal user is not great.


STEPS TO REPRODUCE
1. Run a chat app that creates a notification per message (e.g. NeoChat) and join a lot of rooms.
2. Go 'offline' for some time, e.g. by closing the laptop lid. Do not quit the app.
3. Many hours or even days later, wake up the system or reconnect to the internet.
4. The app emits a massive number of notifications for missed messages. Plasma attempts to display all of them one by one, degrading system performance and responsiveness; this is Bug 441906.
5. Notice this happening and try to recover by quitting the app that sent the notifications


OBSERVED RESULT
The flood of notifications continues.


EXPECTED RESULT
The flood of notifications ends immediately. The only way to end the flood of useless notifications is to restart plasmashell itself.


ADDITIONAL INFORMATION
The issue could be rendered redundant if we fix Bug 441906.
Comment 1 fanzhuyifan 2024-04-24 20:16:33 UTC
Humm not sure whether we can feasibly implement this functionality -- all notifications are received and queued for display, and the notification widget has no knowledge of the status of the app that sent the notifications. I think that fixing BUG 441906 is the way to go.
Comment 2 Nate Graham 2024-04-25 13:16:26 UTC
With the current architecture, probably.

But long term, the fact that the service lives in the widget is problematic IMO. I would much prefer it if the backend service lived somewhere central and Notifications widgets were just frontends to display history and register themselves as places for notification popups to be displayed. Then the backend could become richer and track app state for the purposes of this idea.

But yes, all of that could probably be obviated by fixing Bug 441906. If you wanna close this, I won't object.