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
[$175] [Due for payment 2026-10-05] iOS - Self chat opens instead of the Restricted screen when swiping back #101835
Version Number: 9.4.91-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:#100584 Email or phone of affected tester (no customers):ilon.ka43123+2304accounta@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: iPhone 13 iOS 26.6 App Component: Money Requests
Action Performed:
Precondition: The user has only an expired workspace payment requirement.
Open the app
Navigate to your Self-DM.
Create a new expense.
Select Submit to my employer.
Verify that you are redirected to the Restricted screen.
Tap Go to Subscription
Swipe back
Expected Result:
The Restricted screen opens when swiping back from the Subscription page
Actual Result:
Self chat opens instead of the Restricted screen when swiping back from the Subscription page. (Swiping back should have the same behavior as tapping the back button)
👋 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.
"Go to Subscription" tears the Restricted screen off the navigation stack before navigating away, so there is nothing left for the swipe gesture to go back to.
WorkspaceOwnerRestrictedAction/index.native.tsx:30-33 calls Navigation.closeRHPFlow() and then Navigation.navigate(...). Because the Restricted screen is the only route in that RHP, closeRHPFlow.ts:26-32 pops the entire RIGHT_MODAL_NAVIGATOR off the root stack. Subscription then lands in the Settings split navigator inside TAB_NAVIGATOR, leaving the root stack as [Tab → Self-DM] → [Tab → Subscription]. The Restricted screen is gone.
The header back button masks this. It calls Navigation.goBack(backTo), which reaches Navigation.ts:501-510, finds indexOfBackToRoute === -1, and falls into the REPLACE branch that re-creates the Restricted RHP from the URL. The iOS native swipe gesture never runs that code — react-navigation just pops the top root route, revealing the Self-DM underneath. backTo is an app-level convention with no gesture equivalent, so the two paths can't agree while the target route is destroyed.
What changes do you think we should make in order to solve the problem?
Roll forward. In WorkspaceOwnerRestrictedAction/index.native.tsx, delete the Navigation.closeRHPFlow() line and let Navigation.navigate run on its own. linkTo already converts a tab-navigator target into a PUSH when the top root route isn't a tab navigator — RHP is the case it was written for. The stack becomes [Tab → Self-DM] → [RHP → Restricted] → [Tab → Subscription], so both the gesture and goBack(backTo) land on the Restricted screen. There's in-repo precedent for the same reasoning in DynamicIOURequestStepDistance.tsx:413-419.
Companion change required. The Restricted page stays mounted under the pushed Subscription screen, and its auto-dismiss effect at WorkspaceRestrictedActionPage.tsx:69-76 has no focus guard. If the user adds a card on the Subscription page, the billing NVPs update and the unfocused Restricted page fires Navigation.goBack(), yanking Subscription out from under them. Gate that effect on useIsFocused().
What alternative solutions did you explore?
Revert #100584 — rejected. It changes no navigation code at all (StartExpenseFlows.ts, PolicyUtils.ts, SubscriptionUtils.ts, MoneyRequestHeaderSecondaryActions.tsx, DynamicReportDetailsPage.tsx, ChatActionableButtons.tsx, selectors/Policy.ts + tests). Reverting reintroduces a worse bug: expenses created against a workspace with an expired required payment, bypassing the paywall. The closeRHPFlow() + navigate() pattern dates to Hide add payments button on mobile, merged 2025-10-22.
Demote instead of fixing — viable fallback. This is a navigation inconsistency with no data loss, already live in production via other paths. If the fix is judged too risky mid-deploy, demoting is defensible.
Why this reproduces in production today
The reporter's "N/A in production" is correct only for the single-workspace precondition, which is exactly the gap #100584 closed. The Restricted screen has 20+ other entry points already on production — including ParticipantSearchResults.tsx:504 and QuickActionMenuItem.tsx:164.
On production, with 2+ workspaces: Self-DM → create expense → Submit to my employer → pick the expired workspace → Restricted → Go to Subscription → swipe back → Self-DM. Same bug.
Not verified: I could not run an iOS simulator, so the proposed fix is reasoned from the linkTo/goUp source rather than empirically confirmed. I also inferred the tester is the policy owner — workspace.restrictedAction.goToSubscription only exists in the owner variant. The admin and member variants navigate to a report instead and are unaffected.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/101835) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
@lakchote, this wasn’t caused by my PR. It was already hidden before my PR was merged, and it has now appeared again. My PR didn’t make any changes to the back navigation behavior. I'll work with Melvin to investigate and fix this. Thanks!
Thanks, @marufsharifi. It’s true that the back-navigation code predates your PR. Your change now makes this path reachable in this flow, exposing the existing issue, so we should fix it.
This wasn't a regression of our changes based on this #101835 (comment). thanks.
@marufsharifi fair enough, the swipe back bug was already in the Restricted screen and reachable from other entry points before your PR, so I won't count it as a regression on your side.
Activity
applause-bot commentedon Sep 22, 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/ea809d11f8f636a65393fca3a94f833afec7ede410caa47e248245eb8156e600
melvin-bot commentedon Sep 22, 2026
Triggered auto assignment to @Valforte (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Sep 22, 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 22, 2026
@marufsharifi @JmillsExpensify you have been assigned to this deploy blocker because you reviewed the offending PR: #100584
melvin-bot commentedon Sep 22, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Sep 22, 2026
Proposal
What is the root cause of that problem?
"Go to Subscription" tears the Restricted screen off the navigation stack before navigating away, so there is nothing left for the swipe gesture to go back to.
WorkspaceOwnerRestrictedAction/index.native.tsx:30-33callsNavigation.closeRHPFlow()and thenNavigation.navigate(...). Because the Restricted screen is the only route in that RHP,closeRHPFlow.ts:26-32pops the entireRIGHT_MODAL_NAVIGATORoff the root stack. Subscription then lands in the Settings split navigator insideTAB_NAVIGATOR, leaving the root stack as[Tab → Self-DM]→[Tab → Subscription]. The Restricted screen is gone.The header back button masks this. It calls
Navigation.goBack(backTo), which reachesNavigation.ts:501-510, findsindexOfBackToRoute === -1, and falls into the REPLACE branch that re-creates the Restricted RHP from the URL. The iOS native swipe gesture never runs that code — react-navigation just pops the top root route, revealing the Self-DM underneath.backTois an app-level convention with no gesture equivalent, so the two paths can't agree while the target route is destroyed.What changes do you think we should make in order to solve the problem?
Roll forward. In
WorkspaceOwnerRestrictedAction/index.native.tsx, delete theNavigation.closeRHPFlow()line and letNavigation.navigaterun on its own.linkToalready converts a tab-navigator target into a PUSH when the top root route isn't a tab navigator — RHP is the case it was written for. The stack becomes[Tab → Self-DM]→[RHP → Restricted]→[Tab → Subscription], so both the gesture andgoBack(backTo)land on the Restricted screen. There's in-repo precedent for the same reasoning inDynamicIOURequestStepDistance.tsx:413-419.Companion change required. The Restricted page stays mounted under the pushed Subscription screen, and its auto-dismiss effect at
WorkspaceRestrictedActionPage.tsx:69-76has no focus guard. If the user adds a card on the Subscription page, the billing NVPs update and the unfocused Restricted page firesNavigation.goBack(), yanking Subscription out from under them. Gate that effect onuseIsFocused().What alternative solutions did you explore?
Revert #100584 — rejected. It changes no navigation code at all (
StartExpenseFlows.ts,PolicyUtils.ts,SubscriptionUtils.ts,MoneyRequestHeaderSecondaryActions.tsx,DynamicReportDetailsPage.tsx,ChatActionableButtons.tsx,selectors/Policy.ts+ tests). Reverting reintroduces a worse bug: expenses created against a workspace with an expired required payment, bypassing the paywall. ThecloseRHPFlow()+navigate()pattern dates to Hide add payments button on mobile, merged 2025-10-22.Demote instead of fixing — viable fallback. This is a navigation inconsistency with no data loss, already live in production via other paths. If the fix is judged too risky mid-deploy, demoting is defensible.
Why this reproduces in production today
The reporter's "N/A in production" is correct only for the single-workspace precondition, which is exactly the gap #100584 closed. The Restricted screen has 20+ other entry points already on production — including
ParticipantSearchResults.tsx:504andQuickActionMenuItem.tsx:164.On production, with 2+ workspaces: Self-DM → create expense → Submit to my employer → pick the expired workspace → Restricted → Go to Subscription → swipe back → Self-DM. Same bug.
Not verified: I could not run an iOS simulator, so the proposed fix is reasoned from the
linkTo/goUpsource rather than empirically confirmed. I also inferred the tester is the policy owner —workspace.restrictedAction.goToSubscriptiononly exists in the owner variant. The admin and member variants navigate to a report instead and are unaffected.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/101835)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
lakchote commentedon Sep 22, 2026
@marufsharifi coming from #100584
marufsharifi commentedon Sep 22, 2026
@lakchote, this wasn’t caused by my PR. It was already hidden before my PR was merged, and it has now appeared again. My PR didn’t make any changes to the back navigation behavior. I'll work with Melvin to investigate and fix this. Thanks!
32 remaining items
marufsharifi commentedon Oct 5, 2026
This wasn't a regression of our changes based on this #101835 (comment). thanks.
lakchote commentedon Oct 6, 2026
@marufsharifi fair enough, the swipe back bug was already in the Restricted screen and reachable from other entry points before your PR, so I won't count it as a regression on your side.
melvin-bot commentedon Oct 9, 2026
Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.
melvin-bot commentedon Oct 9, 2026
Payment Summary
Resolving PRs:
Upwork Job
BugZero Checklist (@mallenexpensify)
melvin-bot commentedon Oct 12, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mallenexpensify commentedon Oct 12, 2026
@marufsharifi can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022105205322325361045
marufsharifi commentedon Oct 13, 2026
@mallenexpensify, I've accepted the offer. thanks.
mallenexpensify commentedon Oct 13, 2026
Payment Summary
Contributor: @marufsharifi paid $175 via Upwork