Fix: Domain admins - "Hidden" is shown for member invited to Domain admins page while offline#81797
Fix: Domain admins - "Hidden" is shown for member invited to Domain admins page while offline#81797annaweber830 wants to merge 3 commits intoExpensify:mainfrom
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 051ea334bb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (isOptimisticAccount) { | ||
| optimisticData.push({ | ||
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: `${ONYXKEYS.PERSONAL_DETAILS_LIST}`, | ||
| value: { | ||
| [accountID]: { | ||
| accountID, | ||
| login: targetEmail, | ||
| displayName: targetEmail, | ||
| isOptimisticPersonalDetail: true, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Clear optimistic personal details after add-admin completes
When inviting a new admin whose account is optimistic, this adds a PERSONAL_DETAILS_LIST entry with isOptimisticPersonalDetail but never removes or clears it on success or failure. That means the new admin can remain permanently flagged as optimistic, and BaseDomainMembersPage disables interaction for optimistic personal details, so the admin row may stay non-interactive even after the invite succeeds (or linger after a failure) unless a later full personal-details refresh overwrites it. Consider adding success/failure cleanup similar to addMemberToDomain so the optimistic flag is cleared once the write resolves.
Useful? React with 👍 / 👎.
Explanation of Change
Fix: Domain admins - "Hidden" is shown for member invited to Domain admins page while offline
Fixed Issues
$ #80186
PROPOSAL: #80186 (comment)
Tests
Offline tests
Same as test
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari