Skip to content

[Category Visibility] 1.b.1 [EC][App] Restricted category visibility persists offline after a removed member is re-invited #106769

Open

Description

@chiragsalian

Here is the,

PURPOSE

When an admin removes a restricted member and invites them back while offline, the member's details page still shows their old category restriction until the backend responds. The backend deletes their policyDataVisibility rows (1.12) and sends a new visibleTo, but the App keeps the stale visibleTo on each category in the meantime.

SOLUTION

  • App: when inviting members (buildAddMembersToWorkspaceOnyxData in src/libs/actions/Policy/Member.ts), optimistically add each invited accountID to visibleTo on every category that has a non-null visibleTo, since a new member has no restriction.
  • Revert those visibleTo entries in failureData.
  • Unchanged: Auth and Web-E. The backend already deletes rows on removal and sends the correct visibleTo.

MANUAL TEST STEPS

  • As a Control workspace admin, restrict a member to two categories.
  • Go offline, remove the member, then invite them back.
  • Open the member's details and confirm Category visibility shows "All categories".
  • Go online and confirm it still shows "All categories".
Issue OwnerCurrent Issue Owner: @nkdengineer

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions