Skip to content

[PM-16095] feat: Enhance provider seat limit validation messages#7980

Open
JaredScar wants to merge 1 commit into
mainfrom
ac/pm-16095-update-validation-message-for-reseller-seat-count
Open

[PM-16095] feat: Enhance provider seat limit validation messages#7980
JaredScar wants to merge 1 commit into
mainfrom
ac/pm-16095-update-validation-message-for-reseller-seat-count

Conversation

@JaredScar

Copy link
Copy Markdown
Contributor

🎟️ Tracking

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

📔 Objective

Fixes error message for reseller orgs to say how many seats they have in the error message explicitly

📸 Screenshots

image

Updated the InviteUsersPasswordManagerValidator to include seat count in validation results. Modified ProviderResellerSeatLimitError to accept seat count and adjusted related validation logic in InvitingUserOrganizationProviderValidator. Updated OrganizationService to reflect seat limits in error messages and adjusted corresponding tests for consistency.
@JaredScar JaredScar requested a review from a team as a code owner July 14, 2026 17:16
@JaredScar JaredScar requested a review from eliykat July 14, 2026 17:16
@JaredScar JaredScar added ai-review Request a Claude code review t:bugfix Change Type - Bugfix labels Jul 14, 2026
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed this bugfix that enhances provider reseller seat-limit validation messages to include the explicit seat count. Changes span ProviderResellerSeatLimitError, the InvitingUserOrganizationProviderValidator signature (now takes int? seats), its single caller in InviteUsersPasswordManagerValidator, and the parallel message in OrganizationService.CanScaleAsync. The single caller and its test were both updated consistently, and no dead references to the removed Code const remain.

Code Review Details

No blocking findings.

The interpolated int? Seats value could theoretically render an empty message if null, but the invite flow returns early when Seats is null before reaching the reseller check, and reseller-managed organizations always have a defined seat count in practice. This matches the existing behavior in CanScaleAsync and is not a concern.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.05%. Comparing base (d6cb0a1) to head (e22c52a).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...ionUsers/InviteUsers/Validation/Provider/Errors.cs 0.00% 4 Missing ⚠️
...wordManager/InviteUsersPasswordManagerValidator.cs 0.00% 1 Missing ⚠️
...vider/InvitingUserOrganizationProviderValidator.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7980      +/-   ##
==========================================
+ Coverage   62.03%   62.05%   +0.02%     
==========================================
  Files        2276     2277       +1     
  Lines       99404    99455      +51     
  Branches     8980     8983       +3     
==========================================
+ Hits        61667    61719      +52     
+ Misses      35565    35563       -2     
- Partials     2172     2173       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 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

ai-review Request a Claude code review t:bugfix Change Type - Bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant