Bug 475228 - Notifications contain full chat history going back minutes or hours, rather than just the latest message
Summary: Notifications contain full chat history going back minutes or hours, rather t...
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords: regression
: 485111 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-10-05 00:12 UTC by Nate Graham
Modified: 2024-06-12 19:29 UTC (History)
3 users (show)

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


Attachments
Too much text! (482.16 KB, image/jpeg)
2024-06-07 16:57 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-10-05 00:12:04 UTC
Current git master built against Qt6, on Plasma 6 Wayland, with 200% scale and 11pt Noto Sans font.

When I get a notification from NeoChat, it is almost always scrollable and contains a *huge* amount of messages in it, seemingly back to the last point NeoChat considers unread. This is problematic for several reasons:

1. NeoChat's "last read message" detection is fairly buggy and causes other issues (e.g. Chats not scrolling to the right place when re-opened
2. Even if that feature worked perfectly, showing all unread messages in the notification is not useful and defeats the purpose of showing a notification; I'm not going to scroll through the whole conversation's history in the notification, I'd rather just go to the app and read the history there!

For these reasons, as a solution I'd propose only showing the text of the latest message in the notification.
Comment 1 Nate Graham 2024-06-07 16:56:08 UTC
*** Bug 485111 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2024-06-07 16:57:29 UTC
Created attachment 170232 [details]
Too much text!

A Plasma bug that accidentally removed the height constraint from notification popups reveals the absurdity of this issue. See attached screenshot.

There's no way that much text in a notification ever makes sense.
Comment 3 Bug Janitor Service 2024-06-10 18:50:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/1772
Comment 4 Tobias Fella 2024-06-12 19:29:57 UTC
Git commit a0c8bdf021a62b239cc55c4b118a0117a56371f6 by Tobias Fella.
Committed on 12/06/2024 at 19:28.
Pushed by tfella into branch 'master'.

Make notifications more useful

- Refactor and cleanup code
- Don't paginate through notifications - it spams the server with requests and realistically only contains anything relevant on startup after a long time, in which case you're going to lose some notification anyway
- Only show newest notification for the respective room, closing the old notification if one exists
- Only show text of this notification

M  +0    -3    src/controller.cpp
M  +5    -0    src/neochatconnection.cpp
M  +67   -68   src/notificationsmanager.cpp
M  +8    -3    src/notificationsmanager.h

https://invent.kde.org/network/neochat/-/commit/a0c8bdf021a62b239cc55c4b118a0117a56371f6