-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments appear as replies to root comment if replying on another page #473
Comments
Mhh, just tested with this comment on my local machine.
so we need to find a way to reproduce this bug, else i think this is going to be really hard to fix, lol Since this happened to three stackers now, I think we can rule out user error, lol |
Maybe if two people use |
We were able to reproduce it with and without also, nemo was able to trigger the bug replying to this without |
If a comment has the wrong parent, that means the comment is upserted with the wrong parentId so this bug involves some deviation in the way we pass |
Mhhh, yes. For some reason, I wrote here that I think it's a backend thing even though I have looked at the code and did see that we don't change the incoming Not sure anymore what I was thinking |
It's very my likely frontend if it's related to |
Can you described how this bug appears in more detail. Is it:
|
yes, but for some reason the bug isn't triggered always like that. as mentioned above, nemo was also able to trigger the bug without so maybe it has nothing to do with but i think it has to do with the comment depth |
Okay, forgive for double checking, but being clear on this is important to us solving it. It appears to be sometimes recreated as follows:
|
yes. additionally, i think it's always 10 parents above. so basically, if you click "reply on another page" and then reply, the comment may show up below the top root comment. so as a reply to someone replying to a post. |
When this happens, it eventually shows up as a reply to the root (and not some other ancestor)? Second question: When this happens, what does the person submitting the reply see? Does the comment initially appear in the right spot then later they see it on the root? |
okay, sorry that I've been lazy to create a detailed description, lol I think an example will help: marked comment in screenshot is this one: https://stacker.news/items/245763 however, the comment didn't end up as a reply to the marked comment in the previous screenshot, but here: https://stacker.news/items/245771
i think it immediately shows up as a reply to the root. and i think we only reproduced that comments from the first reply on the next page show up as the root comment as described in this screenshot:
Yes, my experience is that you first see it (because of optimistic responses) but when reload, it's gone and you find it at the root comment |
I think I found it https://github.com/stackernews/stacker.news/blob/e6ffeb8f763303de9ac881507809c0fdc6cc2053/components/reply.js#L93C1-L97C32 ParentId is not listed as a dep so whatever has been cached is being used. If we want to be fancy and cache. We. Must. Always. Specify. All. Deps. (Saying this for me as much as I am for you.) |
Ohh, hehe, yes, I think that's it Nice catch! Didn't look out for missing deps We should probably also check all other callbacks deps that I changed for anon stuff now |
I don't know about the |
Yes, good point. :) I am currently working on integrating
The error at edit: Okay, no, I was wrong. I just saw something with |
I noticed the same but I thought I made a mistake. However, another stacker also noticed this now: https://stacker.news/items/245783
So maybe this is a real bug. Creating this ticket to investigate
The text was updated successfully, but these errors were encountered: