Athou / commafeed

Google Reader inspired self-hosted personal RSS reader.
https://www.commafeed.com
Apache License 2.0
2.81k stars 377 forks source link

Pressing "open next entry" shortcut (J) doesn't load the next set of entries when it gets to the bottom #1557

Closed parnic closed 2 months ago

parnic commented 2 months ago

Describe the bug When you have too many entries to be loaded at the same time and are navigating through them with the J shortcut, the next set of entries does not load once you reach the bottom and press J again. You must scroll down to force the next set to load (or use R to refresh) and then you can continue scrolling.

It looks like a bug when it happens because the sidebar shows more entries remaining despite the "next" button not going to the next entry.

To Reproduce Steps to reproduce the behavior:

  1. Have a lot of unread entries (I'm not sure what the pagination limit is, but I've seen it with 100)
  2. Enable Expanded display mode
  3. Proceed through each entry using the J key until you reach the end of the currently-loaded set
  4. Press J again, note that the next entry does not load/focus.
  5. Scroll down to load the next set of entries, note that J works now.

Expected behavior Once I've advanced near the bottom of the list of loaded entries, the next set should load automatically so they're ready when I press J again. Alternatively, pressing J will trigger the load instead of having to scroll down (and ideally would focus/scroll to the next entry or loading indicator so I can tell it did something).

Screenshots

Environment (please complete the following information):

Additional context

Athou commented 2 months ago

Oh indeed, it seems to happens if the last entry is large enough to exceed the viewport height. In that case, the bottom of the page is not yet reached so more entries are not loaded and pressing "j" does nothing.

I'll see what I can do, thanks!

parnic commented 2 months ago

Ah, yes, the height of the entry is important. Sorry for failing to mention that in the report.

Thank you for looking into it!

Athou commented 2 months ago

I added a fix for this, do you mind testing it with one of the binaries from this CI build or the master-<database> docker tag?

parnic commented 2 months ago

Verified with the master-postgresql docker tag, v 5.1.1 (191574d).

Thanks!

Athou commented 2 months ago

Thank you, I'll release a new version with the fix tonight!

Athou commented 2 months ago

Done! https://github.com/Athou/commafeed/releases/tag/5.2.0

parnic commented 1 month ago

It looks like the same thing is happening with the down arrow at the top of the screen, btw. I'm noticing it on mobile.

Athou commented 1 month ago

You're right. I moved the logic to a more central place, so it should apply to all actions that select the next entry. Thanks!

5.3.0 is being released right now, it includes the fix.