Skip to content

don't outline and track muted comments#2846

Open
Soxasora wants to merge 1 commit into
masterfrom
respect_mutes_comments
Open

don't outline and track muted comments#2846
Soxasora wants to merge 1 commit into
masterfrom
respect_mutes_comments

Conversation

@Soxasora
Copy link
Copy Markdown
Member

@Soxasora Soxasora commented Mar 8, 2026

Description

#2842
Checks if the author of the new comment is not muted before outlining it (and tracking it via navigator).

Screenshots

Screen.Recording.2026-03-08.at.14.39.07.mov

Additional Context

Maybe muted comments should appear at the bottom rather than the top!

Checklist

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
10


Note

Low Risk
Small UI/UX logic change gated by a mute flag; minimal blast radius and no security or data-handling impact.

Overview
Prevents muted users’ comments from being treated as “new” on item pages.

Comment now bails out of the outlining/navigator.trackNewComment effect when item.user.meMute is set, so muted comments won’t be highlighted or counted in the new-comment navigator flow.

Written by Cursor Bugbot for commit 3d0098a. This will update automatically on new commits. Configure here.

@huumn
Copy link
Copy Markdown
Member

huumn commented Mar 8, 2026

did you investigate how hard it would be to do something similar for this indicator?

Screenshot 2026-03-08 at 11 12 53 AM

i'd guess it's hard, because the indicator here is driven by lastCommentAt which is global, and personalizing lastCommentAt is expensive.

without that, i think this PR's behavior is more confusing: i can see a top level indicator, but don't get live comment nav if it's from someone i muted.

to fix this all-the-way, we'll probably want live comments to work over a list of top-level items; over the homepage, for instance, we'd do a live comment query on all the posts. we'd have to nail down the performance and create a liveCommentsForNItems resolver, but i suspect that's the best thing we can do if we want to solve this bad boy.

@Soxasora
Copy link
Copy Markdown
Member Author

Soxasora commented Mar 9, 2026

Currently that indicator is very, very light. It only reads lastCommentAt and does its calculations.

Batch-checking live comments on 21 items (homepage) can be expensive and as you said, we'd have to nail down the performance. I wonder if we can come up with a slim query that just gets ncomments minus the muted comments.

We'd probably need to rethink how we manage new comments in general.

@sir-opti
Copy link
Copy Markdown
Contributor

I've tested the in-item functionality and this worked as I expected.

One minor question: when you say "tracking with the navigator", you mean that the blue dot at the top bar (when in item view) only tracks non-muted replies too? Is that a correct understanding? Because that's what I noticed - if yes, then I'll test that a bit deeper.

@Soxasora
Copy link
Copy Markdown
Member Author

Yes exactly, the new comments navigator tracks new outlined comments. By not outlining the new muted comments, we're also not tracking them.

@sir-opti
Copy link
Copy Markdown
Contributor

Tested that part with mutes, without mutes and all that looks fine.

I did notice that when a new comment is hidden behind pagination (note: unlikely with current parametrization FULL_COMMENTS_THRESHOLD = 1000), then I haven't been able to get it highlighted after pressing more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants