element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.16k stars 1.99k forks source link

Notification panel does not show my latest mentions #24616

Closed Elliria closed 1 year ago

Elliria commented 1 year ago

Steps to reproduce

I'm encountering multiple issues with the notification panel which is making it impossible to see the latest mentions. This is in a public unencrypted room so the messages should be displayed in the notification panel. I've also been testing with @MadLittleMods.

1. When the notification panel shows the empty state

Edit: This issue is tracked separately by https://github.com/vector-im/element-web/issues/24614

  1. Refresh the app with the notification panel open
  2. Notice that the empty state is shown in the notification panel (no /notifications are requested)
  3. From another user, send some more mentions in a public (unencrypted room)
  4. Notice how those new mentions don't show up either

2. When the notification panels shows some old outdated notifications

Edit: This issue has an upstream Synapse issue tracking the /notifications returning outdated results -> https://github.com/matrix-org/synapse/issues/15140

  1. Refresh the app
  2. If you had the notifications panel open, switch rooms to get it to be populated
  3. Two /notifications requests are sent off (request details below screenshot) but the responses do not include the latest mentions (as pictured in the elliria-test-mentions room)

1: https://gitter.ems.host/_matrix/client/r0/notifications?limit=20&only=highlight

Response ```json { "notifications": [ { "room_id": "!dqBkUNHOHmuFWvsiHH:gitter.im", "profile_tag": null, "actions": [ "notify", { "set_tweak": "sound", "value": "default" }, { "set_tweak": "highlight" } ], "ts": 1631394783651, "event": { "content": { "body": "> <@elliria-5e77940ad73408ce4fdd9fb6:gitter.im> I messed around with it extensively today to get all the details for a bug report and found that it can't be consistently repeated, but only happens some of the time. Should I still file it if it's inconsistent?\n\nYup", "format": "org.matrix.custom.html", "formatted_body": "
In reply to @elliria-5e77940ad73408ce4fdd9fb6:gitter.im
I messed around with it extensively today to get all the details for a bug report and found that it can't be consistently repeated, but only happens some of the time. Should I still file it if it's inconsistent?
Yup", "m.relates_to": { "m.in_reply_to": { "event_id": "$CjLS68tmWZ2q1gO5iU69cw-Oxq3wleZjKKm0dPmi25o" } }, "msgtype": "m.text" }, "origin_server_ts": 1631394783403, "sender": "@silico_biomancer:kde.org", "type": "m.room.message", "unsigned": { "age": 45707853657 }, "event_id": "$1YeLgxM_rdcx1cSpTFKBobbJbLVeapUUQvR3oyMHrb4" }, "read": true }, { "room_id": "!dqBkUNHOHmuFWvsiHH:gitter.im", "profile_tag": null, "actions": [ "notify", { "set_tweak": "sound", "value": "default" }, { "set_tweak": "highlight" } ], "ts": 1631394775876, "event": { "content": { "body": "> <@elliria-5e77940ad73408ce4fdd9fb6:gitter.im> Yep, that's one of the two methods I tried. I tried PIP and Git. I'd love complete step-by-step instructions from someone who uses Kubuntu from start to finish, with finish being AutoKey opened on the desktop and ready to go, because so far it's making me feel like a complete idiot. I'll give it one more go to see if I can solve it on my own, but am going to take a break for the moment and get away from it.\n\nHow did pip go wrong?", "format": "org.matrix.custom.html", "formatted_body": "
In reply to @elliria-5e77940ad73408ce4fdd9fb6:gitter.im
Yep, that's one of the two methods I tried. I tried PIP and Git. I'd love complete step-by-step instructions from someone who uses Kubuntu from start to finish, with finish being AutoKey opened on the desktop and ready to go, because so far it's making me feel like a complete idiot. I'll give it one more go to see if I can solve it on my own, but am going to take a break for the moment and get away from it.
How did pip go wrong?", "m.relates_to": { "m.in_reply_to": { "event_id": "$6-Uox14OfobfZV6KD1If7imprr7KM9ipszTANN9kGCY" } }, "msgtype": "m.text" }, "origin_server_ts": 1631394775400, "sender": "@silico_biomancer:kde.org", "type": "m.room.message", "unsigned": { "age": 45707861660 }, "event_id": "$k5BUicg6rN27kzzs3UfWAU33WcIxo71v-2wSh7tJlAM" }, "read": true }, { "room_id": "!dqBkUNHOHmuFWvsiHH:gitter.im", "profile_tag": null, "actions": [ "notify", { "set_tweak": "sound", "value": "default" }, { "set_tweak": "highlight" } ], "ts": 1631305498705, "event": { "content": { "body": "> <@elliria-5e77940ad73408ce4fdd9fb6:gitter.im> I'm glad you fixed it. As to the beta, I wrestled with it in a variety of ways yesterday to try to install and use it in a VM with no success. I like to think that I'm not an idiot, but it's defeating me. Do you (or does anyone) have fool-proof step-by-step instructions for successfully installing, updating, and running the beta and/or any of the other development versions (if there are others that can be run)?\n\n`pip install --pre autokey` is probably the easiest way, but then there are a few system dependecies you'll need", "format": "org.matrix.custom.html", "formatted_body": "
In reply to @elliria-5e77940ad73408ce4fdd9fb6:gitter.im
I'm glad you fixed it. As to the beta, I wrestled with it in a variety of ways yesterday to try to install and use it in a VM with no success. I like to think that I'm not an idiot, but it's defeating me. Do you (or does anyone) have fool-proof step-by-step instructions for successfully installing, updating, and running the beta and/or any of the other development versions (if there are others that can be run)?
`pip install --pre autokey` is probably the easiest way, but then there are a few system dependecies you'll need", "m.relates_to": { "m.in_reply_to": { "event_id": "$CSnHh_MqeKt_YfT3rzmmQOLakgdoqS9ueoCWUHXf9U0" } }, "msgtype": "m.text" }, "origin_server_ts": 1631305498539, "sender": "@silico_biomancer:kde.org", "type": "m.room.message", "unsigned": { "age": 45797138521 }, "event_id": "$45NYvSz6sBbqayexby5irf71_pWVUD_kM53PtdDeOh8" }, "read": true }, { "room_id": "!dqBkUNHOHmuFWvsiHH:gitter.im", "profile_tag": null, "actions": [ "notify", { "set_tweak": "sound", "value": "default" }, { "set_tweak": "highlight" } ], "ts": 1630095821345, "event": { "content": { "body": "> <@elliria-5e77940ad73408ce4fdd9fb6:gitter.im> Hey there, everybody. There's an AutoKey behavior that has changed from version 0.09.4 to the current 0.95.10 and I'm not sure if it's a bug, an intentional fix, something interesting, something neutral, or something else entirely, so I figured I'd describe it here to see what you guys think and to find out if it should be filed as a bug. \n> \n> AutoKey 0.90.4 accepted ```---``` (three dashes) as an Abbreviation for a phrase or script.\n> \n> AutoKey 0.95.10 does not accept ```---``` (three dashes) as an Abbreviation unless you trick it. If you try to set that as the Abbreviation, AutoKey ignores your input entirely and does nothing. You can trick it by setting ```x---``` as the Abbreviation and, after it accepts it, editing the Abbreviation to remove the x. The three-dash Abbreviation then works without complaint.\n> \n> For the record, the environment for AutoKey 0.90.4 was Ubuntu MATE 16.04 LTS and the environment for AutoKey 0.95.10 was Kubuntu 20.04 LTS.\n> \n\nSounds like a bug to me, thank you. If possible could you file it as an issue? Otherwise I will if I get around to it", "format": "org.matrix.custom.html", "formatted_body": "
In reply to @elliria-5e77940ad73408ce4fdd9fb6:gitter.im

Hey there, everybody. There's an AutoKey behavior that has changed from version 0.09.4 to the current 0.95.10 and I'm not sure if it's a bug, an intentional fix, something interesting, something neutral, or something else entirely, so I figured I'd describe it here to see what you guys think and to find out if it should be filed as a bug.

AutoKey 0.90.4 accepted --- (three dashes) as an Abbreviation for a phrase or script.

AutoKey 0.95.10 does not accept --- (three dashes) as an Abbreviation unless you trick it. If you try to set that as the Abbreviation, AutoKey ignores your input entirely and does nothing. You can trick it by setting x--- as the Abbreviation and, after it accepts it, editing the Abbreviation to remove the x. The three-dash Abbreviation then works without complaint.

For the record, the environment for AutoKey 0.90.4 was Ubuntu MATE 16.04 LTS and the environment for AutoKey 0.95.10 was Kubuntu 20.04 LTS.

Sounds like a bug to me, thank you. If possible could you file it as an issue? Otherwise I will if I get around to it", "m.relates_to": { "m.in_reply_to": { "event_id": "$iaWuRfG2-op9mfTSR9JN7Mw9QAgKHhRV-bU5T-VhMs8" } }, "msgtype": "m.text" }, "origin_server_ts": 1630095820959, "sender": "@silico_biomancer:kde.org", "type": "m.room.message", "unsigned": { "age": 47006816101 }, "event_id": "$TWt_e4KX_Dh3wV2DOJ-6EEPQPkED60GqctgaklNQyM8" }, "read": true }, { "room_id": "!dqBkUNHOHmuFWvsiHH:gitter.im", "profile_tag": null, "actions": [ "notify", { "set_tweak": "sound", "value": "default" }, { "set_tweak": "highlight" } ], "ts": 1626726000582, "event": { "content": { "body": "Awesome work Elliria (Elliria) !", "format": "org.matrix.custom.html", "formatted_body": "Awesome work Elliria (Elliria) !", "msgtype": "m.text" }, "origin_server_ts": 1626726000231, "sender": "@silico_biomancer:kde.org", "type": "m.room.message", "unsigned": { "age": 50376636829 }, "event_id": "$6mzVma5MPa4HFHyb-WmbFzODikdgb_gHIvc30Q5_wmY" }, "read": true }, { "room_id": "!dqBkUNHOHmuFWvsiHH:gitter.im", "profile_tag": null, "actions": [ "notify", { "set_tweak": "sound", "value": "default" }, { "set_tweak": "highlight" } ], "ts": 1624489549448, "event": { "content": { "body": "> <@elliria-5e77940ad73408ce4fdd9fb6:gitter.im> That's encouraging. At the moment, I have a few projects I have to get through before I can wear my official coder hat, but I'll continue playing around with code in general and poking around in the AutoKey sources just to see if anything jumps out at me.\n\nI recommend looking at tests as a starting point. They show you how code should work.\n(this is general advice more that for Autokey since our testing is a bit spotty)", "format": "org.matrix.custom.html", "formatted_body": "
In reply to @elliria-5e77940ad73408ce4fdd9fb6:gitter.im
That's encouraging. At the moment, I have a few projects I have to get through before I can wear my official coder hat, but I'll continue playing around with code in general and poking around in the AutoKey sources just to see if anything jumps out at me.
I recommend looking at tests as a starting point. They show you how code should work.
(this is general advice more that for Autokey since our testing is a bit spotty)", "m.relates_to": { "m.in_reply_to": { "event_id": "$jZs3fG_Blnp7QxdCJ_QxhSYpjEUUTzVXE3mc5lsbB5Q" } }, "msgtype": "m.text" }, "origin_server_ts": 1624489517264, "sender": "@silico_biomancer:kde.org", "type": "m.room.message", "unsigned": { "age": 52613119796 }, "event_id": "$yleRn95D6kE7gltkxObRzg2XPVi3aP2Hl8NN3Me9Ymo" }, "read": true }, { "room_id": "!dqBkUNHOHmuFWvsiHH:gitter.im", "profile_tag": null, "actions": [ "notify", { "set_tweak": "sound", "value": "default" }, { "set_tweak": "highlight" } ], "ts": 1624414848819, "event": { "content": { "body": "> <@elliria-5e77940ad73408ce4fdd9fb6:gitter.im> Yep, it looks like that's where it is and... oof... that code is out of my league. I was hoping to see something simple and obvious that was wrong, but there are way too many references in there to things that could be the cause that I got all tangled up trying to follow them. Gotta stick with more basic code for now. All I can say is good luck. We're all counting on you.\n\nI also thought it would be simple, just adding/fixing a callback. But no, I think the issue is that callback for left click doesn't exist separate to right, or if it does it is documented poorly", "format": "org.matrix.custom.html", "formatted_body": "
In reply to @elliria-5e77940ad73408ce4fdd9fb6:gitter.im
Yep, it looks like that's where it is and... oof... that code is out of my league. I was hoping to see something simple and obvious that was wrong, but there are way too many references in there to things that could be the cause that I got all tangled up trying to follow them. Gotta stick with more basic code for now. All I can say is good luck. We're all counting on you.
I also thought it would be simple, just adding/fixing a callback. But no, I think the issue is that callback for left click doesn't exist separate to right, or if it does it is documented poorly", "m.relates_to": { "m.in_reply_to": { "event_id": "$MD02yOZilNhT64gDFmop5AkQXzmdrHFZKDNp9xO1j_s" } }, "msgtype": "m.text" }, "origin_server_ts": 1624414848530, "sender": "@silico_biomancer:kde.org", "type": "m.room.message", "unsigned": { "age": 52687788530 }, "event_id": "$kcf9okrQvjZyud6FHH8pDDN05_xlSxB49baxYYcv9U8" }, "read": true } ], "next_token": "6554474" } ```

2: https://gitter.ems.host/_matrix/client/r0/notifications?limit=20&only=highlight&from=6554474

Response ```json { "notifications": [], "next_token": null } ```

Other details

Affected users:

My notification settings:


The /notifications request information was as requested in the other issue:

  1. Close notification panel
  2. Refresh the page (or exit bring the app back up)
  3. Open the browser devtools -> Network tab -> search for /notifications
  4. Open the notifications panel
  5. There should be 4 requests but we only care about the two GET /notifications. Copy the URL and the Response body
    • Be sure to sanitize the output with anything you don't mean to share.

-- https://github.com/vector-im/element-web/issues/24614#issuecomment-1440808864

Outcome

What did you expect?

To be able to see my latest mentions/notifications

What happened instead?

I just see these old/stale notifications

Operating system

Kubuntu 22.04 LTS

Browser information

Firefox 110.0 (64-bit)

URL for webapp

https://app.gitter.im/#/room/#elliria-test-mentions:matrix.org

Application version

Gitter version: 1.11.23 Olm version: 3.2.12

Homeserver

gitter.im

Will you send logs?

Yes

Elliria commented 1 year ago

1.txt 2.txt

(Updated so these are now incorporated in the issue's description)

MadLittleMods commented 1 year ago

Created a upstream Synapse issue for the second issue described. It appears like /notifications isn't returning the most up to date results for some reason -> https://github.com/matrix-org/synapse/issues/15140

t3chguy commented 1 year ago

Given 1. is tracked in https://github.com/vector-im/element-web/issues/24614 and 2. in https://github.com/matrix-org/synapse/issues/15140 this issue is redundant

MadLittleMods commented 1 year ago

@Elliria Based on our findings in https://github.com/matrix-org/synapse/issues/15140, I think we've figured out why you're not seeing new mentions show up.

The notification panel only shows highlight notifications.

Confusingly, the On setting in Element will set your push rules as {set_tweak: "highlight", "value": false} and those things won't show up in the notification panel.

In order to make this work, in the notification settings, you must set Messages containing my username and Messages containing my display name as Noisy which will add {set_tweak: "highlight"} to the push rules.


https://github.com/vector-im/element-web/issues/24614 still tracks the separate issue of the notification panel being blank and staying blank.

Elliria commented 1 year ago

Mine were set to "On" and I've changed them to "Noisy". I'll know as soon as something new comes in whether this fixed it or not. Thank you in advance for what seems like the solution.

t3chguy commented 1 year ago

@MadLittleMods that too is a synapse bug, the spec for /notifications says nothing about highlight, so synapse is returning a subset of the expected results

MadLittleMods commented 1 year ago

@t3chguy Mind creating a Synapse issue for this? I feel like I am only scratching the surface when it comes to the push rule mess.

t3chguy commented 1 year ago

I'll try if I remember on Monday

clokep commented 1 year ago

@t3chguy Mind creating a Synapse issue for this? I feel like I am only scratching the surface when it comes to the push rule mess.

According to the synapse ticket the requested URL is: https://gitter.ems.host/_matrix/client/r0/notifications?limit=20&only=highlight so Element Web seems to be requesting only highlights?

Elliria commented 1 year ago

I received a new mention today, so that part seems to be fixed. I didn't receive a mention for the autokey/autokey room that has this setting and had one new message in it today: autokey_room_notification_settings

Elliria commented 1 year ago

I'm still not receiving notifications for the autokey/autokey room, even when my name is mentioned.

clokep commented 1 year ago

I'm still not receiving notifications for the autokey/autokey room, even when my name is mentioned.

You have a custom push rule for that room:

I'm not really sure what this push rule is though (or where it could have come from). I suppose it could be setting it to "All messages". Does going back to "Use default" work?

Elliria commented 1 year ago

I don't know, either. I'm able to go back to "Use default", but nothing changes (although I suppose there would need to be a new message in the autokey/autokey channel to trigger a new notification.

Here are the current room settings for that channel after changing back to "Use default":

AutoKeyRoomSettings