Restore personal track goal selection after refresh - #93170
Conversation
Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
@MelvinBot It looks like the PR author checklist is outdated. Could you please use this checklist https://github.com/Expensify/App/blob/main/.github/PULL_REQUEST_TEMPLATE.md instead? Also, please carry over any relevant details from the current checklist and add them to the new one. You can check all the boxes on author checklist —I’ll add the videos and complete the testing items in the C+ reviewer checklist. |
|
@MelvinBot please check this comment #93170 (comment) |
|
🤖 Done! Updated the PR description to use the current PR template:
|
|
@jayeshmangwani please add tests in all platforms |
|
@NicolasBonet, are you referring to testing on all platforms? |
|
I've been trying to test flow for the last hour, but sign up isn't working for me. I also checked the staging version, and it's failing there as well (only loading button). It might be an issue with the backend APIs. BE-loading.movIt seems that the backend https://expensify.slack.com/archives/C01GTK53T8Q/p1781105766481649 has some issues. |
Sorry, but for me, the SignUpUser API is still not working. Its just keep loading indefinitely. |
…lected goal and text inputs
|
@FitseTLT @NicolasBonet One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Does this need my review ? |
No, I am taking care of the checklist since it's a regression from my PR. I'm just waiting for the site issue to be fixed so that sign-up can work. |
|
fixed btw |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid.movAndroid: mWeb Chromemweb-chrome.moviOS: HybridAppios.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.mov |
|
@NicolasBonet , the PR works well. |
|
|
|
🚧 @NicolasBonet 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.4.5-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review — no docs changes required I reviewed the changes in this PR against the help articles under Conclusion: No help-site updates are needed. Why:
Since no documentation changes are required, I did not create a draft PR. @jayeshmangwani, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR (Note: no help site PR was created because this bug fix introduces no documented user-facing change. If you'd like a docs PR for something specific here, reply with |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.5-6 🚀
|


Explanation of Change
On the
What are you looking to track?onboarding screen (onboarding/personaltrackcase), the selected option was kept only in local component state (useState), while the confirmed value is persisted to Onyx (ONBOARDING_PERSONAL_TRACK_GOAL). When the user continued to the name step, refreshed the page (wiping in-memory React state), and navigated back, the screen remounted with empty local state and the previous selection appeared cleared.This change restores the selection from the persisted Onyx value when the screen mounts. Because the Onyx value loads asynchronously, the state is adjusted during render once the value is
loaded(guarded so it runs only once), following the React "You Might Not Need an Effect" pattern. Predefined goals are stored as their constant and re-selected directly;Something elsestores the free text the user typed, so that case re-selectsSomething elseand repopulates the text input.Fixed Issues
$ #93131
PROPOSAL: #93131 (comment)
Tests
Organize my personal spending.Something else, enter any text, and clickContinue.What are you looking to track?is preserved (Something elseis still selected and your text is restored).Household expenses) instead, and verify it remains selected after refresh + back.Offline tests
Same as Tests.
QA Steps
Organize my personal spending.Something else, enter text, clickContinue.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
MacOS: Chrome / Safari
Process:
Screen.Recording.2026-06-10.at.12.27.03.PM.mov
Persistance validation after refresh: