Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Settling a finished thread doesn't remove it from the iOS Live Activity #16229

Closedjlipworth(GitHub profile, opens in a new tab) opened this issue 1 comment

Area

apps/server

Steps to reproduce

  1. iPhone with a Dynamic Island, T3 Connect linked, Live Activity Updates on.
  2. Run a turn until the island shows T3 · Done.
  3. Settle the thread (sidebar menu, or drag it onto Settled), on any device.

Expected behavior

The settled thread's row leaves the card. If it was the only row, the Live Activity ends, the same as when you archive the thread.

Actual behavior

The card keeps showing Done for the settled thread. It stays at least until the 15-minute display window passes, and often for hours because of #11939.

Root cause (main @ c138163c8c)

  • shouldPublishAgentAwarenessEvent returns false for thread.settled and thread.unsettled (apps/server/src/relay/AgentAwarenessRelay.ts:109-110). Settling never reaches the relay.
  • projectThreadAwarenessV2 (packages/shared/src/agentAwareness.ts:43) doesn't read settledAt. Even if a publish happened, a settled completed thread would still be published as completed.
  • Archive already handles this: threadShell.archivedAt !== null is treated as a missing thread (AgentAwarenessRelay.ts:536), which publishes a tombstone. The relay removes the row and sends live_activity_end when the aggregate is empty.

Suggested fix

  1. In AgentAwarenessRelay, also project a tombstone when the thread is settled and its phase is completed or failed. Do not tombstone a running thread or one waiting on the user, since live work should stay on the card even if it's settled.
  2. Move thread.settled and thread.unsettled into the list of events that trigger a publish. The existing publish-identity dedupe keeps settling an already-quiet thread free.
  3. Tests: settling a completed thread publishes a tombstone. Settling a running thread publishes nothing new. Unsettling within the window doesn't re-alert.

Open question: auto-settle would clear the card through the same path. That seems right, since auto-settle only fires after the thread has been idle for a long time.

  • #15728: the same card goes stale after the thread is viewed. That issue has an open cross-device question, but settling is an explicit action, so this fix doesn't depend on that decision.
  • Root cause 3 in #15728: same-token re-registration resets remoteStartedAt, so ends are dropped for 2 minutes after each app open. That would also drop the end for a thread settled on the phone right after opening the app. The fixes should land together, or this one won't work reliably on the phone.
  • #11939 / #11943: expiry of idle cards.

Workaround

Archive the thread instead of settling it, or swipe the Live Activity away.

Version or commit

main @ c138163c8c

  1. jona-nakai(GitHub profile, opens in a new tab)commented

    I'm getting this issue too. Using a tailscale net with "Publish agent activity" on

  2. juliusmarminge closed this

Sign in to join this conversation.