Skip to content

[Due for payment 2026-09-25] [$250] Public room-anon user first time tapping on sign in button or a thread open public room #96346

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.4.35-5
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/64947920/folder/13176964/41237765/1573556262?sort=-identifier
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: iPhone 16 pro/ 26.5.2
App Component: Other

Action Performed:

  1. Logout and force close the app
  2. From Note of device tap the link https://staging.new.expensify.com/r/1540486774487195
  3. Tap on Sign in button (or scroll up to find a thread then tap it)

Expected Result:

Sign in (or the thread) should display

Actual Result:

Public room slide is opened. (On android, public room page is opened, not the slide)

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7209907_1784212922198.Prvf7341_1_.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7209907

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 16, 2026
  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    and removed on Jul 16, 2026
  3. melvin-bot commented on Jul 16, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jul 16, 2026

    @melvin-bot

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

  5. github-actions commented on Jul 16, 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.
  6. MelvinBot commented on Jul 16, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    When an anonymous (logged-out) user cold-launches the app from a public-room deeplink (/r/<id>), the deeplink handler defers a navigation to that room until the room's report data finishes loading from the backend. That deferred navigation fires after the user's first tap and overwrites it — so instead of the Sign In screen or the tapped thread, the public room is (re)opened.

    The deferral lives in openReportFromDeepLink in Link.ts: if the report isn't in Onyx yet, it opens an Onyx subscription that waits for the data, then calls Navigation.navigate(route, {forceReplace, waitForTransition: true}). Crucially, forceReplace is true whenever the top route is an RHP — which is exactly the case after the user has just tapped Sign In (opens the Sign-In RHP) — so the deferred navigate replaces the Sign-In slide/thread with the public room. This is why the actual result is "public room slide is opened" on iOS and "public room page is opened" on Android.

    The three characteristics of the bug map cleanly onto this code:

    Why staging but not production (medium confidence): this is a timing race. On staging the report data lands after first paint (slower backend + unminified bundle), so the deferred navigate reliably arrives after the user's tap. On production the data usually resolves before the user can tap, so the navigate fires harmlessly early. This part needs a runtime repro to confirm.

    What changes do you think we should make in order to solve the problem?

    Make the deferred deeplink navigation abort if the user has already navigated away from the initial cold-launch state before the report data arrives. Concretely, inside the deferred navigateHandler in openReportFromDeepLink, before calling Navigation.navigate(...), check whether the user is still on the original route (or has since opened the Sign-In modal / another report) and skip the navigate (and the forceReplace) if so. Capturing the active route at the time the deeplink is queued and comparing it when the callback fires is enough to detect intervening user interaction. This preserves the intended behavior (navigate to the room once data loads on a clean cold launch) while no longer clobbering an explicit user action.

    What alternative solutions did you explore? (Optional)

    Ruled-out hypotheses
    • TransitionTracker gating the tap — ruled out. Default navigate() calls set runImmediately = !options?.waitForTransition → true, so the tap's navigation runs immediately and is not queued.
    • pendingNavigationCall re-fire (goToPendingRoute) — fires at startup before the user can tap, so it doesn't explain "first tap only."
    • ReportScreen self-redirect — no effect in ReportScreen/inbox navigates back to the same reportID.
    • Anonymous linkTo / router guard — linkTo and the router guards have no anon rewrite-to-current-room logic.

    Confidence: High on the code mechanism (verified at the file:line refs above); Medium on the staging-vs-production timing explanation, which should be confirmed with a device repro (anon cold-launch into a public room, tap Sign In / a thread inside the data-load window).

    Related issues

    Two open, in-review issues cover adjacent public-room-deeplink-while-signed-out behavior — worth cross-checking so fixes don't collide:


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/96346) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 16, 2026
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 16, 2026
  9. 76 remaining items

  10. melvin-bot commented on Sep 24, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  11. melvin-bot commented on Sep 24, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    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
  12. mallenexpensify commented on Sep 26, 2026

    @mallenexpensify
    Contributor

    @abdulrahuman5196 this issue mentions a deploy blocker or a regression. Before the payment date, post one of the three options in step 20 of the C+ doc: it was a regression, it was not, or you did not review the offending PR. If you don't post, the default is to reduce payment.

  13. abdulrahuman5196 commented on Sep 26, 2026

    @abdulrahuman5196
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: Not a regression
      Link to the comment on the Issue: N/A

    • [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: N/A

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

    Regression Test Proposal Template. Needed for all bugs AND new features

    Regression Test Proposal

    Precondition:

    Test:

    1. Logout and force close the app
    2. From Note of device tap the link for public room https://staging.new.expensify.com/r/1540486774487195
    3. Tap on Sign in button
    4. Verify that the sign in modal appears

    Do we agree 👍 or 👎

  14. abdulrahuman5196 commented on Sep 26, 2026

    @abdulrahuman5196
    Contributor

    @mallenexpensify Added the checklist.

  15. abdulrahuman5196 commented on Sep 26, 2026

    @abdulrahuman5196
    Contributor

    This issue had one regression and was fixed here - #101528. The payment should be reduced accordingly for this issue.

  16. mallenexpensify commented on Sep 28, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @nkdengineer due $125 via NewDot
    Contributor+: @abdulrahuman5196 due $125 via NewDot

  17. laurenreidexpensify commented on Oct 6, 2026

    @laurenreidexpensify
    Contributor

    Approved $125 @abdulrahuman5196 New Expensify

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions