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] Workflows - Not here page opens after changing approver and returning from Expenses from #93729
Version Number: 9.4.8-2 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#80449 Email or phone of affected tester (no customers):sdjonisdjosdijodsjo@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Workspace Settings
Action Performed:
Precondition:
Invite User A and B to the workspace.
Go to staging.new.expensify.com
Go to workspace settings > Workflows.
Click Add approval workflow.
Create a workflow where User A submits to User B.
Open the created workflow.
Change the approver to User A.
Click Expenses from.
Click RHP back button.
Expected Result:
App will return to confirm page.
Actual Result:
Not here page opens after changing approver and returning from Expenses from.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
On an existing approval workflow, after changing the approver and opening Expenses from, pressing the RHP back button shows the "Not here" (full‑page not‑found) view instead of returning to the workflow edit page. Regressed by #80449 (deploy blocker).
What is the root cause of that problem?
When you open "Expenses from" from the edit page, handleExpensesFromPress builds the backTo route keyed by the current (mutated) draft approver:
The WORKSPACE_WORKFLOWS_APPROVALS_EDIT page resolves the workflow by matching firstApproverEmail against the persistedpolicy.employeeList (EditPage:88‑101), and renders NotFound when no match is found (!currentApprovalWorkflow).
After step 6 (change approver from User B → User A), the draft approvers[0] is User A, but the change hasn't been saved — the persisted workflow is still keyed by User B. So backTo points at .../edit/userA, which has no matching persisted workflow → "Not here". Changing the approver is exactly what makes the draft approver diverge from the persisted one, which is why that step is required to reproduce.
The companion goBack in the ExpensesFrom page already does this correctly, keying off approvalWorkflow.originalApprovers[0].email — the editor was left using the mutated approvers instead.
Why originalApprovers is the right key
originalApprovers is a snapshot set once in selectApprovalWorkflowForEdit (originalApprovers: workflow.approvers) and is never touched by setApprovalWorkflowApprover, so it always reflects the persisted first approver that the EDIT route lookup expects.
What changes do you think we should make in order to solve the problem?
and update the useCallback dependency array accordingly (approvalWorkflow.originalApprovers instead of approvalWorkflow.approvers). This matches the ExpensesFrom goBack logic and ensures the backTo route always resolves to the persisted workflow.
What alternative solutions did you explore?
Adding a loading guard around !currentApprovalWorkflow in shouldShowNotFoundView. Rejected — the lookup correctly returns nothing here (the keyed workflow genuinely doesn't exist), so this would only mask the wrong route, not fix it.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93729) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-][Due for payment 2026-06-24] [Due for payment 2026-06-23] [$250] Workflows - Not here page opens after changing approver and returning from Expenses from[/-][+][$250] Workflows - Not here page opens after changing approver and returning from Expenses from[/+]on Jul 9, 2026
[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.
Activity
applause-bot commentedon Jun 16, 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/bce55871af6c191383aa2795dea7343867bde053b6200a629e144afa736f9d0a
melvin-bot commentedon Jun 16, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #80449
melvin-bot commentedon Jun 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 16, 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:
MelvinBot commentedon Jun 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On an existing approval workflow, after changing the approver and opening Expenses from, pressing the RHP back button shows the "Not here" (full‑page not‑found) view instead of returning to the workflow edit page. Regressed by #80449 (deploy blocker).
What is the root cause of that problem?
When you open "Expenses from" from the edit page,
handleExpensesFromPressbuilds thebackToroute keyed by the current (mutated) draft approver:The
WORKSPACE_WORKFLOWS_APPROVALS_EDITpage resolves the workflow by matchingfirstApproverEmailagainst the persistedpolicy.employeeList(EditPage:88‑101), and renders NotFound when no match is found (!currentApprovalWorkflow).After step 6 (change approver from User B → User A), the draft
approvers[0]is User A, but the change hasn't been saved — the persisted workflow is still keyed by User B. SobackTopoints at.../edit/userA, which has no matching persisted workflow → "Not here". Changing the approver is exactly what makes the draft approver diverge from the persisted one, which is why that step is required to reproduce.The companion
goBackin the ExpensesFrom page already does this correctly, keying offapprovalWorkflow.originalApprovers[0].email— the editor was left using the mutatedapproversinstead.Why
originalApproversis the right keyoriginalApproversis a snapshot set once inselectApprovalWorkflowForEdit(originalApprovers: workflow.approvers) and is never touched bysetApprovalWorkflowApprover, so it always reflects the persisted first approver that the EDIT route lookup expects.What changes do you think we should make in order to solve the problem?
In
ApprovalWorkflowEditor.tsxhandleExpensesFromPress, key the EDITbackTooff the persisted approver instead of the draft:and update the
useCallbackdependency array accordingly (approvalWorkflow.originalApproversinstead ofapprovalWorkflow.approvers). This matches the ExpensesFromgoBacklogic and ensures thebackToroute always resolves to the persisted workflow.What alternative solutions did you explore?
!currentApprovalWorkflowinshouldShowNotFoundView. Rejected — the lookup correctly returns nothing here (the keyed workflow genuinely doesn't exist), so this would only mask the wrong route, not fix it.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93729)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
puneetlath commentedon Jun 16, 2026
@MelvinBot implement this.
MelvinBot commentedon Jun 16, 2026
🤖 Draft PR created: #93733
Please mark it as "Ready for review" when it is ready for review.
18 remaining items
melvin-bot commentedon Jun 25, 2026
@situchan Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
melvin-bot commentedon Jun 29, 2026
@situchan 12 days overdue. Walking. Toward. The. Light...
melvin-bot commentedon Jul 2, 2026
This issue has not been updated in over 14 days. @youssef-lr, @situchan eroding to Weekly issue.
situchan commentedon Jul 9, 2026
C+ payment is pending for PR review
cc: @mallenexpensify
[-][Due for payment 2026-06-24] [Due for payment 2026-06-23] [$250] Workflows - Not here page opens after changing approver and returning from Expenses from[/-][+][$250] Workflows - Not here page opens after changing approver and returning from Expenses from[/+]mallenexpensify commentedon Jul 9, 2026
Please comment and tag me if/when payment is due, thx
situchan commentedon Jul 9, 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: [$250] Workflows - Not here page opens after changing approver and returning from Expenses from #93729 (comment)
[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/658131
Regression Test Proposal
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-28b9-a73b-8825-8963c4857644situchan commentedon Jul 9, 2026
@mallenexpensify Payment is due
mallenexpensify commentedon Jul 9, 2026
Payment Summary
Contributor+: @situchan due $250 via NewDot
^ Test case created. Thx
laurenreidexpensify commentedon Jul 20, 2026
$250 approved for @situchan