Oof. That would have been a bug for a long time.
Will look into fixing.
Edit: ok you guys, be my ChatGPT. Say you have page 2 loaded and you hide a story. What story should replace it at the bottom? Keep in mind that the story rankings may have shifted around quite a bit since you loaded the page you're looking at.
I remember puzzling over this when we first implemented /hide and that was many years ago. (Edit: July 2016 in fact)
Edit: the original bug is fixed at least. Let's not let the better be the enemy of the proper.
>What story should replace it at the bottom?
Seems like a good place to give attention to something that was missed or might get missed? Something random from the second chance pool or what ever would have been there an hour or two ago? A random but highly active thread from days gone by would be fun but could result in lots of "HN used to be better" remember whenning (larping), or it might remind people that things have not changed so much, or at least not as much as they have. I would not mind being confronted with my past self on occasion.
My recommendation is whatever is currently the top of the subsequent page at the time of click. So if you’re on page 2, whatever is rank 61 at the time of click regardless of if 61 changed after the user loaded 31-60.
Honestly just hide it and be done. Unless you're going to keep a stateful cursor or something, there's no real consistent "next" item when next is a function of time. (Then there's other complexity, right? like showdead, /news using `p` vs. /newest using `n`, etc.) All the offsets stay the same.
There's no expectation that page 2 now is page 2 when I refresh. Just don't auto-refresh because I probably want to visit other links from the current page load.
> Say you have page 2 loaded and you hide a story. What story should replace it at the bottom?
Do the 90's software development trick and put an Easter Egg instead.
In the dynamic JS instance, I’d rather the page just removed the entry and reduced the displayed items to 29 without brokenly repopulating entries, and dimmed the ‘next’ link with a ‘reload’ link shown ahead of it. It’s vastly easier on the server (14 less article fragment for 15 hides on one page of /new!) and that way you don’t have to fight against pagination.
In the non-dynamic no-JS instance, the homepage has no timestamp context like /new URL pagination does, so I assume I’m getting a reload every time I click any button. I used HN without JS for 6 months as a test and it was honestly better than the site trying to load articles to replace ones I hide.