[Bug]: Mobile shows an offline machine's cached threads as current, with stale settle/snooze state #24530
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/mobile
Steps to reproduce#
Setup: two machines (a Mac and a Windows PC) running T3 Code, and the mobile app paired to both. The PC desktop app is also connected to the Mac as a remote environment.
- On the Mac, settle a few threads and snooze a few others. The PC app updates live.
- Shut down the Mac (or close T3 Code on it).
- Open the mobile app. It reaches the PC but not the Mac.
- Look at the thread list.
Expected behavior#
Threads from the Mac are shown as offline or possibly out of date, so I can tell their state comes from an old cache and not from the Mac. The connection runtime doc says cached projections "must neither imply a live connection nor overwrite newer live data" (docs/internals/connection-runtime.md).
Actual behavior#
- The Mac's threads appear in the list just like live threads, with their state from whenever the phone last synced. Threads I settled are back as unsettled, and snoozed threads are back in the list.
- Nothing on a thread or in the list shows that its state is stale or that the Mac is unreachable. I can't tell which threads are real and which are leftovers.
- I can't fix them from the phone either: settle and snooze fail with "… is not connected." (#4852).
Impact#
Major degradation or frequent failure
Version or commit#
Desktop: 0.1.3-nightly.20261023.3592 (Windows). Mobile: current release.
Environment#
macOS + Windows 11 desktops, mobile app paired to both.
Workaround#
None, other than turning the Mac back on before opening the phone.
Related:
- #8935 (show threads from unreachable environments as offline) was closed without merging.
- Draft #22768 (recover cached threads when an environment is offline) is still open.
- Ideas #24529 proposes a way for the phone to get the newer state from the relay while the machine is offline. This issue is only about the stale state being shown as current.
Still seeing this on iOS 2.2.0 (202). It comes up for me with a work laptop that's often closed or off. While it's unreachable, all of its threads show as unsettled on my phone, including ones I already settled, so they mix in with my active threads until the laptop is back online. Threads that were working the last time the phone synced also stay on Working, even though they've finished on the laptop. Anyone using a laptop as one of their machines will likely hit this, not just when a machine goes down unexpectedly. Possibly related: #31491.
tanstack-source added labelsbug
Sign in to join this conversation.
Suggested fix: marking the threads as offline would stop them from looking current, but the phone would still show the wrong state. The correct state already exists on the Mac and on every client that saw the change, so the phone can get it without the Mac being online:
settledAt,snoozedUntil,archivedAt,lifecycleUpdatedAt. No titles or messages. The relay already keeps more than this per thread inrelay_agent_activity_rows.That fixes the stale state on the phone for T3 Connect environments. For LAN/Tailscale setups, the same rows could be served by another online environment (#20279). The full write-up is in Ideas #24529.