Skip to content

[Bug]: Mobile: deleting an open thread elsewhere replaces the screen on top of it with a new-thread draft #46214

Done

Description

@shivamhwp

Area

apps/mobile

Steps to reproduce

  1. Pair two mobile clients with the same environment.
  2. On phone A, open a thread, then open Environments (or any other screen in the root stack) on top of it.
  3. On phone B, delete that thread.

Expected behavior

Phone A stays on Environments. The deleted thread's route gives way to a new-thread draft only when someone goes back to it, or it closes.

Actual behavior

The screen phone A is looking at is replaced by a new-thread draft, with no tap. Going back from the draft lands on the deleted thread's route, which shows "Opening thread…" with a spinner indefinitely.

Environments open over the thread After the thread is deleted on another phone Back from the draft
Environments open over the thread Environments replaced by a new-thread draft Deleted thread's route stuck on Opening thread
background-delete.mp4

The thread route stays mounted under Environments. When its thread is deleted, it renders UnavailableThreadDraftRedirect, which dispatches StackActions.replace("Thread", …) on mount. React Navigation adds the route's key as source, but no target. StackRouter uses source only when target matches the stack, so it replaces state.index, the focused route (@react-navigation/routers StackRouter, case 'REPLACE'). The redirect fires once, so the deleted thread's own route is left on its loading screen.

Any route pushed in the root stack over a thread counts: Environments, settings, another thread. Deleting from web or desktop takes the same path; this repro used a second phone because the server CLI has no delete.

Impact

Minor bug or occasional failure

Version or commit

main @ 7380d2a. iPhone 18 Pro simulator (iOS 27) running the development client against an isolated dev backend; the delete came from an Android 16 emulator on the same backend.

Found while reviewing #43846, which doesn't change this path.

Activity

  1. added
    bug
    on Nov 30, 2026
  2. added
    vouch:trusted
    on Nov 30, 2026
  3. added
    needs-triage
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-triagevouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions