element-hq / element-web

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

Mysterious Dot keeps returning on the People icon in the spaces sidebar #23055

Open foresto opened 2 years ago

foresto commented 2 years ago

Steps to reproduce

  1. Upgrade from Element Desktop 1.10 to 1.11
  2. Open Element Desktop

Outcome

What did you expect?

No mysterious dots distracting me without good reason.

What happened instead?

A dot appears on the upper right corner of the People icon in the spaces sidebar.

The dot has no apparent explanation. I have no idea what it is supposed to mean or how to get rid of it. I briefly thought it might be a new message indicator, but I have no new messages.

Un-checking People on the pin-to-sidebar quick setting, and then re-checking it, gets rid of the dot temporarily, but it just returns next time I start Element.

What is this thing? Some kind of notification? What good is that if it doesn't offer any explanation or correspond to anything that warrants a notification?

Operating system

Debian Linux

Application version

Element version: 1.11.2 Olm version: 3.2.12

How did you install the app?

Flatpak, which is built from https://packages.element.io/debian/pool/main/e/element-desktop/element-desktop_1.11.2_amd64.deb

Homeserver

matrix.org

Will you send logs?

No

foresto commented 2 years ago

It looks like this: element-people-dot

SimonBrandner commented 2 years ago

The white dot is an unread indicator - it shows up for rooms which have notifications set to Mentions & Keyword and contain unread messages.

If you open the People meta-space, do you see any rooms that also have this white dot and their names are in bold? Do they have notifications set to Mentions & Keywords?

If not, this could be a case of https://github.com/vector-im/element-web/issues/23027

foresto commented 2 years ago

If you open the People meta-space, do you see any rooms that also have this white dot and their names are in bold?

No.

If not, this could be a case of https://github.com/vector-im/element-web/issues/23027

I don't see how that would make sense. The dot doesn't go away when I open conversations/rooms and make sure they're up to date. It goes away when I remove the People meta-space from the bar. It doesn't appear when someone receives a message & produces a read receipt. It appears whenever I re-launch the application.

foresto commented 2 years ago

Now that I'm on Element Desktop 1.11.8, the dots are appearing on Home, People, and Other rooms meta-spaces, and within those, the dots are appearing on various rooms (both group and 1:1) that haven't had new messages in months. Viewing each of those rooms temporarily clears the dots, but more random dots (sometimes on different rooms) reappear when I restart the app.

SimonBrandner commented 2 years ago

Sorry, the response on this has taken so long... This is quite difficult to debug, so I've put together a small script to possibly help debug this:

const roomName = "<insert exact room name>";
const myUserId = mxMatrixClientPeg.get().getUserId();
const room = mxMatrixClientPeg.get().getRooms().find(r => r.name === roomName);
const events = room.getLiveTimeline().getEvents().map((e) => `${e.getId()}:${e.getType()}`)
const eventReadUpTo = room.getEventReadUpTo(myUserId);
const publicReadReceiptsForUserId = room.getReadReceiptForUserId(myUserId, false, "m.read");
const privateReadReceiptsForUserId = room.getReadReceiptForUserId(myUserId, false, "m.read.private");
const unstablePrivateReadReceiptsForUserId = room.getReadReceiptForUserId(myUserId, false, "org.matrix.msc2285.read.private");

console.log("Output:", {
    events: events,
    eventReadUpTo,
    publicReadReceiptsForUserId,
    privateReadReceiptsForUserId,
    unstablePrivateReadReceiptsForUserId,
})

If you open the console (Ctrl+Shift+I), you should be able to copy and paste this there filling in the name of the room which appears as unread even though it shouldn't (note: you need to not open the room and clear the unread notification before running this).

If you do run it Output: {...} will get printed and you can right-click it and press something like Copy Object. If you could please do that and copy-paste it here, it would be super helpful! The output will look something like this, so it shouldn't include any privacy-breaking information

{
    "events": [
        "$AORS1fQK2ojirZjYlMpMu3hW6wR5AAZ5wHNe2SRQs1c:m.room.message",
        "$Zcj8NxkVzlFtyqLJpSWpPoaKlT3EW4Jkoac-Q8Vso9M:m.room.message",
        "$k7LmGpIr0leC2Rsk6q1YJ_RV29cVmEJ4VhUN9bRNdgM:m.room.message",
        "$6dJKKtYXzbiBaVENLHmE5oRdN7wkyqGtD_NSXhAhx_U:m.room.message",
        "$nOPgups3KV2LpMSoYk8bvlOuvQnMsV2ro-gd6zMdzNs:m.room.message",
        "$heriVqX117YybzBIOqnQ8AJj8ts6w65Cj6RH0iQDhuM:m.reaction",
        "$WPuhoUZWMMWhQPZM3Yu-KLUjDkC4vQQTWQGduiu-qtQ:m.room.message",
        "$Ey6poGQUU4woAiMTW_KjUsVXJq181051OAJQE_baMA0:m.room.message",
        "$t7Mn723yam2nIRBaPt2arZQwujScx2D8DxeXeoP8_Gg:m.room.message",
        "$5YXT6VKm3i4frhHX9XD1eVV2cx69jMwyZ2bfFWYnJto:m.room.message",
        "$rnt4eIdfTPvOzsHwGUiCdgrMcKV4hYOkMvGgTgvV5AE:m.room.message",
        "$UfoRR7Z_JCH3hajV9MxiP72X2ZrWORuyH-ZLocS-ha0:m.room.message",
        "$LO1rs4fZhGsdwXpFmvBbZAc2-RrMkn3FZ1wRzrDxdIs:m.room.message",
        "$XlT9Yk2Uu9IeeSRlgri53LsH1ne7bfGS5LMaIOPL_IU:m.room.message",
        "$jXxVRkA2mZ2Ho4p5IQlfjWAtayIl4DKM3hgrdxN7dTE:m.room.message",
        "$wOwAu1wQuypZbewWHtlXaHj4ESr4yi6suLzejlTNKWM:m.room.message",
        "$hEB5EOfZ97qRyEoXGJT8JyI7qond9VKPwqerWHoXWIc:m.room.message",
        "$V7qbvLwYgx1XQU6wk1aHa_fYsNF3yDDjV8yMoayCTsA:m.room.message",
        "$WL9zl06_x67mvrM3zLDyXpkzVdtNSaMl6yBtUpYx700:m.room.message",
        "$k96EIkWdthy4cT_8V1QkFmIq7y0yTnF9jGR8Rucuf_I:m.room.message",
        "$sx_NdQEHKdhz85Pmvr77GOjI6N4ywb8bc2OSPne3XiQ:m.room.message",
        "$cXK5FQ3iHLZ5nSPH6Or7yXl-fs9MYTwO6mLPHTikkjs:m.room.message",
        "$7tMhAAJAVi6Ft69E729Z6Tx4Vc_9ycdgPNNbkzlMMaM:m.room.message",
        "$erX5XM-7qWDokqQ-zJuB13vrqGpBU4iVjMaNpuhDOwU:m.reaction",
        "$o1d7kaVmRG9PXZkFDEpRMvymNwM4aOU_Tc8-5dTWN3Q:m.room.message",
        "$LM-HUYtjYF7VZZVXaHOzUhYx6vdoPf1tL82-M_9lGw8:m.room.message",
        "$EQDBQlP2_MAczov87W-B_Yqukl3rRv3AHh8YJa6fNU0:m.room.message",
        "$fbIqAzQEWP_lrw8CQoOQ7nIDo7O25YtQI84Q2Tq7e24:m.room.message",
        "$EPMmAJ3uljiXTXyyFRd2DbIaYreCM4ma2lUrsjnmFYs:m.room.message",
        "$MX0V9OZJvkFh6OdmYhWgAWhNefsnJmaeA2vSaMVRvOY:m.room.message",
        "$YZfayUZaMwpCFYJQSuLX6JexJmY7_bbbcuiI2JhfQCk:m.room.message",
        "$NoRSXWMqoPYHHkebhFu5PuowhKvtcKo_xedtmHS2VBQ:m.room.message",
        "$RruohmKgrTTxdPhHsbwn6pwfFLZon_4PzQ3ETqx9CpU:m.room.message",
        "$1_oCuw79SukIC3T5x-cw1MVj71eo_4KiZiXbXPeQF2U:m.room.message",
        "$1WJ8lXp-iCxBJqfkNbzPuE5B7Aad1JP_eF886kbDhsA:m.room.message",
        "$z-WKSabI3ZdnlRVCniVqhZV9pHeap67VHNf_f2544ZY:m.room.message",
        "$mN_X_nG9qQwCJodvEHJs3SFkOsW2HegQn4YtP5PjIKc:m.room.message",
        "$vPHOVydye3Hd1XaovmDQZFxTj9XmxZKy-GTGTlskcVs:m.room.message"
    ],
    "eventReadUpTo": "$vPHOVydye3Hd1XaovmDQZFxTj9XmxZKy-GTGTlskcVs",
    "publicReadReceiptsForUserId": {
        "eventId": "$vPHOVydye3Hd1XaovmDQZFxTj9XmxZKy-GTGTlskcVs",
        "data": {
            "ts": 1665172684244,
            "threadId": "main"
        }
    }
}

I am not completely sure this will be enough to debug this but it's worth seeing what we get here

foresto commented 2 years ago

Can I send you the output someplace that isn't public? Despite not being message cleartext, unique IDs like those can often be correlated to one thing or another, so I'm in the habit of keeping such things private.

foresto commented 2 years ago

Or, if you don't need the specific IDs, I could replace them with arbitrary strings and post the result here. I see right away that the eventReadUpTo and publicReadReceiptsForUserId fields refer to a string that appears in the events array.

SimonBrandner commented 2 years ago

Feel free to send it over to @simonb:element.io or replace the event ids with arbitrary strings

foresto commented 2 years ago
{
    "events": [
        "$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:m.room.member",
        "$bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:m.room.power_levels",
        "$ccccccccccccccccccccccccccccccccccccccccccc:m.room.join_rules",
        "$ddddddddddddddddddddddddddddddddddddddddddd:m.room.history_visibility",
        "$eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee:m.room.guest_access",
        "$fffffffffffffffffffffffffffffffffffffffffff:m.room.name",
        "$ggggggggggggggggggggggggggggggggggggggggggg:m.room.encryption",
        "$hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh:m.room.avatar",
        "$iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii:m.room.member",
        "$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj:m.room.power_levels",
        "$kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk:m.room.canonical_alias",
        "$lllllllllllllllllllllllllllllllllllllllllll:m.room.encrypted",
        "$mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm:m.room.member",
        "$nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn:m.room.encrypted",
        "$ooooooooooooooooooooooooooooooooooooooooooo:m.room.encrypted",
        "$ppppppppppppppppppppppppppppppppppppppppppp:m.room.encrypted",
        "$qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq:m.room.encrypted",
        "$rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr:m.room.encrypted",
        "$sssssssssssssssssssssssssssssssssssssssssss:m.room.encrypted",
        "$ttttttttttttttttttttttttttttttttttttttttttt:m.room.message"
    ],
    "eventReadUpTo": "$sssssssssssssssssssssssssssssssssssssssssss",
    "publicReadReceiptsForUserId": {
        "eventId": "$sssssssssssssssssssssssssssssssssssssssssss",
        "data": {
            "ts": 1584854370721,
            "threadId": "main"
        }
    }
}
foresto commented 2 years ago

That was the result yesterday, captured with Element Desktop 1.11.11 running on linux, in an encrypted room that hasn't had message traffic in months. IDs replaced with arbitrary strings, obviously.

Now that I look that that room again, I see that it no longer has the white dot. I didn't notice at what point it disappeared. I still have similarly quiet rooms with dots, though, so I could test again using those if there's a need.

SimonBrandner commented 1 year ago

Do you have threads enabled?

foresto commented 1 year ago

No. I don't recall ever enabling threads, and I see in the Labs setting for threads that it's still asking me if I want to "join the beta".

foresto commented 1 year ago

However, I also use Nheko, and I don't know if it does anything that would affect threads.

SimonBrandner commented 1 year ago

However, I also use Nheko, and I don't know if it does anything that would affect threads.

Pretty sure doesn't have an affect. Thanks!

SimonBrandner commented 1 year ago

Now that I look that that room again, I see that it no longer has the white dot. I didn't notice at what point it disappeared. I still have similarly quiet rooms with dots, though, so I could test again using those if there's a need.

Hmm, this is all looking very odd...

Once you see this again, could you please run the script again, wait for the dot to disappear by itself and then run it again and share the output of both runs?

foresto commented 1 year ago

I upgraded Element to version 1.11.15 today and launched it for the first time in (I think) a week or two. Upon launching, the room that I used for testing last time once again had the dot on its icon. It was not the active room.

I ran your script on the previously-tested room again before entering it. It produced exactly the same output as last time (posted above in redacted form).

When I then entered the room, the dot on its icon went away immediately. I ran the script again. Here is the new output, redacted with the same substitutions as last time:

{
    "events": [
        "$zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz:m.room.create",
        "$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:m.room.member",
        "$bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:m.room.power_levels",
        "$ccccccccccccccccccccccccccccccccccccccccccc:m.room.join_rules",
        "$ddddddddddddddddddddddddddddddddddddddddddd:m.room.history_visibility",
        "$eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee:m.room.guest_access",
        "$fffffffffffffffffffffffffffffffffffffffffff:m.room.name",
        "$ggggggggggggggggggggggggggggggggggggggggggg:m.room.encryption",
        "$hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh:m.room.avatar",
        "$iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii:m.room.member",
        "$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj:m.room.power_levels",
        "$kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk:m.room.canonical_alias",
        "$lllllllllllllllllllllllllllllllllllllllllll:m.room.message",
        "$mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm:m.room.member",
        "$nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn:m.room.message",
        "$ooooooooooooooooooooooooooooooooooooooooooo:m.room.message",
        "$ppppppppppppppppppppppppppppppppppppppppppp:m.room.message",
        "$qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq:m.room.message",
        "$rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr:m.room.message",
        "$sssssssssssssssssssssssssssssssssssssssssss:m.room.message",
        "$ttttttttttttttttttttttttttttttttttttttttttt:m.room.message"
    ],
    "eventReadUpTo": "$ttttttttttttttttttttttttttttttttttttttttttt",
    "publicReadReceiptsForUserId": {
        "eventId": "$ttttttttttttttttttttttttttttttttttttttttttt",
        "data": {
            "ts": 1584855348854,
            "threadId": "main"
        }
    },
    "privateReadReceiptsForUserId": {
        "eventId": "$ttttttttttttttttttttttttttttttttttttttttttt",
        "data": {
            "ts": 1584855348854,
            "threadId": "main"
        }
    }
}

Compared to the output before entering the room, I notice a few differences:

foresto commented 1 year ago

I have more rooms that haven't seen traffic in months, also with dots on their icons. Some are group rooms, and some are 1:1 rooms. All are encrypted. I'll try to avoid entering them for now, in case we need to capture script output before & after entry.