Skip to content

Conversation

@ericokuma
Copy link
Contributor

@ericokuma ericokuma commented Dec 23, 2025

This PR implements improvements for guest pending invitations as described in APP-667.

Why these changes?

  • To prevent converting a guest to a member until their invitation has been accepted, ensuring a correct user lifecycle flow.
  • To refine the UI by removing the icon from the "Remove" action in the user actions dropdown, aligning with design specifications.

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-667

Open in Cursor Open in Web


Note

Improves guest invitation handling and streamlines the actions menu.

  • Passes pendingAcceptance (derived from invitedBy) from OrgUsersTable to UserActionsCell
  • Gates "Convert to member" via canConvertToMember = isGuest && !pendingAcceptance and shows it only when eligible
  • Removes the icon from the "Remove" action in the dropdown

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

@cursor
Copy link

cursor bot commented Dec 23, 2025

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

@ericokuma ericokuma marked this pull request as ready for review December 23, 2025 00:52
@ericokuma ericokuma requested a review from lovincyrus December 23, 2025 00:52
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 25

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

organizationPermissions,
isBillingContact: row.original.userEmail === billingContact,
onAttemptRemoveBillingContactUser,
pendingAcceptance: Boolean(row.original.invitedBy),
Copy link

Choose a reason for hiding this comment

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

Pending invite check fails when invitedBy is empty

The pendingAcceptance check uses Boolean(row.original.invitedBy) which fails when invitedBy is an empty string. The backend returns an empty string for invites created without a known inviter (e.g., by a service account) since safeStr() converts database NULL to "". This causes Boolean("") to be false, incorrectly enabling the "Convert to member" action for pending invites. The filter logic elsewhere uses "invitedBy" in user (property existence check) which correctly identifies all invites regardless of the invitedBy value.

Additional Locations (1)

Fix in Cursor Fix in Web

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