Can't scroll back past a limited number of posts #70
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For whatever reason, I can't scroll back more than 10 posts back in my timeline.
Seems like I can scroll back a bit further now but I still can't scroll back past a certain post.
Can't seem to replicate this behaviour on a local test instace for some reason either. No errors in the dev console or in
journalctl
either.Can't scroll back past first pageto Can't scroll back past a limited number of postsOthers also reported having problems with this, see https://mk.absturztau.be/notes/93wpdkd7tq
I have no idea what the problem could be but since there is no more loading animation I would guess it is a client issue. Can you see in the network tab if it tries to load more notes by any chance?
Doesn't look like it tries to load anything else when I hit that point.
The loading animation missing probably means that the client thinks there are no further notes. The way the client checks if there are no notes is by initially requesting one more than the actual limit and then checking the number of notes in the response.
I have a hunch this may be related to the changes made to
Notes.packMany
for visibility checks: If there is a note that shouldn't be visible to you it will silently be dropped form the list of notes.In that case the solution would be to either refactor the API pagination to directly include information on whether more content is available or "replenish" the returned list of notes if some are dropped due to visibility checks.
The second case might be better compatibility wise for downstream API users though the first one does seem to be a more elegant solution.
Mmh there are quite a few places where this could be a problem...
Ideally we should probably figure out a way to determine note visibility entirely in the database (current reference point
generateVisibilityQuery
) so we don't have to do these shenanigans. The problem with that is: we would have to determine note visibility recursively to ensure there won't be any notes whose visibility will cause problems when packing them.Alternatively, we would have to migrate existing note visibilities and modify incoming federated notes to ensure that the visibility level can never make a step "up", like we are now already enforcing for creating local notes since commit
40d9aa6219
. Then we could probably determine visibility from looking at one note alone? I guess there would still be some weirdness withspecified
visibility because that has another level of specifying individual people, so this approach might not even be viable with more consideration.I also have this issue. Is there any debug info I can fetch to help?
Thanks, but I'm already pretty sure what the problem is. I'm just not sure what the best solution is and also don't have time to implement it right now.
can you elaborate, please?
I'm pretty sure it is the thing I already explained about
Notes.packMany
.PR #102 has been merged. However according to some reports this does not entirely fix the issue. If you as an admin notice (or are told) that scrolling further does not work on the timeline, please check the log for a message with status
ERR
and containingviolating visibility restrictions
.I have tried it on a local backup of my instance and indeed after scrolling down for a while it stopped and a
dropping note due to violating visibility restrictions, note [id] user [my_id]
error appeared 2 times in the logs, 2 different notes. When I tried to see the post by its link I also got this erroruser [my_id] tried to view note [id] violating visibility restrictions
.Is there anything I can do to help troubleshoot?
So the problem @vib helped me figure out is that I was actually not using my own function correctly. Trying to fix it in
32f4bee5e8
makes everything break though, with the error messageThe mentioned
alias "note"
is presumably referring to this:.from(() => q, 'note');