Skip to content

Conversation

@BTreston
Copy link
Contributor

@BTreston BTreston commented Dec 3, 2025

๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/PM-28422

๐Ÿ“” Objective

Implements member action batching for the bulk reinvite functionality in the organization members management system. The changes enable processing large numbers of users efficiently by breaking them into sequential batches.
Key Changes:

  1. Feature Flag (libs/common/src/enums/feature-flag.enum.ts)
  • Added BulkReinviteBatching feature flag (currently set to "todo")
  1. Batching Logic (member-actions.service.ts)
  • Introduced BATCH_SIZE constant set to 500 users per batch
  • Created generic processBatchedOperation() helper that:
    • Processes user IDs in sequential batches
    • Aggregates successful and failed results across all batches
    • Continues processing remaining batches even if one fails
  • Updated bulkReinvite() to use the batching helper instead of processing all users at once
  1. Members Component (members.component.html & .ts)
    - With batching enabled: Uses vNextCheckAllFilteredUsers() with limits (8,000 for cloud, 1,000 for self-hosted)
    - Without batching: Uses existing checkAllFilteredUsers() (500 user limit)

  2. Comprehensive Testing (member-actions.service.spec.ts)

  • Added extensive test coverage for batching scenarios:
    • Single batch processing (exactly BATCH_SIZE)
    • Multiple batch processing (exceeding BATCH_SIZE)
    • Partial failures with continued processing
    • Result aggregation across batches
    • Empty response handling
    • Sequential batch ordering verification

๐Ÿ“ธ Screenshots

โฐ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

๐Ÿฆฎ Reviewer guidelines

  • ๐Ÿ‘ (:+1:) or similar for great changes
  • ๐Ÿ“ (:memo:) or โ„น๏ธ (:information_source:) for notes or general info
  • โ“ (:question:) for questions
  • ๐Ÿค” (:thinking:) or ๐Ÿ’ญ (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • ๐ŸŽจ (:art:) for suggestions / improvements
  • โŒ (:x:) or โš ๏ธ (:warning:) for more significant problems or concerns needing attention
  • ๐ŸŒฑ (:seedling:) or โ™ป๏ธ (:recycle:) for future improvements or indications of technical debt
  • โ› (:pick:) for minor or nitpick changes

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 15b6791c-bd2b-496a-86de-54d0548ef930

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

โŒ Patch coverage is 43.75000% with 18 lines in your changes missing coverage. Please review.
โœ… Project coverage is 41.60%. Comparing base (17ebae1) to head (a704c52).
โš ๏ธ Report is 8 commits behind head on main.
โœ… All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...p/admin-console/common/people-table-data-source.ts 0.00% 9 Missing โš ๏ธ
...console/organizations/members/members.component.ts 0.00% 7 Missing โš ๏ธ
.../services/member-actions/member-actions.service.ts 86.66% 0 Missing and 2 partials โš ๏ธ
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17805      +/-   ##
==========================================
+ Coverage   41.52%   41.60%   +0.08%     
==========================================
  Files        3556     3563       +7     
  Lines      102951   103220     +269     
  Branches    15476    15520      +44     
==========================================
+ Hits        42754    42949     +195     
- Misses      58380    58448      +68     
- Partials     1817     1823       +6     

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

๐Ÿš€ New features to boost your workflow:
  • ๐Ÿ“ฆ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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