[WIP] Remove initWithStoredValues from Onyx#89488
[WIP] Remove initWithStoredValues from Onyx#89488fabioh8010 wants to merge 6 commits intoExpensify:mainfrom
Conversation
|
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4425cee94a
ℹ️ 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".
| useEffect(() => { | ||
| if (memberCount > 0) { | ||
| return; | ||
| } | ||
| Navigation.navigate(ROUTES.DOMAIN_MEMBERS.getRoute(domainAccountID)); | ||
| }, [memberCount, domainAccountID]); |
There was a problem hiding this comment.
Gate empty-selection redirect on loaded Onyx state
This redirect runs whenever memberCount is 0, but useOnyx() can produce a transient empty value before the subscription finishes, so the new useEffect can immediately navigate away even when members were just selected for move. In the normal flow, DomainMembersPage calls setDomainMembersSelectedForMove(selectedMembers) and navigates right away, so a slow Onyx update/read can bounce users back to the members page and make the move-to-group screen intermittently unusable. The redirect should wait for Onyx to be loaded (or for an explicit "no selection" signal) before navigating.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
We set the data with Onyx.set (synchrnous) and I tested multiple times and wasn't able to trigger such situation, so I think it's safe to keep as it is.
|
🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
Explanation of Change
Fixed Issues
$ #80091
PROPOSAL:
Tests
We just need to test the removal of the last
initWithStoredValuesthat was introduced in #81973Offline tests
N/A
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
N/A, emulator crashing for me
Android: mWeb Chrome
Screen.Recording.2026-05-06.at.13.41.05.mov
iOS: Native
Screen.Recording.2026-05-06.at.13.50.44.mov
iOS: mWeb Safari
Screen.Recording.2026-05-06.at.13.54.43.mov
MacOS: Chrome / Safari
Screen.Recording.2026-05-06.at.13.56.24.mov
Screen.Recording.2026-05-06.at.13.57.26.mov