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
QAB-App returns to Create expense after enter amount and click Next if Create expense from QAB #84363
👋 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.
Classification: Frontend bug Causing PR: #83888 - "Bump Onyx to 3.0.42" by @fabioh8010 (High confidence) Related Issues: None
Recommendation: REVERT
PR #83888 updated react-native-onyx from 3.0.41 to 3.0.42. This update appears to have introduced a regression in promise handling that breaks the expense creation flow from QAB.
Labels: Keeping DeployBlockerCash (this is a Frontend bug blocking App deploy). Removing DeployBlocker since this does not affect the backend.
Detailed Analysis
Evidence
The bug occurs specifically when creating a manual expense from the Quick Action Button (QAB):
User navigates to Inbox tab and clicks + button
Clicks "Create expense" at QAB
Types amount and clicks Next
Expected: Should navigate to confirmation page
Actual: App backs to Create expense page (navigation fails)
The bug is reproducible on staging (v9.3.32-0) but NOT on production, indicating it was introduced in this deploy.
Verification
In /home/runner/_work/App/App/src/pages/iou/request/step/IOURequestStepAmount.tsx at lines 319-321:
This code path is used when creating expenses from a workspace chat via QAB. The function setMoneyRequestParticipantsFromReport (defined in /home/runner/_work/App/App/src/libs/actions/IOU/index.ts at lines 12418-12424) returns an Onyx.merge() promise:
PR #83888 updated Onyx from 3.0.41 to 3.0.42, which included PR #732 in react-native-onyx. If this Onyx update changed promise behavior or introduced a regression in how Onyx.merge() promises resolve, it would cause the .then() callback to never execute, preventing navigation to the confirmation page and causing the app to "back" to the create expense page.
Root Cause
The Onyx 3.0.42 update introduced a regression in promise handling that prevents the navigation callback from executing after setMoneyRequestParticipantsFromReport completes. This specifically affects the QAB expense creation flow where the code relies on promise resolution to trigger navigation.
Please re-state the problem that we are trying to solve in this issue.
When a user creates a manual expense in a workspace chat, navigates to Inbox, clicks the FAB (+), selects "Create expense" from the QAB (Quick Action Button), enters an amount, and clicks Next — the app navigates back to the "Create expense" page instead of showing the confirmation page.
Onyx.set(`...TRANSACTION_DRAFT...`,{
isFromFloatingActionButton,
...(requestType&&{iouRequestType: requestType}),// NEW in #84317});
This causes a chain reaction:
The QAB calls startMoneyRequest(SUBMIT, chatReportID, 'manual', ...) which pre-sets iouRequestType: 'manual' on the draft — but does not set transactionID.
When IOURequestStartPage renders, resetIOUTypeIfChanged (src/pages/iou/request/IOURequestStartPage.tsx:181) checks transaction?.iouRequestType === newIOUType. Since both are 'manual', it returns early and skipsinitMoneyRequest.
initMoneyRequest is the only function that sets transactionID on the draft transaction. Since it was skipped, transactionID remains undefined.
When the user enters an amount and clicks Next, the app navigates to the confirmation page. The guard useEffect in IOURequestStepConfirmation (src/pages/iou/request/step/IOURequestStepConfirmation.tsx:402-415) checks transaction?.transactionID — finds it undefined — and calls startMoneyRequest() again, which navigates the user back to the "Create expense" page.
Before PR #84317, iouRequestType was never pre-set in startMoneyRequest, so resetIOUTypeIfChanged would always find a mismatch and properly call initMoneyRequest (which sets transactionID). This is why the bug only appears on staging.
What changes do you think we should make in order to solve the problem?
In startMoneyRequest at src/libs/actions/IOU/index.ts:1378, add transactionID: CONST.IOU.OPTIMISTIC_TRANSACTION_ID to the Onyx.set call so the draft transaction is always initialized with a valid transactionID:
Onyx.set(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${CONST.IOU.OPTIMISTIC_TRANSACTION_ID}`,{
isFromFloatingActionButton,transactionID: CONST.IOU.OPTIMISTIC_TRANSACTION_ID,// add this
...(requestType&&{iouRequestType: requestType}),});
This ensures the confirmation page's guard useEffect sees a valid transactionID and does not redirect back, regardless of whether initMoneyRequest is called later.
What alternative solutions did you explore? (Optional)
Modify resetIOUTypeIfChanged to also check for transactionID existence — e.g., skip the early return if transaction?.transactionID is missing. This is more defensive but changes the semantics of resetIOUTypeIfChanged and could have broader side effects.
The recommended fix (adding transactionID to Onyx.set) is the most targeted — it ensures the draft is properly initialized without changing any other behavior.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon Mar 6, 2026
Triggered auto assignment to @stephanieelliott (
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.melvin-bot commentedon Mar 6, 2026
Triggered auto assignment to @Julesssss (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Mar 6, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 6, 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:
OSBotify commentedon Mar 6, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #83888 - "Bump Onyx to 3.0.42" by @fabioh8010 (High confidence)
Related Issues: None
Recommendation: REVERT
PR #83888 updated react-native-onyx from 3.0.41 to 3.0.42. This update appears to have introduced a regression in promise handling that breaks the expense creation flow from QAB.
Labels: Keeping
DeployBlockerCash(this is a Frontend bug blocking App deploy). RemovingDeployBlockersince this does not affect the backend.Detailed Analysis
Evidence
The bug occurs specifically when creating a manual expense from the Quick Action Button (QAB):
The bug is reproducible on staging (v9.3.32-0) but NOT on production, indicating it was introduced in this deploy.
Verification
In
/home/runner/_work/App/App/src/pages/iou/request/step/IOURequestStepAmount.tsxat lines 319-321:This code path is used when creating expenses from a workspace chat via QAB. The function
setMoneyRequestParticipantsFromReport(defined in/home/runner/_work/App/App/src/libs/actions/IOU/index.tsat lines 12418-12424) returns anOnyx.merge()promise:PR #83888 updated Onyx from 3.0.41 to 3.0.42, which included PR #732 in react-native-onyx. If this Onyx update changed promise behavior or introduced a regression in how
Onyx.merge()promises resolve, it would cause the.then()callback to never execute, preventing navigation to the confirmation page and causing the app to "back" to the create expense page.Root Cause
The Onyx 3.0.42 update introduced a regression in promise handling that prevents the navigation callback from executing after
setMoneyRequestParticipantsFromReportcompletes. This specifically affects the QAB expense creation flow where the code relies on promise resolution to trigger navigation.mitarachim commentedon Mar 6, 2026
This issue is repro on all PRs in the current deployment checklist. Could you please double check if it's not introduced by #83103 ?
MelvinBot commentedon Mar 6, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user creates a manual expense in a workspace chat, navigates to Inbox, clicks the FAB (+), selects "Create expense" from the QAB (Quick Action Button), enters an amount, and clicks Next — the app navigates back to the "Create expense" page instead of showing the confirmation page.
What is the root cause of that problem?
PR #84317 added
iouRequestTypeto the transaction draft insidestartMoneyRequest(src/libs/actions/IOU/index.ts:1378-1381):This causes a chain reaction:
startMoneyRequest(SUBMIT, chatReportID, 'manual', ...)which pre-setsiouRequestType: 'manual'on the draft — but does not settransactionID.IOURequestStartPagerenders,resetIOUTypeIfChanged(src/pages/iou/request/IOURequestStartPage.tsx:181) checkstransaction?.iouRequestType === newIOUType. Since both are'manual', it returns early and skipsinitMoneyRequest.initMoneyRequestis the only function that setstransactionIDon the draft transaction. Since it was skipped,transactionIDremainsundefined.useEffectinIOURequestStepConfirmation(src/pages/iou/request/step/IOURequestStepConfirmation.tsx:402-415) checkstransaction?.transactionID— finds itundefined— and callsstartMoneyRequest()again, which navigates the user back to the "Create expense" page.Before PR #84317,
iouRequestTypewas never pre-set instartMoneyRequest, soresetIOUTypeIfChangedwould always find a mismatch and properly callinitMoneyRequest(which setstransactionID). This is why the bug only appears on staging.What changes do you think we should make in order to solve the problem?
In
startMoneyRequestatsrc/libs/actions/IOU/index.ts:1378, addtransactionID: CONST.IOU.OPTIMISTIC_TRANSACTION_IDto theOnyx.setcall so the draft transaction is always initialized with a validtransactionID:This ensures the confirmation page's guard
useEffectsees a validtransactionIDand does not redirect back, regardless of whetherinitMoneyRequestis called later.What alternative solutions did you explore? (Optional)
iouRequestTypeaddition from PR [No QA] Sentry logs for Scan shortcut #84317 — This would fix the bug but would break the scan shortcut telemetry that PR [No QA] Sentry logs for Scan shortcut #84317 was designed to support (useScanShortcutSpanneedsiouRequestTypeon the draft to detect scan shortcut flows).resetIOUTypeIfChangedto also check fortransactionIDexistence — e.g., skip the early return iftransaction?.transactionIDis missing. This is more defensive but changes the semantics ofresetIOUTypeIfChangedand could have broader side effects.The recommended fix (adding
transactionIDtoOnyx.set) is the most targeted — it ensures the draft is properly initialized without changing any other behavior.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.melvin-bot commentedon Mar 6, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
fabioh8010 commentedon Mar 6, 2026
It doesn't seem anywhere related to Expensify/react-native-onyx#732, as that PR introduces a change only in SQLite layer that is used by native apps
Julesssss commentedon Mar 6, 2026
Verified that this PR introduced the regression.
Julesssss commentedon Mar 6, 2026
Fixed on staging
9.3.32-2alreadyFix #84363
IuliiaHerets commentedon Mar 9, 2026
v9.3.33-1 PR:84552
Windows 11 / Chrome
not repro, but I notice the currency in QAB is different from the workspace that recently used
confirm.mp4