Skip to content

[$175] [Due for payment 2026-10-05] iOS - Self chat opens instead of the Restricted screen when swiping back #101835

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


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.

  1. Open the app
  2. Navigate to your Self-DM.
  3. Create a new expense.
  4. Select Submit to my employer.
  5. Verify that you are redirected to the Restricted screen.
  6. Tap Go to Subscription
  7. 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)

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

iOS_Swipe_ScreenRecording_09-21-2026_16-15-17_1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Rizky Gunawan
Bug ID: 7265768

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 22, 2026
  2. applause-bot commented on Sep 22, 2026

    @applause-bot
    Author

    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

  3. melvin-bot commented on Sep 22, 2026

    @melvin-bot

    Triggered auto assignment to @Valforte (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. github-actions commented on Sep 22, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. melvin-bot commented on Sep 22, 2026

    @melvin-bot

    @marufsharifi @JmillsExpensify you have been assigned to this deploy blocker because you reviewed the offending PR: #100584

  6. melvin-bot commented on Sep 22, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  7. MelvinBot commented on Sep 22, 2026

    @MelvinBot
    Contributor

    Proposal

    Don't revert Gate "Submit to my employer" on the workspace billing restriction. It isn't the cause. It only made the Restricted screen reachable from one new entry point — the swipe-back defect itself is pre-existing and already ships in production.

    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-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.


    view run

  8. lakchote commented on Sep 22, 2026

    @lakchote
    Contributor
  9. marufsharifi commented on Sep 22, 2026

    @marufsharifi

    @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!

  10. 32 remaining items

  11. marufsharifi commented on Oct 5, 2026

    @marufsharifi

    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.

  12. lakchote commented on Oct 6, 2026

    @lakchote
    Contributor

    @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.

  13. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.

  14. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    Upwork Job

    • Assignee: @marufsharifi requires payment (Needs manual offer from BZ)

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  15. melvin-bot commented on Oct 12, 2026

    @melvin-bot

    @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  16. mallenexpensify commented on Oct 12, 2026

    @mallenexpensify
    Contributor

    @marufsharifi can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022105205322325361045

  17. marufsharifi commented on Oct 13, 2026

    @marufsharifi

    @mallenexpensify, I've accepted the offer. thanks.

  18. mallenexpensify commented on Oct 13, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @marufsharifi paid $175 via Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions