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
[Bug]: Mobile: removing an environment leaves its open thread on screen #46215
bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
Open Environments on top of it, expand that thread's environment, and tap Remove environment, then Remove. The prompt says it forgets the environment and its cached threads on this device.
Close Environments.
Expected behavior
The thread is gone from the open screen too: it shows that the thread's environment isn't on this device (the "Environment not added" state), or closes.
Actual behavior
The removed environment's thread stays on screen with its messages and an enabled composer. The only sign is an "Environment is not connected" pill, and the header no longer names the environment. The thread list behind it has already dropped the thread and the environment.
Before removing
Environments after Remove
Back on the thread
Sped up 3×:
mobile-remove-environment-thread-stays.mp4
The thread route shows the thread while useThreadSelection returns a thread for the route (ThreadRouteScreen.tsx#L306). After removal it still returns one, though the list's own state no longer has it. Not traced: which store keeps the thread after EnvironmentRegistry.remove clears the environment's cache.
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.
Found while reviewing #43846, which doesn't change this path.
bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
Activity