cheeaun / phanpy

A minimalistic opinionated Mastodon web client
https://phanpy.social
MIT License
1.05k stars 101 forks source link

Phanpy doesn't load all posts by the owner of a thread #107

Open nhan000 opened 1 year ago

nhan000 commented 1 year ago

Describe the bug

Open the 1st post of a 10-post thread shows only 2 posts and then other people's replies. Happen with both the dev and regular phanpy sites.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://phanpy.social/
  2. Search for this post https://journa.host/@timkmak/110186589126000966
  3. Open the post and see it displays correctly the full 10 posts before other people's comments.
  4. Do either of the following things to see the bug: a) Refresh the page. b) Switch to post's instance.

Now you'll only see 2 posts and have to click the 2nd, and then click the 3rd post to show the full thread.

Expected behavior See all 10 posts of a thread when click the 1st post in thread.

Screenshots What I expected:

Bug:

Desktop (please complete the following information): Windows 11, Edge browser, all updated.

Additional context

cheeaun commented 1 year ago

Ok I did a little research. Turns out Mastodon has a limit on the context API https://github.com/mastodon/mastodon/blob/4db8230194258a9a1c3d17d7261608515f3f2067/app/controllers/api/v1/statuses_controller.rb#L15-L24

In short:

This means when you switch to the post's instance and not logged in to that instance, you're seeing a "limited" view of the whole post thread/conversation.

nhan000 commented 1 year ago

Thanks a lot for the investigation! I'm sorry I still don't really understand your explanation although I have read it multiple times 😂 (and you don't have to re-explain it to me. I understand that it's a limitation of Mastodon itself).

Anyway, there's one point in my reply I want to address again. That after surfacing the post from the search the "bug" (or the context API limit) will appear when you refresh the page (Ctrl + R or F5).

I don't know if you have done anything during the past few hours but that so-called bug triggered by refreshing has disappeared in the dev version but is still there in the regular site in mastodon.social but not in pkm.social:

How it looks in pkm.social (same thing for pkm.social and mastodon.social on dev site, just don't want to paste 3 similar images to avoid cluttering the reply)

However, the context limit appears in the mastodon.social