Skip to content

feat(core, react): implement multi select invitation delete - #434

Merged
chakrihacker merged 10 commits into
feat/my-org-ea-branchfrom
feat/invitation-multi-select
Jul 30, 2026
Merged

feat(core, react): implement multi select invitation delete#434
chakrihacker merged 10 commits into
feat/my-org-ea-branchfrom
feat/invitation-multi-select

Conversation

@chakrihacker

@chakrihacker chakrihacker commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds multi-select bulk deletion of pending invitations to the organization member management view — users can now select several pending invitations and delete them in a single confirmation step.

Why

The invitations table only supported revoking one invitation at a time. Cleaning up multiple stale or pending invitations meant repeating the revoke-and-confirm flow once per row, which is tedious for organizations with many outstanding invites. This PR adds a batch delete path and, in doing so, moves single revoke onto the same batch delete endpoint so both flows share one code path.

What

  • New deleteInvitationsMutation in the member management service that deletes a batch of invitations via the SDK's organization.invitations.deleteMemberInvitations({ invitations }) endpoint.
  • New deleteInvitationsAction (ComponentAction<MemberInvitation[]>) exposed on UseOrganizationMemberManagementOptions, with onBefore/onAfter hooks — onBefore returning false cancels the deletion; onAfter fires on success.
  • New OrganizationInvitationDeleteModal component and a { type: 'deleteInvitations'; invitations } variant added to MemberManagementModalState, wired into the member management view.
  • OrganizationInvitationTable gains row selection for triggering bulk delete.
  • Single-invitation revoke (revokeInvitationMutation) now also uses deleteMemberInvitations instead of the removed invitations.delete(id) call, unifying the two paths.
  • English (en-US) and Japanese (ja) translations added for the new confirm modal (singular/plural titles, buttons) and the bulk-delete error message.

Packages

  • packages/core
  • packages/react
  • examples

References

Screenshot 2026-07-28 at 9 55 30 PM

Testing

How can this be verified? Note anything intentionally not covered by tests and why.

  1. Start an example app and navigate to Organization → Members → Invitations tab.
  2. Confirm each pending invitation row is selectable.
  3. Select two or more invitations and trigger delete — the confirmation modal should show the plural title (Delete N pending invitations?) and a plural confirm button.
  4. Select a single invitation — the modal should show the singular title and button.
  5. Confirm the deletion; the selected invitations should be removed and the invitations list should refresh without a full page reload.
  6. Confirm single-row revoke still works (it now routes through the batch delete endpoint).
  • This change adds unit test coverage
  • Tested for both SPA and RWA flows, all example apps working
  • All existing and new tests complete without errors

Checklist

  • Breaking change
  • Requires docs update
  • Backward compatible

Contributing

Summary by CodeRabbit

  • New Features
    • Added bulk revocation for selected organization invitations, including a confirmation modal with singular/plural messaging.
    • Added invitation row selection and a destructive bulk-action toolbar.
    • Added loading states for invitations and kept the invitation table visible during background refreshes.
  • Improvements
    • Updated “Select row” labels to include the row index.
    • Refined success/error messaging for single vs bulk revocation.
  • Tests
    • Expanded coverage for selection, loading, modal confirmation, and revoke flows (single and bulk).

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 96958e5f-9355-4bd2-bc34-ce4962c470e6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Organization member management now supports selecting invitations and revoking them individually or in bulk through a confirmation modal and bulk API mutation. Related types, translations, loading behavior, row labels, mocks, and tests were updated.

Changes

Bulk invitation revocation

Layer / File(s) Summary
Revocation contracts and messages
packages/core/src/i18n/..., packages/react/src/types/...
Bulk-revoke message keys, modal state, callbacks, loading state, and public prop contracts replace the prior bulk-deletion surface.
Bulk revocation service
packages/react/src/hooks/my-organization/shared/services/..., packages/react/src/hooks/my-organization/__tests__/..., packages/react/src/tests/utils/...
Revocation accepts invitation arrays, filters IDs, calls deleteMemberInvitations, handles callbacks and singular/plural feedback, and updates resend behavior and mocks.
Selection and modal orchestration
packages/react/src/hooks/my-organization/..., packages/react/src/components/auth0/my-organization/...
Selection state, bulk-revoke modal state, loading props, read-only guards, and confirmation handlers are wired through organization member management.
Selection UI and validation
packages/react/src/components/auth0/my-organization/shared/member-management/...
The invitation table renders selectable rows and a bulk-revoke toolbar; the confirmation modal handles loading and singular/plural content; related tests are updated and added.
Supporting package and test updates
auth0-myorganization-js-1.1.0.tgz, packages/core/package.json, packages/react/src/components/auth0/my-organization/__tests__/domain-table.test.tsx
The core package uses the local client archive, and an obsolete domain-table provider test and unused mocks are removed.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant OrganizationInvitationTable
  participant OrganizationMemberManagement
  participant useOrganizationMemberManagement
  participant useMemberManagementService
  participant organization.invitations
  OrganizationInvitationTable->>OrganizationMemberManagement: click bulk revoke
  OrganizationMemberManagement->>useOrganizationMemberManagement: open bulkRevoke modal
  useOrganizationMemberManagement->>OrganizationMemberManagement: render selected invitations
  OrganizationMemberManagement->>useOrganizationMemberManagement: confirm revocation
  useOrganizationMemberManagement->>useMemberManagementService: revoke invitation array
  useMemberManagementService->>organization.invitations: deleteMemberInvitations({ invitations: ids })
  organization.invitations-->>useMemberManagementService: return revocation result
Loading

Possibly related PRs

Suggested labels: enhancement, bug

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding multi-select bulk invitation deletion/revocation across core and react.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feat/invitation-multi-select
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/invitation-multi-select

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chakrihacker
chakrihacker marked this pull request as ready for review July 28, 2026 16:25

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (3)
packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx (2)

30-30: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Name test suites as conditions.

  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx#L30-L30: rename the suite to begin with when....
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/__tests__/organization-invitation-table.test.tsx#L37-L38: rename both suites to begin with when....

As per coding guidelines, describe conditions with when... and actions in it names.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx`
at line 30, Rename the OrganizationInvitationDeleteModal test suite in
packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx:30
to begin with “when”. Also rename both test suites in
packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/__tests__/organization-invitation-table.test.tsx:37-38
to begin with “when”, keeping actions expressed in their existing it names.

Source: Coding guidelines


5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use the React package alias for these component imports.

  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx#L5-L5: replace the ../ import with the equivalent @/components/... import and merge it into the internal-import group.
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/__tests__/organization-invitation-table.test.tsx#L5-L5: replace the ../ import with the equivalent @/components/... import and merge it into the internal-import group.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx`
at line 5, Update the OrganizationInvitationDeleteModal import in
packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx:5-5
to use the equivalent `@/components/`... alias and place it in the internal-import
group. Apply the same alias conversion and grouping to the
organization-invitation-table.test.tsx import at
packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/__tests__/organization-invitation-table.test.tsx:5-5.

Source: Coding guidelines

packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/organization-invitation-table.tsx (1)

202-212: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Replace the selectable type assertion.

DataTableProps.selectable is declared as boolean, and a typed spread passes it as such, so selectable: true satisfies the type without an assertion.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/organization-invitation-table.tsx`
around lines 202 - 212, Remove the unnecessary `as const` assertion from the
`selectable` property in the selectionEnabled spread within the organization
invitation table. Keep the value as the boolean literal true so it satisfies
DataTableProps.selectable without a type assertion.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@packages/react/src/components/auth0/my-organization/organization-member-management.tsx`:
- Around line 308-318: Add a distinct OrganizationInvitationTab-deleteModal key
to OrganizationInvitationTabClasses and update the
OrganizationInvitationDeleteModal className to use it instead of
OrganizationInvitationTab-revokeModal, leaving the revoke modal styling key
unchanged.

In
`@packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/organization-invitation-table.tsx`:
- Around line 171-191: Update the selected-invitations toolbar condition in the
invitation table to require onDeleteSelected in addition to selectionEnabled and
selectedCount > 0, so the destructive action is rendered only when its callback
is available.

In
`@packages/react/src/hooks/my-organization/use-organization-member-management.ts`:
- Line 83: Reset selectedInvitations whenever the displayed invitation set
changes, including tab changes and pagination, filter, or sort updates that
replace currentInvitations. Update the relevant effects or handlers around
invitationsQuery/currentInvitations so setSelectedInvitations clears stale
entries before OrganizationInvitationTable uses them.

---

Nitpick comments:
In
`@packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx`:
- Line 30: Rename the OrganizationInvitationDeleteModal test suite in
packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx:30
to begin with “when”. Also rename both test suites in
packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/__tests__/organization-invitation-table.test.tsx:37-38
to begin with “when”, keeping actions expressed in their existing it names.
- Line 5: Update the OrganizationInvitationDeleteModal import in
packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx:5-5
to use the equivalent `@/components/`... alias and place it in the internal-import
group. Apply the same alias conversion and grouping to the
organization-invitation-table.test.tsx import at
packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/__tests__/organization-invitation-table.test.tsx:5-5.

In
`@packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/organization-invitation-table.tsx`:
- Around line 202-212: Remove the unnecessary `as const` assertion from the
`selectable` property in the selectionEnabled spread within the organization
invitation table. Keep the value as the boolean literal true so it satisfies
DataTableProps.selectable without a type assertion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 98116297-6e3f-4908-bce8-acf464a633de

📥 Commits

Reviewing files that changed from the base of the PR and between 51f72e8 and 5b8696e.

📒 Files selected for processing (15)
  • packages/core/src/i18n/custom-messages/my-organization/member-management/invitation-tab-types.ts
  • packages/core/src/i18n/translations/en-US.json
  • packages/core/src/i18n/translations/ja.json
  • packages/react/src/components/auth0/my-organization/__tests__/organization-member-management.test.tsx
  • packages/react/src/components/auth0/my-organization/organization-member-management.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-delete-modal.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/organization-invitation-delete-modal.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/__tests__/organization-invitation-table.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/organization-invitation-table.tsx
  • packages/react/src/hooks/my-organization/__tests__/use-member-management-service.test.ts
  • packages/react/src/hooks/my-organization/shared/services/use-member-management-service.ts
  • packages/react/src/hooks/my-organization/use-organization-member-management.ts
  • packages/react/src/tests/utils/__mocks__/core/core-client.mocks.ts
  • packages/react/src/types/my-organization/member-management/organization-invitation-table-types.ts
  • packages/react/src/types/my-organization/member-management/organization-member-management-types.ts

confirm_button?: string;
cancel_button?: string;
};
delete_selected?: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

in invitations we refer delete as revoke, we should rename this and other places where we use it

Comment on lines 360 to 362

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

delete is going to be depreciated we should use deleteMemberInvitations here as well

selectable: true as const,
selectionLabels: {
selectAll: t('data_table.select_all'),
selectRow: (index: number) => `${t('data_table.select_row')} ${index + 1}`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should add the translated text

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/core/src/i18n/translations/ja.json (1)

1307-1322: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

"削除" (delete) wording left over in bulk_revoke confirmation strings.

button, button_plural, confirm.title, confirm.title_plural, confirm.confirm_button, and confirm.confirm_button_plural all use "削除" (delete), while success (line 1312) and error.bulk_revoke_failed (line 1333) correctly use "取り消し" (revoke) — matching the existing singular revoke/revoke_resend blocks. This is the same delete→revoke terminology drift a previous reviewer asked to fix across "other places where we use it"; the key was renamed to bulk_revoke but the visible text wasn't updated to match, so users see "Delete" in the confirmation dialog but "Revoked" in the success toast for the same action.

🌐 Suggested wording alignment
       "bulk_revoke": {
-        "button": "選択項目を削除",
-        "button_plural": "選択項目を削除",
+        "button": "選択項目を取り消す",
+        "button_plural": "選択項目を取り消す",
         "count": "${count}件を選択中",
         "count_plural": "${count}件を選択中",
         "success": "${count}件の招待が取り消されました。",
         "confirm": {
-          "title": "保留中の招待を1件削除しますか?",
-          "title_plural": "保留中の招待を${count}件削除しますか?",
+          "title": "保留中の招待を取り消しますか?",
+          "title_plural": "保留中の招待を${count}件取り消しますか?",
           "description": "この招待を受けたメンバーは、元の招待リンクを使用してチームに参加できなくなります。この操作は取り消せません。",
           "description_plural": "これらの招待を受けたメンバーは、元の招待リンクを使用してチームに参加できなくなります。この操作は取り消せません。",
-          "confirm_button": "招待を削除",
-          "confirm_button_plural": "招待を削除",
+          "confirm_button": "招待を取り消す",
+          "confirm_button_plural": "招待を取り消す",
           "cancel_button": "キャンセル"
         }
       },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/core/src/i18n/translations/ja.json` around lines 1307 - 1322, Update
the Japanese bulk_revoke translations so all visible action and confirmation
text uses revoke terminology (取り消し) instead of delete terminology (削除). Modify
button, button_plural, confirm.title, confirm.title_plural,
confirm.confirm_button, and confirm.confirm_button_plural while preserving the
existing success and cancellation wording.
packages/react/src/hooks/my-organization/use-organization-member-management.ts (1)

129-131: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Selection reset effect misses pagination changes.

This effect only clears selectedInvitations on activeTab/invitationFilters/invitationSortConfig changes, but not on invitation pagination changes (invitationCurrentPage/invitationFromToken/invitationPageSize). Navigating to the next/previous page or changing page size still replaces currentInvitations, yet selectedInvitations (and thus the bulk-revoke toolbar count) persists from the prior page. A user could click "Bulk revoke" and revoke invitations that are no longer visible on screen, which is surprising for a destructive action.

🐛 Proposed fix
   React.useEffect(() => {
     setSelectedInvitations([]);
-  }, [activeTab, invitationFilters, invitationSortConfig]);
+  }, [activeTab, invitationFilters, invitationSortConfig, invitationCurrentPage, invitationPageSize]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/react/src/hooks/my-organization/use-organization-member-management.ts`
around lines 129 - 131, Update the selection-reset React.useEffect to also
depend on invitationCurrentPage, invitationFromToken, and invitationPageSize, so
selectedInvitations is cleared whenever invitation pagination changes while
preserving the existing resets for activeTab, invitationFilters, and
invitationSortConfig.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@packages/react/src/types/my-organization/member-management/organization-member-management-types.ts`:
- Around line 117-118: Update the JSDoc above revokeInvitationAction to
explicitly state that the action hooks support single or bulk invitation
revocation, matching the equivalent OrganizationMemberManagementProps
documentation.

---

Outside diff comments:
In `@packages/core/src/i18n/translations/ja.json`:
- Around line 1307-1322: Update the Japanese bulk_revoke translations so all
visible action and confirmation text uses revoke terminology (取り消し) instead of
delete terminology (削除). Modify button, button_plural, confirm.title,
confirm.title_plural, confirm.confirm_button, and confirm.confirm_button_plural
while preserving the existing success and cancellation wording.

In
`@packages/react/src/hooks/my-organization/use-organization-member-management.ts`:
- Around line 129-131: Update the selection-reset React.useEffect to also depend
on invitationCurrentPage, invitationFromToken, and invitationPageSize, so
selectedInvitations is cleared whenever invitation pagination changes while
preserving the existing resets for activeTab, invitationFilters, and
invitationSortConfig.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c8f70ee-bfe7-45e5-a0cf-516df58ed3c8

📥 Commits

Reviewing files that changed from the base of the PR and between ee63e8b and 1be308a.

📒 Files selected for processing (17)
  • packages/core/src/i18n/custom-messages/my-organization/member-management/invitation-tab-types.ts
  • packages/core/src/i18n/translations/en-US.json
  • packages/core/src/i18n/translations/fr.json
  • packages/core/src/i18n/translations/ja.json
  • packages/react/src/components/auth0/my-organization/__tests__/organization-member-management.test.tsx
  • packages/react/src/components/auth0/my-organization/organization-member-management.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/__tests__/organization-invitation-bulk-revoke-modal.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/organization-invitation-bulk-revoke-modal.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/__tests__/organization-invitation-table.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-table/organization-invitation-table.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/organization-member-detail/__tests__/organization-member-roles-tab.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/organization-member-detail/organization-member-roles-tab.tsx
  • packages/react/src/hooks/my-organization/__tests__/use-member-management-service.test.ts
  • packages/react/src/hooks/my-organization/shared/services/use-member-management-service.ts
  • packages/react/src/hooks/my-organization/use-organization-member-management.ts
  • packages/react/src/types/my-organization/member-management/organization-invitation-table-types.ts
  • packages/react/src/types/my-organization/member-management/organization-member-management-types.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/core/src/i18n/translations/en-US.json

Comment on lines 117 to +118
/** Action hooks for invitation revocation (onBefore/onAfter) */
revokeInvitationAction?: ComponentAction<MemberInvitation>;
revokeInvitationAction?: ComponentAction<MemberInvitation[]>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Stale JSDoc: doesn't mention bulk revocation support.

revokeInvitationAction was updated to ComponentAction<MemberInvitation[]> to support bulk revoke, but the JSDoc above it still says "Action hooks for invitation revocation (onBefore/onAfter)" — unlike the equivalent comment on OrganizationMemberManagementProps (line 226) which was updated to "single or bulk".

📝 Suggested doc fix
-  /** Action hooks for invitation revocation (onBefore/onAfter) */
+  /** Action hooks for invitation revocation, single or bulk (onBefore/onAfter) */
   revokeInvitationAction?: ComponentAction<MemberInvitation[]>;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/** Action hooks for invitation revocation (onBefore/onAfter) */
revokeInvitationAction?: ComponentAction<MemberInvitation>;
revokeInvitationAction?: ComponentAction<MemberInvitation[]>;
/** Action hooks for invitation revocation, single or bulk (onBefore/onAfter) */
revokeInvitationAction?: ComponentAction<MemberInvitation[]>;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/react/src/types/my-organization/member-management/organization-member-management-types.ts`
around lines 117 - 118, Update the JSDoc above revokeInvitationAction to
explicitly state that the action hooks support single or bulk invitation
revocation, matching the equivalent OrganizationMemberManagementProps
documentation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@chakrihacker can this be taken care of?

@chakrihacker
chakrihacker merged commit 54a7241 into feat/my-org-ea-branch Jul 30, 2026
2 checks passed
@chakrihacker
chakrihacker deleted the feat/invitation-multi-select branch July 30, 2026 15:42
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.

2 participants