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
[$250] Expense - The details of an expense don't work after going back when writing a merchant #76898
Please re-state the problem that we are trying to solve in this issue.
The details of an expense don't work after going back when writing a merchant
What is the root cause of that problem?
On ios native, when a user tries to go back from a MoneyRequest screen with unsaved changes the native back gesture/button removes the screen from the native stack. The JavaScript code tries to prevent navigation using beforeRemove (which calls e.preventDefault()). beforeRemove doesn’t fully prevent native navigation, so the screen is removed natively but stays in JavaScript state. This mismatch causes the error: The screen 'MoneyRequest' was removed natively but didn't get removed from JS state. Consider using a 'usePreventRemove' hook with 'headerBackButtonMenuEnabled: false' to prevent users from natively going back multiple screens.
Optional(not critical or important)
We can add headerBackButtonMenuEnabled: false, as the error suggests to the description and merchant screen. We can do something like this
changed the title [-]Expense - The details of an expense don't work after going back when writing a merchant[/-][+][$250] Expense - The details of an expense don't work after going back when writing a merchant[/+]on Dec 9, 2025
If so, pay should be reduced. If not, please provide reasoning. Thx
We agreed that this is a follow-up issue #78590 (comment)
Since we fixed the main critical issue, but we needed to add a few additional improvements
So I think we don't need to change a payment
Activity
melvin-bot commentedon Dec 6, 2025
Triggered auto assignment to @JmillsExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.Nodebrute commentedon Dec 6, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The details of an expense don't work after going back when writing a merchant
What is the root cause of that problem?
On ios native, when a user tries to go back from a
MoneyRequestscreen with unsaved changes the native back gesture/button removes the screen from the native stack. The JavaScript code tries to prevent navigation using beforeRemove (which calls e.preventDefault()). beforeRemove doesn’t fully prevent native navigation, so the screen is removed natively but stays in JavaScript state. This mismatch causes the error:The screen 'MoneyRequest' was removed natively but didn't get removed from JS state. Consider using a 'usePreventRemove' hook with 'headerBackButtonMenuEnabled: false' to prevent users from natively going back multiple screens.App/src/pages/iou/request/step/DiscardChangesConfirmation/index.native.tsx
Lines 14 to 27 in d34df44
What changes do you think we should make in order to solve the problem?
As the other itself suggest we should use
usePreventRemovehook. We can useusePreventRemovehere instead ofuseBeforeRemoveApp/src/pages/iou/request/step/DiscardChangesConfirmation/index.native.tsx
Lines 14 to 27 in d34df44
We can do something like
and in here we can do
Results
Screen.Recording.2025-12-07.at.4.30.46.AM.mov
Optional(not critical or important)
We can add
headerBackButtonMenuEnabled: false,as the error suggests to the description and merchant screen. We can do something like thisWhat alternative solutions did you explore? (Optional)
JmillsExpensify commentedon Dec 9, 2025
Odd. I'll open up for proposals
[-]Expense - The details of an expense don't work after going back when writing a merchant[/-][+][$250] Expense - The details of an expense don't work after going back when writing a merchant[/+]melvin-bot commentedon Dec 9, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021998344786748559397
melvin-bot commentedon Dec 9, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (
External)ZhenjaHorbach commentedon Dec 11, 2025
This proposal makes sense to me!
🎀👀🎀 С+
75 remaining items
ZhenjaHorbach commentedon Mar 24, 2026
@JmillsExpensify
I suppose it's ready for payment
Since the follow up issue will be closed soon and we are done here!
JmillsExpensify commentedon Mar 24, 2026
Payment summary:
mallenexpensify commentedon Mar 24, 2026
@ZhenjaHorbach was there a regression here?
If so, pay should be reduced. If not, please provide reasoning. Thx
ZhenjaHorbach commentedon Mar 24, 2026
We agreed that this is a follow-up issue
#78590 (comment)
Since we fixed the main critical issue, but we needed to add a few additional improvements
So I think we don't need to change a payment
garrettmknight commentedon Mar 25, 2026
$250 approved for @ZhenjaHorbach
melvin-bot commentedon Mar 27, 2026
@tylerkaraszewski, @JmillsExpensify, @ZhenjaHorbach, @Nodebrute Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Mar 27, 2026
@tylerkaraszewski, @JmillsExpensify, @ZhenjaHorbach, @Nodebrute Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Mar 31, 2026
@tylerkaraszewski, @JmillsExpensify, @ZhenjaHorbach, @Nodebrute 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Mar 31, 2026
@tylerkaraszewski, @JmillsExpensify, @ZhenjaHorbach, @Nodebrute Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Apr 2, 2026
@tylerkaraszewski, @JmillsExpensify, @ZhenjaHorbach, @Nodebrute 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
JmillsExpensify commentedon Apr 5, 2026
I think we're done here now, though let me know if I missed something.