Files
Enterprise-Knowledge-Base/frontend
wizardchen e0b6a71503 fix(frontend): correct optimistic organization state after review and detail loads
Follow-up fixes for the organization state sync work:

- reviewOrganizationJoinRequest no longer increments member_count when
  approving a role-upgrade request (only genuine "join" approvals add a
  member); callers pass the request_type so upgrades are excluded.
- setCurrentOrganization now merges the detail payload onto the existing
  card instead of replacing it, so list-only aggregate badges
  (share_count / agent_share_count / pending_join_request_count) are not
  transiently blanked when a detail response omits them.
- OrganizationSettingsModal clears the previous organization context when
  reopening in edit mode for a different org, avoiding a stale frame
  before the detail request resolves.

Adds pure-helper unit tests for mergeById and reviewMemberCountDelta.
2026-07-24 10:45:12 +08:00
..
2026-07-01 17:31:42 +08:00