askvortsov You'll get a problem either at the top or bottom of the page anyways
I have a seemingly crazy idea: Show the number of the post corresponding to the place where you are in a discussion. At the beginning of the discussion, display the number of the post that is at the top of the screen, at the end of the discussion, display the number of the post that is at the bottom of the screen, and in between, display the number of the post according to its position in the discussion. For example, around post 30 of 100 (30%) the number of the post is displayed that is 30% of the height of the screen from the top of the screen.
This way we get the expected display of the first and last post and still avoid unmotivated jumps in the display of the post number.
These are the little things that no one will notice immediately in the final product, but which make the product look rounder.