Commit graph

6 commits

Author SHA1 Message Date
dakkar
7c61b57939 make sure that the DynamicNote component is *not* computed
my current hypothesis to explain #1059:

- we have a timeline, with some notes
- a new note arrives on the websocket
- we replace the items in the pagination inside the timeline
- vue starts re-rendering the notes, using the `:key` values to know
  which ones to leave there and which ones to move / add / delete
- since DynamicNote is `computed`, every time vue needs to instantiate
  it, it does an `await`
- so if another note is waiting in the websocket buffer, it gets
  processed *while vue is rendering*
- processing the new note cause the `items` map (and the array
  computed from it) to be replaced
- at this point vue may well get a new iterator from the start of the
  new list of items, after it had already decided that the first few
  notes did not need to be changed
- which manifests as new notes appearing in the middle of the
  timeline!
- and after enough new notes have arrived, all the old notes are out
  of the items map, so their elements have all been deleted, and
  "normality" is restored

this makes sense in my head, let's see if this change actually fixes
the problem
2025-05-21 18:27:39 +01:00
Hazelnoot
7c49b633a6 fix vue errors from dynamic note components 2025-04-02 21:55:08 -04:00
Hazelnoot
6ac37b4d6c lint and type fixes 2025-04-01 20:47:04 -04:00
Hazelnoot
8a43465a7b fix store in DynamicNote.vue 2025-04-01 11:38:48 -04:00
Hazelnoot
c371af34e8 copy sharkey settings into new frontend preferences model 2025-03-31 14:53:02 -04:00
Hazelnoot
9e833f724b add DynamicNote to encapsulate MkNote / SkNote switching logic 2025-03-02 13:38:05 -05:00