Re-apply secure private personal details + fix 4 blockers from previous revert#91646
Conversation
…omplete and country auto-fill" This reverts commit 30d6f08.
- Preserve form draft across the navigation to the magic-code RHP. The prior cleanup cleared the draft on every unmount, so navigating to the magic-code screen wiped the payload before submission. For new users with no stored address that resulted in Auth returning an error on UpdatePrivatePersonalDetails (#91602). It also caused the country to fall back to the geolocation default when the user backed out of the magic-code page and remounted the form (#91608). Now the draft is cleared only when the form unmounts without navigating to the magic code screen, and the magic-code success effect clears the draft after the API write completes. - Seed selectedCountry / selectedState from the form draft (with the stored address and geolocation as further fallbacks) so a back-from- magic-code remount restores the user's choices instead of reverting to geolocation (#91608). - Pop the magic-code RHP with a plain Navigation.goBack() instead of goBack(ROUTES.SETTINGS_PRIVATE_PERSONAL_DETAILS). The route-based back path compares params, which never matched the existing PrivatePersonalDetails route (it carried a fieldToFocus param) and fell through to REPLACE, leaving a duplicate PrivatePersonalDetails on the RHP stack so the next back-press only popped the duplicate (#91611). - AddressSearch now accepts an autoFocus prop and forwards it to the underlying TextInput, so opening PrivatePersonalDetailsPage with ?fieldToFocus=addressLine1 actually focuses Address line 1 (#91604).
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@parasharrajat @mountiny 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] |
|
npm has a |
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 92f50bf135e..972f9624a4c 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -3334,7 +3334,7 @@ ${amount} für ${merchant} – ${date}`,
enterPhoneNumber: 'Wie lautet deine Telefonnummer?',
personalDetails: 'Persönliche Angaben',
privateDataMessage: 'Diese Angaben werden für Reisen und Zahlungen verwendet. Sie werden niemals in deinem öffentlichen Profil angezeigt.',
- basicDetails: 'Grundlegende Angaben',
+ basicDetails: 'Grundlegende Details',
legalName: 'Rechtlicher Name',
legalFirstName: 'Rechtlicher Vorname',
legalLastName: 'Rechtlicher Nachname',
@@ -3529,7 +3529,7 @@ ${amount} für ${merchant} – ${date}`,
noBankAccountSelected: 'Bitte wähle ein Konto aus',
taxID: 'Bitte geben Sie eine gültige Steueridentifikationsnummer ein',
website: 'Bitte eine gültige Website eingeben',
- zipCode: `Bitte gib eine gültige Postleitzahl im folgenden Format ein: ${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
+ zipCode: `Bitte geben Sie eine gültige Postleitzahl im folgenden Format ein: ${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
phoneNumber: 'Bitte gib eine gültige Telefonnummer ein',
email: 'Bitte gib eine gültige E-Mail-Adresse ein',
companyName: 'Bitte gib einen gültigen Unternehmensnamen ein',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 3a8d9ce406c..7549e479462 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -3214,7 +3214,7 @@ ${amount} para ${merchant} - ${date}`,
enterPhoneNumber: '¿Cuál es tu número de teléfono?',
personalDetails: 'Datos personales',
privateDataMessage: 'Estos detalles se utilizan para viajes y pagos. Nunca se mostrarán en tu perfil público.',
- basicDetails: 'Datos básicos',
+ basicDetails: 'Detalles básicos',
legalName: 'Nombre completo',
legalFirstName: 'Nombre legal',
legalLastName: 'Apellidos legales',
@@ -3412,7 +3412,7 @@ ${amount} para ${merchant} - ${date}`,
noBankAccountSelected: 'Por favor, elige una cuenta bancaria',
taxID: 'Por favor, introduce un número de identificación fiscal válido',
website: 'Por favor, introduce un sitio web válido',
- zipCode: `Formato de código postal incorrecto. Formato aceptable: ${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}.`,
+ zipCode: `Por favor, introduce un código ZIP válido usando el formato: ${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
phoneNumber: 'Por favor, introduce un teléfono válido',
email: 'Por favor, introduce una dirección de correo electrónico válida',
companyName: 'Por favor, introduce un nombre comercial legal válido',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 8235e1a4c80..c95a2fa633b 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -3540,7 +3540,7 @@ ${amount} pour ${merchant} - ${date}`,
noBankAccountSelected: 'Veuillez choisir un compte',
taxID: 'Veuillez saisir un numéro d’identification fiscale valide',
website: 'Veuillez saisir un site web valide',
- zipCode: `Veuillez saisir un code postal valide au format : ${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
+ zipCode: `Veuillez saisir un code ZIP valide en utilisant le format : ${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
phoneNumber: 'Veuillez saisir un numéro de téléphone valide',
email: 'Veuillez saisir une adresse e-mail valide',
companyName: 'Veuillez saisir un nom d’entreprise valide',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index dd0e65638d8..4bd36a01cca 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -3492,7 +3492,7 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの'
noBankAccountSelected: 'アカウントを選択してください',
taxID: '有効な納税者番号を入力してください',
website: '有効なウェブサイトを入力してください',
- zipCode: `有効なZIPコードを、次の形式で入力してください: ${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
+ zipCode: `有効な ZIP コードを、次の形式で入力してください:${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
phoneNumber: '有効な電話番号を入力してください',
email: '有効なメールアドレスを入力してください',
companyName: '有効な会社名を入力してください',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 72296059032..9f511ae2130 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -3508,7 +3508,7 @@ ${amount} dla ${merchant} - ${date}`,
noBankAccountSelected: 'Wybierz konto',
taxID: 'Wprowadź prawidłowy numer identyfikacji podatkowej',
website: 'Wprowadź prawidłową stronę internetową',
- zipCode: `Wprowadź prawidłowy kod ZIP w formacie: ${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
+ zipCode: `Wpisz prawidłowy kod ZIP w formacie: ${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
phoneNumber: 'Wprowadź prawidłowy numer telefonu',
email: 'Wpisz prawidłowy adres e‑mail',
companyName: 'Wprowadź prawidłową nazwę firmy',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 0c9a4e0084e..dd4be17b0f6 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -3429,7 +3429,7 @@ ${amount},商户:${merchant} - 日期:${date}`,
noBankAccountSelected: '请选择一个账户',
taxID: '请输入有效的税号',
website: '请输入有效的网站',
- zipCode: `请输入有效的邮政编码,格式为:${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
+ zipCode: `请按照以下格式输入有效的邮政编码:${COMMON_CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`,
phoneNumber: '请输入有效的电话号码',
email: '请输入有效的邮箱地址',
companyName: '请输入有效的公司名称',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
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: 7a57604f84
ℹ️ 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".
…vatePersonalDetails-redo-v2
…vatePersonalDetails-redo-v2
Hnmm, I started investigating and it seems that it's the same issue we faced but not caused by our changes, since this is |
Fix: lowercase iOS
|
|
What do you think of this, @rafecolton? I experimented changing that in backend but seems not to be the way to go. It would mess with indexes if we need to The simplest solution is just that one liner. Just make sure the generated deviceID is lowercase from the start. Current clients continue to work. New clients will get the lowercase version. Simple and works. |
|
Please, remember to clear app information when testing because that's persisted. I just uninstalled and tried again. Lemme know if it works on your tests. |
|
@MelvinBot can you please make a separate GH issue in the App repo for the logout issue that @heekinho is investigating? Please link to his comment above and summarize the conclusion. Please assign to me and @heekinho and add the labels @jasperhuangg since the logout issue is not related to this PR and none of the issues for which this was reverted are reproducible here, I think it's ok to proceed. @parasharrajat can you please complete the reviewer checklist? |
|
🤖 Created a separate issue for the logout bug: #92392
It links to |
|
@parasharrajat @rafecolton I think this PR is ready for final review then? Thank you for investigating that issue @heekinho |
…ersonalDetails-redo-v2
|
🚧 @jasperhuangg has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/jasperhuangg in version: 9.4.0-0 🚀
Bundle Size Analysis (Sentry): |
Help site review — changes required ✅This PR changes a user-facing flow that's documented on the help site, so a docs update is needed. What changed for users
Affected article: Draft docs PR: #92806 All feature names, section headings, and button labels in the docs were verified against the live New Expensify UI (screenshots included in the docs PR). @jasperhuangg, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Deploy Blocker #92821 was identified to be related to this PR. |
|
Deploy Blocker ##92829 was identified to be related to this PR |
|
I demoted #92829, very minor behavior quirk that I don't think we need to consider a bug. |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.0-7 🚀
|
Explanation of Change
Re-applies #91000 (reverted in #91606) and fixes the 4 blockers that caused the revert.
Fixed Issues
$ #91602
$ #91604
$ #91608
$ #91611
Tests
?fieldToFocus=addressLine1and the field is focused ([Due for payment 2026-06-16] [Due for payment 2026-06-02] Profile - Address line 1 is not auto focused when URL contains ?fieldToFocus=addressLine1 #91604).Offline tests
QA Steps
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