You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-08-03] [$250] Private Setting- Unverified personal details kept in personal detail page #92829
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.4.0-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#91646 Email or phone of affected tester (no customers):testpayment935@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11 pro /Chrome App Component: User Settings
Action Performed:
Navigate to staging.new.expensify.com
Go to Account page >Profile > private section
Fill every personal detail page and save
Enter magic code
Go back to detail page and change country and Zip code > Save
Tap back button in validation page > back again
Notice the change is not reflected in private section
Open the RHP
Notice the change is
Expected Result:
The change should not be applied as the change is not validated.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Find someone who can quickly fix the issue.
Fix the issue yourself.
godzillaxbox19982014-lgtm commented on Jun 5, 2026
The local evidence matches this recurring failure shape: route params are created in one format and read in another. Here, src/pages/AddPersonalBankAccountPage.tsx:34 and src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx:143 do not agree on the same the issue-specific state value, so the user-visible path can show a missing or stale state even though nearby data already has the needed context.
What changes do you think we should make in order to solve the problem?
Update src/pages/AddPersonalBankAccountPage.tsx:34 to derive the issue-specific state from the route/access source that owns this flow before the value is consumed.
Carry the same normalized value through src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx:143; that follows the safer family move to fix the route builder/consumer pair instead of adding a screen-only redirect, so the write/optimistic/read paths agree instead of only changing the visible component.
Keep the change inside the Navigation, RHP, Not Here, Back Stack surface and avoid changing deep links, auth/onboarding redirects.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add or update a regression in tests/navigation/**/*.ts for the exact issue flow: Private Setting- Unverified personal details kept in personal detail page.
Cover the counter-case near src/pages/AddPersonalBankAccountPage.tsx:34 so valid existing the issue-specific state behavior still works.
Manually repeat the issue steps after the patch and confirm the visible state/action is no longer stale.
What alternative solutions did you explore? (Optional)
I would not add a broad new condition outside these referenced paths; the safer fix is to keep the issue-specific state consistent at the first read/write boundary shown above.
Root Cause: Unvalidated edits are stored only in the PERSONAL_DETAILS_FORM Onyx draft, never optimistically written to PRIVATE_PERSONAL_DETAILS. When the user backs out of the magic-code page, nothing clears that draft, so the RHP form re-seeds from it on remount — while the Profile summary (which reads the committed PRIVATE_PERSONAL_DETAILS) correctly shows the old value. The two views diverge.
The success path clears the draft, but the cancel/back path does not:
The parent page deliberately skips its own unmount-time draft clear when navigating to the magic-code RHP (PrivatePersonalDetailsPage.tsx:85-94) so the submission payload is preserved — but nothing reverses that when the user backs out.
Recommended Fix: Clear the form draft on the cancel/unmount path of the magic-code page so an unvalidated edit doesn't persist. A useEffect cleanup that fires on unmount unless submission succeeded is the most robust option (covers Back button, swipe-back, hardware back, and navigating away), since clearDraftValues is already imported in that file.
Investigation details & data flow
Cancel-path data flow:
User edits country + zip → each keystroke writes to personalDetailsForm draft (inputs use shouldSaveDraft).
Save → onSubmit writes the form to the draft, sets skipClearDraftOnUnmountRef = true, navigates to the magic-code RHP (PrivatePersonalDetailsPage.tsx:213-223).
Parent unmounts; cleanup bails on the ref → draft remains.
User taps Back → onClose only calls Navigation.goBack() → draft remains.
Profile summary reads PRIVATE_PERSONAL_DETAILS directly with no draft fallback (ProfilePage.tsx) → shows the old value.
Why the committed value is never touched:updatePrivatePersonalDetails only writes {isLoading: true} optimistically to PRIVATE_PERSONAL_DETAILS; the field values are committed only by the backend response (PersonalDetails.ts:519-567). This is why only the draft-backed RHP form shows the stale edit.
Alternative explanation considered: an optimistic write to PRIVATE_PERSONAL_DETAILS leaking into the RHP — ruled out, since the action never writes the field values optimistically and the Profile summary (same source) is unaffected.
Suggested implementation (sketch):
constsubmittedSuccessfullyRef=useRef(false);// in the existing success branch (line 48-53):submittedSuccessfullyRef.current=true;// new unmount effect:useEffect(()=>()=>{if(submittedSuccessfullyRef.current){return;}clearDraftValues(ONYXKEYS.FORMS.PERSONAL_DETAILS_FORM);},[]);
Confidence: High — small, deterministic client-side lifecycle bug; the cleanup omission is directly visible by comparing the success effect (clears draft) with the cancel onClose (does not).
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/92829) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
I don't think this is an issue, we discussed this in the PR review and landed on the form fields always preserving their last value, even if the user navigates to the validate code page and then closes the form.
the fix would be to clear PERSONAL_DETAILS_FORM_DRAFT in the magic-code page's onClose
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.44-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-08-03. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor
Activity
applause-bot commentedon Jun 5, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/855e7d0328470819b44ac64a2fd88cfef066a0240094d63f555a3935cef44671
melvin-bot commentedon Jun 5, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #91646
melvin-bot commentedon Jun 5, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 5, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
godzillaxbox19982014-lgtm commentedon Jun 5, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Private Setting- Unverified personal details kept in personal detail page
What is the root cause of that problem?
I traced this to the path that handles
the issue-specific state:closeRHPFlow):Navigation.closeRHPFlow();closeRHPFlow):Navigation.closeRHPFlow();navigate):Navigation.navigate(ROUTES.EXPENSE_REPORT_RHP.getRoute({reportID, backTo: ROUTES.HOME}));src/pages/AddPersonalBankAccountPage.tsx:34andsrc/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx:143do not agree on the samethe issue-specific statevalue, so the user-visible path can show a missing or stale state even though nearby data already has the needed context.What changes do you think we should make in order to solve the problem?
src/pages/AddPersonalBankAccountPage.tsx:34to derivethe issue-specific statefrom the route/access source that owns this flow before the value is consumed.src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx:143; that follows the safer family move to fix the route builder/consumer pair instead of adding a screen-only redirect, so the write/optimistic/read paths agree instead of only changing the visible component.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
tests/navigation/**/*.tsfor the exact issue flow: Private Setting- Unverified personal details kept in personal detail page.src/pages/AddPersonalBankAccountPage.tsx:34so valid existingthe issue-specific statebehavior still works.What alternative solutions did you explore? (Optional)
the issue-specific stateconsistent at the first read/write boundary shown above.MelvinBot commentedon Jun 5, 2026
Issue Analysis
Root Cause: Unvalidated edits are stored only in the
PERSONAL_DETAILS_FORMOnyx draft, never optimistically written toPRIVATE_PERSONAL_DETAILS. When the user backs out of the magic-code page, nothing clears that draft, so the RHP form re-seeds from it on remount — while the Profile summary (which reads the committedPRIVATE_PERSONAL_DETAILS) correctly shows the old value. The two views diverge.The success path clears the draft, but the cancel/back path does not:
PrivatePersonalDetailsConfirmMagicCodePage.tsx:51callsclearDraftValues(...).PrivatePersonalDetailsConfirmMagicCodePage.tsx:72-79only callsNavigation.goBack()— the draft survives.The parent page deliberately skips its own unmount-time draft clear when navigating to the magic-code RHP (
PrivatePersonalDetailsPage.tsx:85-94) so the submission payload is preserved — but nothing reverses that when the user backs out.Recommended Fix: Clear the form draft on the cancel/unmount path of the magic-code page so an unvalidated edit doesn't persist. A
useEffectcleanup that fires on unmount unless submission succeeded is the most robust option (covers Back button, swipe-back, hardware back, and navigating away), sinceclearDraftValuesis already imported in that file.Investigation details & data flow
Cancel-path data flow:
personalDetailsFormdraft (inputs useshouldSaveDraft).onSubmitwrites the form to the draft, setsskipClearDraftOnUnmountRef = true, navigates to the magic-code RHP (PrivatePersonalDetailsPage.tsx:213-223).onCloseonly callsNavigation.goBack()→ draft remains.FormProviderseeds inputs from the draft (FormProvider.tsx:150,372-373), and the page's localselectedCountry/selectedStatealso seed from the draft (PrivatePersonalDetailsPage.tsx:77-80) → unvalidated values reappear.PRIVATE_PERSONAL_DETAILSdirectly with no draft fallback (ProfilePage.tsx) → shows the old value.Why the committed value is never touched:
updatePrivatePersonalDetailsonly writes{isLoading: true}optimistically toPRIVATE_PERSONAL_DETAILS; the field values are committed only by the backend response (PersonalDetails.ts:519-567). This is why only the draft-backed RHP form shows the stale edit.Alternative explanation considered: an optimistic write to
PRIVATE_PERSONAL_DETAILSleaking into the RHP — ruled out, since the action never writes the field values optimistically and the Profile summary (same source) is unaffected.Suggested implementation (sketch):
Confidence: High — small, deterministic client-side lifecycle bug; the cleanup omission is directly visible by comparing the success effect (clears draft) with the cancel
onClose(does not).Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/92829)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
jasperhuangg commentedon Jun 5, 2026
I don't think this is an issue, we discussed this in the PR review and landed on the form fields always preserving their last value, even if the user navigates to the validate code page and then closes the form.
the fix would be to clear
PERSONAL_DETAILS_FORM_DRAFTin the magic-code page'sonClose47 remaining items
melvin-bot commentedon Jul 27, 2026
@situchan
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.44-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-08-03. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Jul 30, 2026
@situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Aug 2, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Aug 2, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
situchan commentedon Aug 5, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: follow-up of new feature
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/668944
Regression Test Proposal
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-632d-a478-511e-1f746fe08574melvin-bot commentedon Aug 5, 2026
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
mallenexpensify commentedon Aug 5, 2026
Payment Summary
Contributor+: @situchan due $250 via NewDot
^ Test case created. Thx
laurenreidexpensify commentedon Aug 26, 2026
$250 approved for @situchan New Expensify