Replace individual private detail edit pages with unified form + magic code#87928
Conversation
Adds the API plumbing for the new unified personal details update: - UPDATE_PRIVATE_PERSONAL_DETAILS write command - UpdatePrivatePersonalDetailsParams type (all personal detail fields + validateCode) - updatePrivatePersonalDetails() action with optimistic/success/failure data that sets isLoading on PRIVATE_PERSONAL_DETAILS Part of Expensify/Expensify#623849. Made-with: Cursor
Registers two new screens in the Settings RHP: - PRIVATE_PERSONAL_DETAILS: unified edit form for all private fields - PRIVATE_PERSONAL_DETAILS_CONFIRM_MAGIC_CODE: magic code verification Adds routes, screen constants, navigation param types, linking config, and Settings-to-RHP relations. Part of Expensify/Expensify#623849. Made-with: Cursor
PrivatePersonalDetailsPage: single form with all private fields (legal name, DOB, phone, address). Pre-populates from PRIVATE_PERSONAL_DETAILS, validates that previously-set fields cannot be emptied, and navigates to magic code confirmation when any field changes. PrivatePersonalDetailsConfirmMagicCodePage: uses ValidateCodeActionContent to collect a magic code, then calls updatePrivatePersonalDetails() to submit all changes in a single validate-code-protected API call. Part of Expensify/Expensify#623849. Made-with: Cursor
All four private detail rows (legal name, DOB, phone, address) now navigate to the unified PrivatePersonalDetailsPage instead of individual edit pages. The individual pages are kept for backward compatibility with deep links. Part of Expensify/Expensify#623849. Made-with: Cursor
|
@DylanDylann Please 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a14d480bd
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
|
…vatePersonalDetails
Convert SETTINGS_PRIVATE_PERSONAL_DETAILS from a plain string to an object with getRoute(fieldToFocus?) so callers can specify which field to auto-focus when the form opens. Update the linking config and navigation types accordingly. Made-with: Cursor
Each private detail row in ProfilePage now passes its corresponding INPUT_ID so the form auto-focuses the tapped field: legal name, DOB, phone number, or address. Made-with: Cursor
Read the fieldToFocus query param and set autoFocus on the matching InputWrapper. For the DatePicker (DOB), autoFocus triggers the calendar modal to open immediately. Made-with: Cursor
After the private personal details update succeeds (isLoading transitions from true to false with no errors), navigate back to the Profile settings page instead of the intermediate form. Made-with: Cursor
When the user edits fields but navigates away without submitting, the draft values were persisted via shouldSaveDraft. Now we call clearDraftValues on unmount so the form always resets to the current saved values when reopened. Made-with: Cursor
Check both privatePersonalDetails.errors and validateCodeAction.errorFields before navigating back to Profile. Invalid magic code errors are stored on the validateCodeAction key, not privatePersonalDetails. Made-with: Cursor
The server sets validate code errors on PRIVATE_PERSONAL_DETAILS.errorFields.personalDetails via Onyx::handleException, but the component was reading from .errors which is never populated. Use getLatestErrorField to read from the correct path so errors are displayed and the success navigation doesn't fire on failure. Made-with: Cursor
|
@MelvinBot pull main on this PR |
…ersonalDetails Co-authored-by: Jasper Huang <jasperhuangg@users.noreply.github.com>
|
Merged main into this branch. ✅ |
- Add 'Basic details' and 'Address' section headers with sectionTitle style - Replace Country text input with CountrySelector picker component - Add basicDetails translation key to all language files Made-with: Cursor
|
Can you make the height smaller. I just wanna see how it'll look on mobile. It should be fixed to the bottom there |
|
Was just checking the Address form in private details and Add payment card form in subscription, and they both work the way this is currently implemented.
CleanShot.2026-05-12.at.07.57.04.mp4Let's just stick with what we do elsewhere 👍 |
|
Makes sense to me 👍 |
|
Sure, I'm up for that. The reason why I wanted it sticky was because all the other forms are forms where you have to fill the entire thing so it makes sense to have it at the end as you have to ensure it's all correct. For this new for, you might just wanna set the name or dob or edit them so having the save button visible made most sense to me. But happy to go with the consistency even though the forms works slightly different. Not a big deal. |
|
@jasperhuangg I tried restarting the performance tests a couple times but they keep failing. I don't think it's related. Can you please try merging main? |
|
@MelvinBot pull main on this PR |
…ersonalDetails Co-authored-by: Jasper Huang <jasperhuangg@users.noreply.github.com>
|
Merged main into this branch. No conflicts. |
|
Web PR is in prod now, this is good to merge |
|
🚧 @rafecolton 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/rafecolton in version: 9.3.74-7 🚀
Bundle Size Analysis (Sentry): |
|
Yes, help site changes are required. PR #87928 replaces the individual private detail edit pages with a unified form + magic code verification, which changes the documented user flow. Draft PR created: #90803 Articles updated:
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.74-7 🚀
|
|
Deploy Blocker #90834 was identified to be related to this PR. |
|
Reverted due to regression: #90834 |
|
Hi @jasperhuangg. Apps don't ask for a magic code when editing a field as step 7 asks. cc @rafecolton @chuckdries @mjasikowski 26-ios.mp4 |
|
@IuliiaHerets this PR was reverted, so the functionality described is not present in the app at this time |

Explanation of Change
Replaces the four individual edit pages for private personal details (legal name, DOB, phone, address) with a single unified form that requires magic code verification when any field changes. This prevents session hijackers from silently modifying sensitive personal information.
New pages:
PrivatePersonalDetailsPage- Unified form showing all private detail fields, pre-populated from Onyx. Validates that previously-set fields aren't emptied. On submit, detects changes and navigates to magic code confirmation.PrivatePersonalDetailsConfirmMagicCodePage- UsesValidateCodeActionContentto collect a magic code, then callsupdatePrivatePersonalDetails()to submit all changes in a single API call.API changes:
UPDATE_PRIVATE_PERSONAL_DETAILSwrite command with optimistic/success/failure dataupdatePrivatePersonalDetails()action inPersonalDetails.tsNavigation changes:
Depends on Auth PR and Web-Expensify PR.
Fixed Issues
part of https://github.com/Expensify/Expensify/issues/623849
PROPOSAL:
Tests
Offline tests
QA Steps
Same as Tests section above.
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./** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Made with Cursor