feat(admin): list and revoke pending invites from organization members - #1862
feat(admin): list and revoke pending invites from organization members#1862Shreyag02 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe change centralizes organization-role loading and adds invitation management to the organization members view. Administrators can view searchable and sortable invitations, open the invitation flow, and remove pending or expired invitations. ChangesOrganization roles and invitations
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c5ddb944-9e6a-49ab-b1dc-2266b50a17c5
📒 Files selected for processing (11)
web/sdk/admin/hooks/useOrganizationRoles.tsweb/sdk/admin/utils/connect-timestamp.tsweb/sdk/admin/views/organizations/details/index.tsxweb/sdk/admin/views/organizations/details/members/index.tsxweb/sdk/admin/views/organizations/details/members/invited-members-columns.tsxweb/sdk/admin/views/organizations/details/members/invited-members-dialog.tsxweb/sdk/admin/views/organizations/details/members/members.module.cssweb/sdk/admin/views/organizations/details/members/remove-invite-dialog.tsxweb/sdk/admin/views/users/details/layout/membership-dropdown.tsxweb/sdk/admin/views/users/details/layout/side-panel-invitation.tsxweb/sdk/admin/views/users/details/layout/side-panel.tsx
Coverage Report for CI Build 31490525595Coverage remained the same at 48.097%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Add a pending-invites section to the organization details members view, with a dialog to browse invites and revoke them. - invited-members table lists invites with role titles and expiry - remove-invite dialog handles revocation - useOrganizationRoles gains an optional `enabled` flag so callers can defer both role fetches until an org id is known
25b6157 to
c83c37e
Compare
- expiry no longer renders in danger red; matches the Status column - Menu.Content gets align="end", as the SDK members list does
Summary
Adds a way to view and manage an organization's pending invites from the Members page. An "N Invites" button sits next to Display in the members toolbar and opens a modal listing every invitation sent for that org, where an invite can be revoked.
Changes
useOrganizationRoles(added in feat(admin): list pending invites in user details side panel #1847) takes anenabledoption and is reused by organization detailsTechnical Details
DataTable.Filters+DataTable.DisplayControls, sinceDataTable.Toolbaraccepts no children and the design puts the trigger left of Display.mode="client":ListOrganizationInvitationstakes no query params and returns every row, so there is no server-side search or pagination to hook into. Search is scoped to email; the action column is opted out so invite uuids aren't matched.expires_atat render, as the API returns lapsed invites too. The trigger reads "N Invites", not "N Pending", because the count covers every row and Status distinguishes them. Expiry uses the default foreground — Status already signals expired.DeleteOrganizationInvitationand invalidates the list query, refreshing both the table and the count. Confirmation wording differs for live vs expired invites.Test Plan
tsc --noEmitandeslintclean on the touched files, apart from 3 pre-existing unused-arg warningspnpm buildsucceeds inweb/sdkSQL Safety (if your PR touches
*_repository.goorgoqu.*)Not applicable — frontend only, no Go or query changes.