Bug 466201

Summary: Nonsensical state event aggregation message
Product: [Applications] NeoChat Reporter: Nicolas Fella <nicolas.fella>
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED FIXED    
Severity: normal CC: carl, james.h.graham
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Combined message
Individual messages

Description Nicolas Fella 2023-02-21 17:04:19 UTC
When combining various state event messages into a single message the result can be nonsensical. See screenshots

Neochat 0891f32c086646a4861ad9e5055ef995000ed669
Comment 1 Nicolas Fella 2023-02-21 17:05:16 UTC
Created attachment 156571 [details]
Combined message
Comment 2 Nicolas Fella 2023-02-21 17:05:32 UTC
Created attachment 156572 [details]
Individual messages
Comment 3 James Graham 2023-02-25 14:15:20 UTC
What in particular do you find to be nonsensical. It states the 5 users did one or more of the following actions?
Comment 4 Nicolas Fella 2023-02-25 14:18:53 UTC
The sentence may be grammatically correct, but "5 users banned a user from the room" sounds just weird.
Comment 5 Nicolas Fella 2023-02-25 14:20:43 UTC
It should probably not aggregate events of different types. It could look like
- X banned Y from the room
- 2 users joined
- Y changed their display name
Comment 6 Nicolas Fella 2023-02-25 14:22:07 UTC
Another example I've just seen: 2 users invited someone to the room or joined the room
Comment 7 James Graham 2023-02-25 14:23:42 UTC
Yeah the issue in this one is coming up with something better. There was some discussion in the original merge request https://invent.kde.org/network/neochat/-/merge_requests/730. The other potential options I came up with were:

- Simplify to "x users sent y state events" and let the expansion do the rest of the work
- Restore some similar to the old message "user a did x, user b did y and user c did z" then just elide it to a single line and the user expands to get the full picture.

If we can get a solid consensus on "better" I wouldn't be against making a change
Comment 8 Bug Janitor Service 2024-09-10 07:46:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/1885
Comment 9 James Graham 2024-09-13 17:12:03 UTC
Git commit 67dfc7b32e4d8747b1e5e419cbdf0b8f7951f34d by James Graham.
Committed on 13/09/2024 at 17:11.
Pushed by nvrwhere into branch 'master'.

Fix Eventhandler strings for translation

Change the generic representations of events in event handler to always have a full string to aid translation.

The aggregated list is then converted to be a simple list of single event generic descriptions to avoid string puzzles.

Fixes network/neochat#638
Related: bug 491024

M  +11   -6    autotests/eventhandlertest.cpp
M  +105  -60   src/eventhandler.cpp
M  +1    -1    src/eventhandler.h
M  +1    -1    src/models/messageeventmodel.cpp
M  +7    -44   src/models/messagefiltermodel.cpp
M  +3    -4    src/timeline/StateDelegate.qml

https://invent.kde.org/network/neochat/-/commit/67dfc7b32e4d8747b1e5e419cbdf0b8f7951f34d