Failing posts still show up as a reply until refresh

AI-generated summary

A bug is reported where failed posts are temporarily displayed as replies until the page is refreshed. fefrei explains that this occurs when a post is added to the stream before server confirmation, and if posting fails, the post is removed but some side effects remain. sam notes that this is a subtle bug and that rate limits should not be hit with the narrative bot. codinghorror provides a reproducible example of the bug and confirms it’s a client-side issue that resolves with a refresh. The bug has been fixed, as reported by tgxworld, with a link to the commit on GitHub: https://github.com/discourse/discourse/commit/531d649a75cac27977ca68f409d7f7ee027d5394.

When a post is sent, it is already added to the stream before the server confirms it. If posting fails, for example by hitting a rate limit, it is removed again – but some side effects stay. For example, in the screenshot below, the “3 Replies” is incorrect; since only two posts follow and only one of them (my post) is an actual reply. The two missing “ghost posts” are failed tries to send my post. Reloading fixes this – only the local state is corrupted.

3 إعجابات

Yes, sounds like a subtle bug when unstaging a post.

Note, the rate limits really should never be hit with the narrative bot, so that is the first thing that needs fixing.

إعجابَين (2)

I have an easy repro for this

  1. reply to any post
  2. type said reply using cruise control for awesome, ALL CAPS
  3. try to post, notice reply is blocked due to all caps
  4. edit to add non-caps
  5. post again, notice the post you replied to has “2 replies”

Yes this is only a client side artifact for that user, will go away on refresh and won’t be seen by other users at all.

إعجابَين (2)

Fixed in

https://github.com/discourse/discourse/commit/531d649a75cac27977ca68f409d7f7ee027d5394

إعجابَين (2)

This topic was automatically closed after 24 hours. New replies are no longer allowed.