elk-zone / elk

A nimble Mastodon web client
https://elk.zone
MIT License
5.45k stars 561 forks source link

Content from multiple posts getting mixed together #2216

Open johnsonm opened 1 year ago

johnsonm commented 1 year ago

Occasionally I'm seeing content from multiple posts mixed into one. For instance, I was on my notifications page, and saw "show 1 new item". I clicked the notification text, and saw this:

image

That content is mixed together from two posts:

https://social.makerforums.info/@mcdanlj/110678716327637629

https://social.makerforums.info/@mcdanlj/110684361403957499

I haven't yet figured out a way to reproduce this. I've seen something like this on Firefox 114; the screenshot is from Firefox 115 on Linux.

Here's another set of notifications:

image

That inserts the wrong hashtag, which it got from this post:

https://social.makerforums.info/@mcdanlj/110684291181195491

stackblitz[bot] commented 1 year ago

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

swaldman commented 1 year ago

I'm seeing similar jumblings. Here's a notification. It looks normal, but it is mistaken, in ways very likely to offend authors of the pieces referenced, if this view were somehow published (like, um, here):

Screenshot 2023-09-16 at 2 07 37 PM

The hashtag that attributes authorship is dangerously wrong. Here are the two original posts the notifications feed has somehow fused:

Screenshot 2023-09-16 at 2 08 09 PM Screenshot 2023-09-16 at 2 07 52 PM

Attributions are correct in the originals, hybridized into error under notifications.

chrisesimpson commented 1 year ago

Same issue here on Elk v0.10.0 in chrome (117.0.5938.149):

image

If I hit F5 to reload I get the correct unmerged version:

image

pjohanneson commented 11 months ago

I'm seeing this in Elk canary 0bd1209, using Firefox 119.0. (Edit: I've been seeing it for a while, but only thought to check the Issues recently.)

Edit

Hmm, it might be fixed in https://github.com/elk-zone/elk/commit/957f0d3b173a41e81485a1a48d9c422499f20cb0.

Edit 1 Jan 2024

If it was fixed, it's been unfixed; it's happening in https://github.com/elk-zone/elk/commit/77588c1890cd75a7ac58a1d91dec217037510e78.

pjohanneson commented 9 months ago

This is new. I saw this this evening, using https://github.com/elk-zone/elk/commit/b016320eaff55166d12ed1176fe5bb6868d6c0fd.

Shown initially (several toots are merged together, haphazardly): Screenshot 2024-01-02 at 21-33-08 Elk

How it looked after a refresh (how I'd expect it to look): Screenshot 2024-01-02 at 21-33-48 Elk

HawtinZeng commented 9 months ago

I am working on this bug, if anyone else want to solve this bug, please let me know.

HawtinZeng commented 9 months ago

Can't reproduce this bug, sorry, I won't work on it anymore.

patak-dev commented 9 months ago

@HawtinZeng when you start working on an issue it is better to do it without sending a message to avoid generating many notifications. You can start working directly, and if someone else is also on it, both can later help reviewing things up. It is rare to have much duplication, so it is better to work on things without much sync between contributors.

HawtinZeng commented 9 months ago

Ok

---Original--- From: @.> Date: Tue, Jan 9, 2024 21:39 PM To: @.>; Cc: "Hawtin @.**@.>; Subject: Re: [elk-zone/elk] Content from multiple posts getting mixed together(Issue #2216)

@HawtinZeng when you start working on an issue it is better to do it without sending a message to avoid generating many notifications. You can start working directly, and if someone else is also on it, both can later help reviewing things up. It is rare to have much duplication, so it is better to work on things without much sync between contributors.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

johnsonm commented 4 months ago

Started happening again recently on main.elk.zone — now on Firefox 127.0 on Fedora.

jeremiahlee commented 1 month ago

I can confirm this is still happening in v0.14.0. Screenshot 2024-09-13 at 10 56 55

The 2 posts merged: https://alpaca.gold/@Jeremiah/113126698660780340 and https://alpaca.gold/@Jeremiah/113126238688912496

The intermixing always seems to be around when there is a special part of the post, such as an emoji image rendering, a user mention, or a hashtag. Refreshing Elk in the browser then renders the notifications correctly.

palant commented 3 days ago

I can also see this in v0.15.1. The underlying data is correct – filtering will show the same notification correctly. This appears to be an issue with updating Vue display when new notifications are loaded, the new notification is inserted in the wrong place. The HTML structure is all wrong:

<span class="content-rich line-compact" dir="auto" lang="en">
  <p dir="auto">
    <span class="h-card">Mentions of favorited status</span>
    <span class="h-card"><p dir="auto">Favorited status contents</p></span>
    Contents of unrelated status
  </p>
  <p></p>
  <p>Further contents of unrelated status</p>
</span>

Edit: Just verified in the debugger that the data received by contentToVNode() is correct. It’s how that vnode is applied that’s causing the issue.

shuuji3 commented 3 days ago

Thanks, it's difficult to debug this issue because it's difficult to reproduce, so that kind of analysis is very helpful.

From the above snippet, there seems to be an issue with the StatusBody component or related place: https://github.com/elk-zone/elk/blob/main/components/status/StatusBody.vue

palant commented 3 days ago

Thanks, it's difficult to debug this issue because it's difficult to reproduce, so that kind of analysis is very helpful.

@shuuji3, you can reproduce this kind of messed up list update:

  1. Open https://deploy-preview-3005--elk-zone.netlify.app/notifications (I switched to Home and back to Notifications to reset notifications count but most likely it isn’t necessary).
  2. Search https://universeodon.com/@elkdev/112762809691433709 in your regular Mastodon account and favorite it.
  3. On https://deploy-preview-3005--elk-zone.netlify.app/notifications click “Show 1 new item”
  4. Search https://universeodon.com/@elkdev/112305596297137117 in your regular Mastodon account and favorite it.
  5. On https://deploy-preview-3005--elk-zone.netlify.app/notifications click “Show 1 new item”

Rather than seeing two favorited statuses you’ll see only one, with incomplete text:

A “Yellow Flag favourited your post” notification showing a single dancing blobcat. It’s followed up by a notification about a post by terribleandres

Reloading the page results in correct display:

A “Yellow Flag favourited your post” notification showing five dancing blobcats. It’s followed up by another “Yellow Flag favourited your post” notification and then by a notification about a post by terribleandres

You can undo the favorites to repeat the whole process. It’s 100% reproducible for me.