Skip to content

Conversation

@dharit-tan
Copy link
Contributor

@dharit-tan dharit-tan commented Aug 30, 2024

Description

Bug was: if user follows many other users who are deactivated, there's a possibility that the first page of followees would be almost entirely deactivated, which get filtered out on client. This wouldn't be an issue except it also breaks pagination on the client because there's no way to know when the end of the list is reached.

Note that this could be a problem with other modals that use UserList. Maybe need a bigger discussion around how to handle deactivated users, perhaps those follow counts should be omitted from aggregate_user as well, and all queries should filter them out by default.

But this PR fixes the immediate problem.

How Has This Been Tested?

Local stack - created many users who logged-in user follows, checked which ones were getting returned in the first page and set some of those to deactivated, confirmed modal works with pagination.

Screen.Recording.2024-08-30.at.4.11.56.PM.mov

@changeset-bot
Copy link

changeset-bot bot commented Aug 30, 2024

⚠️ No Changeset found

Latest commit: 526fedb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

follows
left outer join aggregate_user on followee_user_id = user_id
join users on users.user_id = follows.followee_user_id
left outer join aggregate_user on followee_user_id = aggregate_user.user_id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for future reader's sake, i don't believe this left outer is necessary. aggregate user should always exist. but it's probably fine 🤷

@dharit-tan dharit-tan merged commit 5c520c1 into main Aug 30, 2024
@dharit-tan dharit-tan deleted the rt-follow branch August 30, 2024 20:33
audius-infra pushed a commit that referenced this pull request Sep 2, 2024
[b87f574] Fix Splits Migration: Stage has users w/o indexed user banks (#9604) Marcus Pasell
[847c075] [PAY-3319][PAY-3399] Update Discovery to support new purchase transaction details (#9586) Marcus Pasell
[74ab87e] [PAY-3388] Add user feed V1 endpoint (#9583) Randy Schott
[5c520c1] [QA-1533] Filter out deactivated users from UserList queries (#9596) Reed
[c52e0cb] Filter genre metrics endpoint by allowlist (#9591) Randy Schott
[0b92de2] Revert "Enabling blocking users from commenting (#9469)" (#9552) Isaac Solo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants