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-10-05] Insights - Confirm page is not cleared when reopened from Create expense button on Insights #102066
Version Number: 9.4.92-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:#101218 Email or phone of affected tester (no customers):jsdoijnodsdisojo@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Account has no expense.
Enable insightsPage beta.
Go to staging.new.expensify,com
Open FAB > Create expense > Manual.
Enter amount on confirm page.
Click RHP back button.
Go to Insights.
Click Create expense.
Expected Result:
Confirm page will be cleared when reopened from Create expense button on Insights.
Actual Result:
Confirm page is not cleared when reopened from Create expense button on Insights.
👋 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: [NoQA] [Insights] Render the Spend dashboard (Expensify/App#101218) by mhawryluk, merged 2026-09-22 (High confidence) Related Issues: none
Recommendation: ROLL FORWARD
The bug is a one-argument omission in a brand-new, beta-gated (insightsPage) screen, so a targeted fix is far cheaper and safer than reverting a ~1.4k-line PR that the whole Insights dashboard and several follow-up Insights PRs build on.
Assigned: mhawryluk (PR author), truph01, cristipaval, luacmartins (approving reviewers) from the highest-confidence causing PR only Labels: No changes. DeployBlockerCash is kept (an App PR caused this and the fix is in App). DeployBlocker was not present, so nothing was removed.
📋 Detailed Analysis
Evidence
The "Create expense" button in the Insights no-expenses state calls startMoneyRequest with undefined for the draftTransactionIDs parameter: InsightsNoExpensesState.tsx#L30
Every other "Create expense" entry point (Search empty view, Search header create button, Getting Started section, Submit expense page, FAB menu items, Scan actions) passes draftTransactionIDs. The Insights button is the only one of them passing undefined.
Staging only, as reported: the Insights dashboard does not exist in production, and the whole page is gated behind the insightsPage beta (InsightsPage.tsx#L27). This matches "N/A - new feature, doesn't exist in prod".
Platform-independent, matching the report that Android/iOS/Chrome/Safari are all affected: the defect is in shared Onyx/action logic, not in any platform-specific file.
Expensify/App#101218 added this file from scratch (new file mode 100644), including the exact startMoneyRequest(CONST.IOU.TYPE.CREATE, generateReportID(), undefined) line, and wired it into the dashboard (return <InsightsNoExpensesState />; in InsightsDashboard.tsx).
The only commit touching this path on staging is 75ad398 ("Handle empty states", 2026-09-21), which belongs to Expensify/App#101218 (merge commit fcacbdf, merged 2026-09-22T16:03:36Z). No other PR has modified it.
Expensify/App#101218 is on the open deploy checklist for 9.4.92-2, and the bug was reported against 9.4.92-0, so the timeline lines up.
The button is the only expense-creation entry point in src/pages/Insights/, so there is no second candidate within the feature.
Root Cause
startMoneyRequest does not clear the draft transaction itself. It delegates to clearMoneyRequest, which only nulls out the draft keys it is explicitly given:
So when the Insights button passes undefined, the resulting Onyx.multiSet only writes the SKIP_CONFIRMATION flag and never deletes transactionDraft_<OPTIMISTIC_TRANSACTION_ID>. The flow then navigates to MONEY_REQUEST_CREATE for that same CONST.IOU.OPTIMISTIC_TRANSACTION_ID (MoneyRequest.ts#L533-L554), which rehydrates the stale draft left over from the abandoned FAB attempt, so the previously typed amount is still on the confirm page.
Suggested fix
In src/pages/Insights/states/InsightsNoExpensesState.tsx, read the draft IDs the same way every other entry point does and pass them to startMoneyRequest:
This bug looks like a recurring, mechanically detectable pattern, so it may be worth a coding-standards rule so the AI reviewer catches the next one. Proposed for Expensify/App:
Rule:CONSISTENCY-18 Pass live draft transaction IDs when starting an expense flow
Condition: Flag any call to startMoneyRequest / startDistanceRequest / clearMoneyRequest that passes a literal undefined for the draftTransactionIDs argument. Read the IDs with useOnyx(ONYXKEYS.COLLECTION.TRANSACTION_DRAFT, {selector: validTransactionDraftIDsSelector}) and pass them instead, so the previous abandoned draft is actually cleared.
Why:clearMoneyRequest only deletes the draft keys it is handed, and getRemoveDraftTransactionsByIDsData returns {} for an empty or missing list, so passing undefined silently skips the reset and the next entry into the flow resurrects the stale transactionDraft_<OPTIMISTIC_TRANSACTION_ID>. This exact omission caused this deploy blocker.
Search pattern:rg -n 'start(Money|Distance)Request\([^)]*,\s*undefined\s*,' src and rg -n 'clearMoneyRequest\([^,]+,\s*undefined' (also matches the multi-line call form when run with -U)
Other call sites already match the offending shape (for example IOURequestRedirectToStartPage.tsx#L51-L57), which is why this looks generalizable rather than one-off. The full rule file, with the ❌/✅ code inline in Expensify/App's app-coding-standards format, would go in Expensify/App itself. If it's worth adding, a maintainer can open it there as a draft PR.
changed the title [-]Insights - Confirm page is not cleared when reopened from Create expense button on Insights[/-][+][Due for payment 2026-10-05] Insights - Confirm page is not cleared when reopened from Create expense button on Insights[/+]on Sep 28, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.94-0 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-10-05. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]
Activity
applause-bot commentedon Sep 23, 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/42d5dfd2b82b19129eaab64a5f1e503ccdd34193c5593ee5fd4d9c49b5b9353e
github-actions commentedon Sep 23, 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:
melvin-bot commentedon Sep 23, 2026
Triggered auto assignment to @MonilBhavsar (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Sep 23, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Sep 23, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: [NoQA] [Insights] Render the Spend dashboard (
Expensify/App#101218) bymhawryluk, merged 2026-09-22 (High confidence)Related Issues: none
Recommendation: ROLL FORWARD
The bug is a one-argument omission in a brand-new, beta-gated (
insightsPage) screen, so a targeted fix is far cheaper and safer than reverting a ~1.4k-line PR that the whole Insights dashboard and several follow-up Insights PRs build on.Assigned:
mhawryluk(PR author),truph01,cristipaval,luacmartins(approving reviewers) from the highest-confidence causing PR onlyLabels: No changes.
DeployBlockerCashis kept (an App PR caused this and the fix is in App).DeployBlockerwas not present, so nothing was removed.📋 Detailed Analysis
Evidence
startMoneyRequestwithundefinedfor thedraftTransactionIDsparameter:InsightsNoExpensesState.tsx#L30QuickCreationActionsBar/index.tsx#L51and#L133draftTransactionIDs. The Insights button is the only one of them passingundefined.insightsPagebeta (InsightsPage.tsx#L27). This matches "N/A - new feature, doesn't exist in prod".Verification
src/pages/Insights/states/InsightsNoExpensesState.tsxExpensify/App#101218added this file from scratch (new file mode 100644), including the exactstartMoneyRequest(CONST.IOU.TYPE.CREATE, generateReportID(), undefined)line, and wired it into the dashboard (return <InsightsNoExpensesState />;inInsightsDashboard.tsx).stagingis75ad398("Handle empty states", 2026-09-21), which belongs toExpensify/App#101218(merge commitfcacbdf, merged 2026-09-22T16:03:36Z). No other PR has modified it.Expensify/App#101218is on the open deploy checklist for 9.4.92-2, and the bug was reported against 9.4.92-0, so the timeline lines up.src/pages/Insights/, so there is no second candidate within the feature.Root Cause
startMoneyRequestdoes not clear the draft transaction itself. It delegates toclearMoneyRequest, which only nulls out the draft keys it is explicitly given:src/libs/actions/IOU/MoneyRequest.ts#L501-L507And
getRemoveDraftTransactionsByIDsDatashort-circuits to an empty object when the list is missing:So when the Insights button passes
undefined, the resultingOnyx.multiSetonly writes theSKIP_CONFIRMATIONflag and never deletestransactionDraft_<OPTIMISTIC_TRANSACTION_ID>. The flow then navigates toMONEY_REQUEST_CREATEfor that sameCONST.IOU.OPTIMISTIC_TRANSACTION_ID(MoneyRequest.ts#L533-L554), which rehydrates the stale draft left over from the abandoned FAB attempt, so the previously typed amount is still on the confirm page.Suggested fix
In
src/pages/Insights/states/InsightsNoExpensesState.tsx, read the draft IDs the same way every other entry point does and pass them tostartMoneyRequest:(
validTransactionDraftIDsSelectorlives insrc/selectors/TransactionDraft.ts#L13-L19.)💡 Suggested AI code review rule
This bug looks like a recurring, mechanically detectable pattern, so it may be worth a coding-standards rule so the AI reviewer catches the next one. Proposed for
Expensify/App:CONSISTENCY-18Pass live draft transaction IDs when starting an expense flowstartMoneyRequest/startDistanceRequest/clearMoneyRequestthat passes a literalundefinedfor thedraftTransactionIDsargument. Read the IDs withuseOnyx(ONYXKEYS.COLLECTION.TRANSACTION_DRAFT, {selector: validTransactionDraftIDsSelector})and pass them instead, so the previous abandoned draft is actually cleared.clearMoneyRequestonly deletes the draft keys it is handed, andgetRemoveDraftTransactionsByIDsDatareturns{}for an empty or missing list, so passingundefinedsilently skips the reset and the next entry into the flow resurrects the staletransactionDraft_<OPTIMISTIC_TRANSACTION_ID>. This exact omission caused this deploy blocker.rg -n 'start(Money|Distance)Request\([^)]*,\s*undefined\s*,' srcandrg -n 'clearMoneyRequest\([^,]+,\s*undefined'(also matches the multi-line call form when run with-U)App/src/pages/Insights/states/InsightsNoExpensesState.tsx
Line 30 in 19470ec
App/src/components/Navigation/QuickCreationActionsBar/index.tsx
Lines 51 to 133 in 19470ec
Other call sites already match the offending shape (for example
IOURequestRedirectToStartPage.tsx#L51-L57), which is why this looks generalizable rather than one-off. The full rule file, with the ❌/✅ code inline inExpensify/App'sapp-coding-standardsformat, would go inExpensify/Appitself. If it's worth adding, a maintainer can open it there as a draft PR.8 remaining items
[-]Insights - Confirm page is not cleared when reopened from Create expense button on Insights[/-][+][Due for payment 2026-10-05] Insights - Confirm page is not cleared when reopened from Create expense button on Insights[/+]melvin-bot commentedon Sep 28, 2026
@truph01
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.94-0 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-10-05. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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 Sep 28, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)truph01 commentedon Sep 30, 2026
This is follow-up issue, no payment is needed.