Skip to content

Conversation

@ericokuma
Copy link
Contributor

Fixes APP-524. The project share popover incorrectly displayed a maximum of 20 users.

This PR updates GeneralAccessSelectorDropdown.svelte to correctly display the total user count by:

  • Switching from createAdminServiceListUsergroupMemberUsers to createAdminServiceListOrganizationMemberUsers to leverage its totalCount field.
  • Fetching ListOrganizationMemberUsers with pageSize: 1 to efficiently retrieve only the total count.
  • Correcting the query enablement condition to accessDropdownOpen to ensure the API call triggers when the dropdown is visible.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Linear Issue: APP-524

Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Jan 13, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

…re popover

The project share popover was displaying a maximum of 20 users because it was
counting members.length from a paginated API response with default pageSize of 20.

Changed to use ListOrganizationMemberUsergroups with includeCounts: true to get
the usersCount from the autogroup:members group, which:
- Returns the accurate total count (not limited by pagination)
- Specifically excludes guest users (autogroup:members = non-guests only)

Also fixed a bug where queries were using enabled: open but the dropdown was
bound to accessDropdownOpen, causing queries to never execute.

Resolves APP-524
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.

3 participants