refactor(core): use overcapacityMemberCount for quota checking instead of calculating the difference (#12117)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Bug Fixes**
  - Improved accuracy of member quota warnings by updating the logic that detects when the member limit has been exceeded.
  - Enhanced test reliability by adjusting member list pagination test to better handle confirmation modals.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
JimmFly
2025-05-08 09:55:23 +00:00
parent 52253e9e82
commit d379143db3
2 changed files with 1 additions and 4 deletions

View File

@@ -57,8 +57,7 @@ export const QuotaCheck = ({
if (workspaceMeta.flavour === 'local' || !quota || isTeam) {
return;
}
const memberOverflow = quota.memberCount > quota.memberLimit;
// remember to use real percent
const memberOverflow = quota.overcapacityMemberCount > 0;
const storageOverflow = usedPercent && usedPercent >= 100;
const message = getSyncPausedMessage(
!!isOwner,