Describe the Feature
Currently, post replyCount includes ALL replies regardless of whether the viewer has blocked the reply author or the post author has blocked the reply author. This means blocked accounts can inflate perceived engagement (creating at best - a higher level of content counts and at worse, confusion for folks when viewing content). I'd like to see if counts can be adjusted to reflect only replies the viewer (and post author) actually see - making blocking a bit more complete.
Proposed Solution
I'm thinking that one can use Constellation to:
- Fetch distinct reply author DIDs for a post via
GET /links/getBacklinks?subject=<postUri>&source=app.bsky.feed.post:reply.root.uri
- Check viewer blocks via existing
isDidBlocked(queryClient, did) (already cached)
- Check post author blocks via Constellation:
GET /links/getBacklinks?subject=<authorDid>&source=app.bsky.graph.block:subject and check if any blocked DIDs match reply authors
- Update the shadow reference via existing
updatePostShadow(postUri, { optimisticReplyCount: correctedCount }) mechanism
Behavior
This should all happen async:
Thread opens -> shows server replyCount immediately
-> Constellation calls fire in background
-> blocked count computed when data arrives
-> shadow updated -> post re-renders with corrected count
No loading state shown to user - count simply "corrects itself" shortly after load (torn on this; perhaps a little spinner somewhere in the post).
Fallback
If Constellation returns no data (incomplete backfill, network timing out), we should opt to fall back to enumerating thread via getPostThread and checking blocks directly (we could get around this - a lot of it, if this is computed on the PDS or in https://github.com/blacksky-algorithms/atproto.
Technical Notes
- Uses existing
mergeShadow() (optimisticReplyCount)
- Constellation is public instance at
constellation.microcosm.blue
- Block lists are session-cached; first view may show uncorrected counts until cache warms (hence the need for a spinner somewhere to indicate some extra data fetching)
- Block filtering is (viewer+poster)-specific; does not affect other users' counts (this does lead, eventually, to an experience where counts aren't consistent; my biggest concern if these numbers are important)
Attachments
No response
Describe Alternatives
No response
Additional Context
Reference
The author (did:plc:p5yoyqfwr7hmazdjde632lvd) has 188 blocked accounts. When viewing their post (3mmpwv7k3sc2y), if one of those blocked accounts replied, the reply should be excluded from the displayed replyCount for both the viewer and the post author; that's currently not the case.
Describe the Feature
Currently, post
replyCountincludes ALL replies regardless of whether the viewer has blocked the reply author or the post author has blocked the reply author. This means blocked accounts can inflate perceived engagement (creating at best - a higher level of content counts and at worse, confusion for folks when viewing content). I'd like to see if counts can be adjusted to reflect only replies the viewer (and post author) actually see - making blocking a bit more complete.Proposed Solution
I'm thinking that one can use Constellation to:
GET /links/getBacklinks?subject=<postUri>&source=app.bsky.feed.post:reply.root.uriisDidBlocked(queryClient, did)(already cached)GET /links/getBacklinks?subject=<authorDid>&source=app.bsky.graph.block:subjectand check if any blocked DIDs match reply authorsupdatePostShadow(postUri, { optimisticReplyCount: correctedCount })mechanismBehavior
This should all happen async:
Thread opens -> shows server replyCount immediately
-> Constellation calls fire in background
-> blocked count computed when data arrives
-> shadow updated -> post re-renders with corrected count
No loading state shown to user - count simply "corrects itself" shortly after load (torn on this; perhaps a little spinner somewhere in the post).
Fallback
If Constellation returns no data (incomplete backfill, network timing out), we should opt to fall back to enumerating thread via
getPostThreadand checking blocks directly (we could get around this - a lot of it, if this is computed on the PDS or in https://github.com/blacksky-algorithms/atproto.Technical Notes
mergeShadow()(optimisticReplyCount)constellation.microcosm.blueAttachments
No response
Describe Alternatives
No response
Additional Context
Reference
The author (
did:plc:p5yoyqfwr7hmazdjde632lvd) has 188 blocked accounts. When viewing their post (3mmpwv7k3sc2y), if one of those blocked accounts replied, the reply should be excluded from the displayedreplyCountfor both the viewer and the post author; that's currently not the case.