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-06-11] Manual tab shows scan confirm page after uploading receipt on Scan and returning to Manual #90652
Version Number: 9.3.74-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:#87920 Email or phone of affected tester (no customers):sdsdjoijdoisnjodis@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
Go to staging.new.expensify.com
Go to workspace chat.
Click + > Create expense > Scan.
Upload a receipt.
Click RHP back button.
Go to Manual tab.
Expected Result:
Manual tab will not show scan confirm page.
Actual Result:
Manual tab shows scan confirm page after uploading receipt on Scan and returning to Manual.
👋 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: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence) Related Issues: #82586 (the issue this PR fixed)
Recommendation: REVERT
PR #87920 introduced a regression in the newManualExpenseFlow beta: after uploading a receipt on the Scan tab and navigating back, switching to the Manual tab still shows the scan confirm page instead of the manual input form.
Assigned: @ChavdaSachin (PR author), @ShridharGoel, @puneetlath (approving reviewers) from highest-confidence causing PR only Labels: DeployBlockerCash kept (Frontend bug in App PR). No label changes made.
Details
Evidence
PR Feat: Manual expense flow UI refactor - r3 #87920 changed the CONST.TAB_REQUEST.MANUAL tab in IOURequestStartPage.tsx to render IOURequestStepConfirmation instead of IOURequestStepAmountWithTransactionOnly when isNewManualExpenseFlowEnabled is true.
Before this PR, the Manual tab showed the amount entry step, which is entirely independent from the scan flow state.
After this PR, the Manual tab now shows the confirmation page (IOURequestStepConfirmation), which determines whether to render the scan confirm UI or the manual input form based on requestType.
The requestType is derived from transaction.iouRequestType, which is persisted in the Onyx transaction draft.
When a user uploads a receipt on the Scan tab, iouRequestType is set to SCAN in the draft. Clicking the RHP back button does not reset iouRequestType.
When the user then switches to the Manual tab, IOURequestStepConfirmation is rendered with the same stale SCAN transaction draft, so requestType === CONST.IOU.REQUEST_TYPE.SCAN.
The key logic in IOURequestStepConfirmation.tsx (line 667): const shouldShowSmartScanFields = ... || requestType !== CONST.IOU.REQUEST_TYPE.SCAN; evaluates to false, causing the scan confirmation UI to be shown instead of the manual fields.
Verification
Affected file: src/pages/iou/request/IOURequestStartPage.tsx — PR Feat: Manual expense flow UI refactor - r3 #87920 directly modified this file to embed IOURequestStepConfirmation in the Manual tab.
Affected file: src/pages/iou/request/step/IOURequestStepConfirmation.tsx — PR Feat: Manual expense flow UI refactor - r3 #87920 modified this file extensively (229 additions, 35 deletions) including the shouldShowSmartScanFields logic that controls what UI is displayed.
The bug is staging-only; this feature (newManualExpenseFlow) does not exist in production, consistent with the report ("Reproducible in production?: N/A - new feature, doesn't exist in prod").
Root Cause
When isNewManualExpenseFlowEnabled is active, IOURequestStartPage renders IOURequestStepConfirmation directly in the Manual tab. This confirmation component reads transaction.iouRequestType to determine if it is a scan flow. If a user previously used the Scan tab and uploaded a receipt, the transaction draft retains iouRequestType = SCAN. Switching to the Manual tab renders the same draft through IOURequestStepConfirmation, which then renders the scan confirmation UI because requestType is still SCAN. The Manual tab's embedded confirmation page does not reset or override iouRequestType when the tab changes.
PR Expensify/App#87920 changed the Manual tab to render IOURequestStepConfirmation (when the newManualExpenseFlow beta is enabled) instead of the previous IOURequestStepAmountWithTransactionOnly. The confirmation component contains a FullScreenLoadingIndicator that renders when isScanRequest(transaction) && !Object.values(receiptFiles).length.
When switching tabs, resetIOUTypeIfChanged correctly calls initMoneyRequest, which creates a fresh transaction via Onyx.set(). However, Onyx.set() is asynchronous. During the gap before the Onyx update processes, the Manual tab's IOURequestStepConfirmation reads the stale scan transaction (which still has iouRequestType: 'scan' and receipt data). This causes isScanRequest(transaction) to return true, and the FullScreenLoadingIndicator covers the entire Manual tab UI.
In the receipt-uploaded repro (this issue), the ReceiptFileValidator may also populate receiptFiles from the stale scan data, causing the scan confirmation UI with the receipt image to appear instead of the loading spinner — either way, the Manual tab shows scan-specific content it shouldn't.
What changes do you think we should make in order to solve the problem?
In IOURequestStepConfirmation, the scan-specific loading guard should be skipped when the component is rendered inside the Manual tab. The shouldHideHeader prop is already passed exclusively from the Manual tab in IOURequestStartPage, so it can be used to gate this behavior:
This ensures that when IOURequestStepConfirmation is embedded in the Manual tab (shouldHideHeader === true), it won't show the scan loading indicator even if the transaction hasn't been updated by Onyx yet.
What alternative solutions did you explore? (Optional)
An alternative would be to make initMoneyRequest synchronous or add a local "switching" state to suppress rendering until the Onyx update lands. However, Onyx.set() is inherently async, and adding intermediate state flags introduces complexity. Gating the scan-specific UI with shouldHideHeader is minimal and directly prevents the wrong UI from rendering on the Manual tab.
Related issues & investigation details
Likely duplicate:Expensify/App#90648 — "Confirm page loads infinitely after switching from Scan to Manual tab" — same root cause, slightly different repro (no receipt upload needed).
Also related:Expensify/App#87826 — "Tap back button from scanning confirm page return to Manual tab" — similar symptom, predates this PR.
Key code path:
User uploads receipt on Scan tab → setMoneyRequestReceipt stores receipt data on the transaction draft
User presses back → returns to IOURequestStartPage, transaction draft still has iouRequestType: 'scan' + receipt data
User switches to Manual tab → onTabSelected fires → resetIOUTypeIfChanged('manual') calls initMoneyRequest → Onyx.set() (async)
Manual tab renders IOURequestStepConfirmation which reads stale scan transaction → shows scan UI
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 May 14, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #87920
melvin-bot commentedon May 14, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 14, 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 May 14, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence)
Related Issues: #82586 (the issue this PR fixed)
Recommendation: REVERT
PR #87920 introduced a regression in the
newManualExpenseFlowbeta: after uploading a receipt on the Scan tab and navigating back, switching to the Manual tab still shows the scan confirm page instead of the manual input form.Assigned: @ChavdaSachin (PR author), @ShridharGoel, @puneetlath (approving reviewers) from highest-confidence causing PR only
Labels:
DeployBlockerCashkept (Frontend bug in App PR). No label changes made.Details
Evidence
CONST.TAB_REQUEST.MANUALtab inIOURequestStartPage.tsxto renderIOURequestStepConfirmationinstead ofIOURequestStepAmountWithTransactionOnlywhenisNewManualExpenseFlowEnabledis true.IOURequestStepConfirmation), which determines whether to render the scan confirm UI or the manual input form based onrequestType.requestTypeis derived fromtransaction.iouRequestType, which is persisted in the Onyx transaction draft.iouRequestTypeis set toSCANin the draft. Clicking the RHP back button does not resetiouRequestType.IOURequestStepConfirmationis rendered with the same staleSCANtransaction draft, sorequestType === CONST.IOU.REQUEST_TYPE.SCAN.IOURequestStepConfirmation.tsx(line 667):const shouldShowSmartScanFields = ... || requestType !== CONST.IOU.REQUEST_TYPE.SCAN;evaluates tofalse, causing the scan confirmation UI to be shown instead of the manual fields.Verification
src/pages/iou/request/IOURequestStartPage.tsx— PR Feat: Manual expense flow UI refactor - r3 #87920 directly modified this file to embedIOURequestStepConfirmationin the Manual tab.src/pages/iou/request/step/IOURequestStepConfirmation.tsx— PR Feat: Manual expense flow UI refactor - r3 #87920 modified this file extensively (229 additions, 35 deletions) including theshouldShowSmartScanFieldslogic that controls what UI is displayed.newManualExpenseFlow) does not exist in production, consistent with the report ("Reproducible in production?: N/A - new feature, doesn't exist in prod").Root Cause
When
isNewManualExpenseFlowEnabledis active,IOURequestStartPagerendersIOURequestStepConfirmationdirectly in the Manual tab. This confirmation component readstransaction.iouRequestTypeto determine if it is a scan flow. If a user previously used the Scan tab and uploaded a receipt, the transaction draft retainsiouRequestType = SCAN. Switching to the Manual tab renders the same draft throughIOURequestStepConfirmation, which then renders the scan confirmation UI becauserequestTypeis stillSCAN. The Manual tab's embedded confirmation page does not reset or overrideiouRequestTypewhen the tab changes.MelvinBot commentedon May 14, 2026
Proposal
What is the root cause of that problem?
PR Expensify/App#87920 changed the Manual tab to render
IOURequestStepConfirmation(when thenewManualExpenseFlowbeta is enabled) instead of the previousIOURequestStepAmountWithTransactionOnly. The confirmation component contains aFullScreenLoadingIndicatorthat renders whenisScanRequest(transaction) && !Object.values(receiptFiles).length.When switching tabs,
resetIOUTypeIfChangedcorrectly callsinitMoneyRequest, which creates a fresh transaction viaOnyx.set(). However,Onyx.set()is asynchronous. During the gap before the Onyx update processes, the Manual tab'sIOURequestStepConfirmationreads the stale scan transaction (which still hasiouRequestType: 'scan'and receipt data). This causesisScanRequest(transaction)to returntrue, and theFullScreenLoadingIndicatorcovers the entire Manual tab UI.In the receipt-uploaded repro (this issue), the
ReceiptFileValidatormay also populatereceiptFilesfrom the stale scan data, causing the scan confirmation UI with the receipt image to appear instead of the loading spinner — either way, the Manual tab shows scan-specific content it shouldn't.What changes do you think we should make in order to solve the problem?
In
IOURequestStepConfirmation, the scan-specific loading guard should be skipped when the component is rendered inside the Manual tab. TheshouldHideHeaderprop is already passed exclusively from the Manual tab inIOURequestStartPage, so it can be used to gate this behavior:Change the loading condition at line 757 from:
to:
This ensures that when
IOURequestStepConfirmationis embedded in the Manual tab (shouldHideHeader === true), it won't show the scan loading indicator even if the transaction hasn't been updated by Onyx yet.What alternative solutions did you explore? (Optional)
An alternative would be to make
initMoneyRequestsynchronous or add a local "switching" state to suppress rendering until the Onyx update lands. However,Onyx.set()is inherently async, and adding intermediate state flags introduces complexity. Gating the scan-specific UI withshouldHideHeaderis minimal and directly prevents the wrong UI from rendering on the Manual tab.Related issues & investigation details
Likely duplicate: Expensify/App#90648 — "Confirm page loads infinitely after switching from Scan to Manual tab" — same root cause, slightly different repro (no receipt upload needed).
Also related: Expensify/App#87826 — "Tap back button from scanning confirm page return to Manual tab" — similar symptom, predates this PR.
Key code path:
setMoneyRequestReceiptstores receipt data on the transaction draftIOURequestStartPage, transaction draft still hasiouRequestType: 'scan'+ receipt dataonTabSelectedfires →resetIOUTypeIfChanged('manual')callsinitMoneyRequest→Onyx.set()(async)IOURequestStepConfirmationwhich reads stale scan transaction → shows scan UINext 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.ChavdaSachin commentedon May 14, 2026
NAB: only happens in the beta accounts
puneetlath commentedon May 14, 2026
Demoting.
28 remaining items
trjExpensify commentedon Jun 5, 2026
Assigned you.
melvin-bot commentedon Jun 8, 2026
@thelullabyy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Jun 10, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jun 10, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Jun 15, 2026
Payment Summary
Contributor: @dukenv0307 due $250 via NewDot
Contributor+: @thelullabyy due $250 via NewDot
I think that's correct, don't think we need a test case cuz that'll likely be taken care of as part of the project.
quinthar commentedon Jun 29, 2026
Approved $250 to @dukenv0307