Skip to content
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

Comment count not updating after rejecting #4749

Closed
czepan opened this issue Feb 24, 2025 · 5 comments
Closed

Comment count not updating after rejecting #4749

czepan opened this issue Feb 24, 2025 · 5 comments
Labels

Comments

@czepan
Copy link

czepan commented Feb 24, 2025

Expected behavior:
The comment count should only include comments that are visible to the user. Otherwise, it appears incorrect.

Actual behavior:
The comment count includes rejected (and possibly pending?) comments as well:
Image

This is also reflected in the count.js API:
Image

Additional Info:
I tried running FLUSHDB in Redis, but it didn’t change anything.

Related Issues:
This was mentioned in #2292, but that seems to refer to a very old version. I couldn't find anything related to talk-cache-expiry-comment-count in the current documentation.

Versions:
Coral Talk 9.5.3

@czepan czepan added the bug label Feb 24, 2025
@czepan
Copy link
Author

czepan commented Feb 24, 2025

Ohhh, I think I’ve found the reason.
We're using the tree structure, and in this case, there are actually 10 comments marked as APPROVED. However, all of these comments have a REJECTED root node, which means that visually, no comments appear, even though the count still shows 10.

As a general rule, it would probably make sense to only count comments if they are actually visible to the user—i.e., none of their parent nodes are REJECTED.

@losowsky
Copy link
Member

hi there,

This is a known bug – it's in our backlog, it's just not high priority currently. It's complicated by the fact that the replies are still accessible via their direct URLs, so a number of zero would also be confusing to anyone who goes to one of those urls

@czepan
Copy link
Author

czepan commented Feb 25, 2025

hi there,

This is a known bug – it's in our backlog, it's just not high priority currently. It's complicated by the fact that the replies are still accessible via their direct URLs, so a number of zero would also be confusing to anyone who goes to one of those urls

Hey! Thanks for your response.

I already suspected that was the reason – at least I used the exact same rationale when the issue arose in our comment moderation. Therefore, I can understand that the problem is not easily resolved. One simple approach might be to completely hide the comment count in cases where a user with a direct link jumps into a conversation. The only alternative would be that if a root node is REJECTED, the entire subtree becomes inaccessible; however, that’s a significant change to the functionality and might not be liked by many - me included. The status quo, where for example 10 comments are displayed but the user can’t actually find them, is oviously confusing too and initially appears to the user as a bug.

Maybe you find another solution – I'm looking forward to it. Thanks!

@losowsky
Copy link
Member

losowsky commented Mar 4, 2025

This should be merged soon! #4757

@losowsky losowsky closed this as completed Mar 4, 2025
@czepan
Copy link
Author

czepan commented Mar 5, 2025

Oh wow - didn't expect that so fast :) Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants