toddsundsted / ktistec

Single user ActivityPub (https://www.w3.org/TR/activitypub/) server.
GNU Affero General Public License v3.0
359 stars 20 forks source link

Posts of a Thread are not fetched automatically #108

Open JayVii opened 1 month ago

JayVii commented 1 month ago

I vaguely remember that child-posts / replies inside a thread should be fetched by ktistec, when you open the thread view (clicking on the "thread" action button). Maybe my memory is playing tricks on me... Either way, this does not seem to happen automatically.

You can work around that problem by clicking the "Follow" button in the thread contributors box and reloading the page after a few seconds (and unfollow the thread again). But that is a little inconvenient.

Would it be easy to implement that ktistec fetches all new child-posts and replies of a post whenever you open the thread view? Or instead, put a "Load Replies" Button next to the "Follow" button on top of the view?

toddsundsted commented 1 month ago

@JayVii originally only missing parent posts were fetched, and that wasn't automatic (you had to click on a "fetch parent" link). now, the "Follow" button fetches missing parents and as many child posts as it can find. but you are correct—it continues to "follow" the thread and look for more posts periodically, which often isn't what you (or i) want.

the code that i'm pushing soon (tomorrow is likely) streams status updates to the page, so that after you click "Follow" you at least know when it completes fetching everything without having to reload the page.

on principle, i'm not opposed to fetching the thread when you open a post or even for every post ktistec receives that makes it to your timeline, but that adds a lot of fetching even when you're just clicking around so i haven't implemented it. i'd kind of like every thread to just "be there" when i navigate to it, but that comes with a cost (in storage at least).

i have considered a "Fetch Once" that just runs the fetch task once and then quits, but right now i do what you do, which is click "Follow" and then, after it loads enough, "Unfollow".

toddsundsted commented 1 month ago

i'm open to your thoughts (or anyone's, really) on how threads should be consumed. i don't feel like i've got the best user-experience yet.

JayVii commented 1 month ago

The changes from 2.2.0 actually made it a lot nicer, because after following the thread you get almost instant feedback via the new refresh-banner.

So currently the flow would be: follow the thread, wait for banner to pop up, unfollow the thread, click "refresh".

For me personally, that is almost optimal. The only gripes I still have with this is, that :

  1. it will produce a notification, which is really not needed if I just want to see all replies and parent posts within a thread
  2. I have to click 3 times for this (follow, unfollow, refresh)

So, if it would be possible to add another button in the thread header, next to the "follow" button, that just fetches the posts without creating a notification (and optionally also refreshes the page once it is done) would be really convenient. IMO it is not necessary to fetch them automatically. With a button I can still read the post and if I need to see context, I can gather it with a single (or a few) clicks.

Then again, I am not sure if that's how other people use ktistec...

JayVii commented 3 weeks ago

Another note I have on this: the thread/conversation view could be made available for all posts.

Currently, it seems like it is only available for posts that are replies to other posts or for those posts that have replies that are known to my ktistec (for example because I follow both the original author and the replier).

The current behaviour makes it impossible to follow a post which does not yet have replies or whose replies are unknown to my instance.

toddsundsted commented 2 days ago

The current behaviour makes it impossible to follow a post which does not yet have replies or whose replies are unknown to my instance.

@JayVii i'm taking a look at what it would take to fix this. as a workaround, you can edit the URL for the post and append /thread and that will load the thread view (with only the post in the thread). from there you can follow it.

toddsundsted commented 21 hours ago

@JayVii right now we only show the "thread" link when a post has replies or is a reply. when a new post arrives, we could quickly check to see if there are any replies, but, since it's a new post, it probably won't have any right at that moment. the only option i can think of that doesn't require polling for replies would be to always show the "thread" link. perhaps this is what you are proposing? the thread page would be empty (except for the post) but maybe that's okay?