fix(mobile): tapping a Live Activity the app started opens its thread #48220
Tapping a Live Activity that the app started for local work opened the app at its root instead of the thread, because the activity was created with empty environment and thread IDs and a bare / deep link. The app now passes the thread ID through and fills the row's environment, thread and encoded thread deep link, so the tap opens that thread.
Supersedes #48108. The change is @woutersamaey's; their commits are kept.
Reproduction on main#
Reproduced on main at 7559944b6c:
- Paired the app to the dev server. In the app, Settings > T3 Account: signed in with the test account (email, password, email code). Live Activities were left at their default (enabled).
- First try, before the server was linked to T3 Connect: sending a message started no Live Activity. That is correct gating: armAgentAwarenessLiveActivityForLocalWork returns early when the environment reports agentActivityPublishing=false. So I linked the server to T3 Connect, turned publishing on and restarted it. The server log then said 'agent activity publishing enabled after link reconciliation'.
- Made sure no Live Activity was active. Opened the thread 'Greeting' and sent 'Run the shell command: sleep 240. Then reply with the word done.' The agent started working.
- Went Home and pulled down the cover sheet (it shows Live Activities as the lock screen does). A T3 Live Activity was there with its locally started first row: '1 active agent', 'Greeting', status 'Connecting'. iOS asked 'Allow Live Activities from T3 Code Dev?'; I tapped Allow, targeting SpringBoard.
- Back in the app I went to the Settings tab, then Home again, and pulled down the cover sheet. The activity still showed its first 'Connecting' row, so no relay update had replaced it yet.
- Tapped the Live Activity's content view on SpringBoard. The app came to the foreground on Settings, where it was left, not on the 'Greeting' thread that sent the message.
This matches the report: on main the local first row has environmentId/threadId '' and deepLink '/'. The widget turns that into widgetURL 't3code://', and shouldHandleAppLink drops it (regex /^t3code(-dev|-preview)?:/*$/). Tapping therefore only foregrounds the app on its previous screen. Caveat: agent-device's plain press brings the app to the front before it taps. A first tap attempt landed in the app and I discarded it. The tap counted here was aimed at SpringBoard (open com.apple.springboard, then press on the 'activity-content-view' element). The steps call for a locked phone; the simulator was not locked. I used the cover sheet, which shows the same Live Activity.
Evidence#
Being captured: before and after in the real app. This section is filled in before the pull request can merge.
Tests#
vp test run src/features/agent-awareness/remoteRegistration.test.ts(apps/mobile): 26 passed- Same test with only the fix reverted: the new test fails, so it catches the regression
vp run check:changed: format, lint, knip, typecheck (2 packages), tests and react compiler all pass
Not in this change#
buildAgentAwarenessDeepLinkin packages/shared is private, so mobile builds the thread path inline in three places; this PR does not unify them.
Who did the work#
- Written by Claude Opus 5.5, in Claude Code
- Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
- Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5
Run by the t3code factory in T3 Code.
- 1
tanstack-source added labelsbug
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Approvability#
Verdict: Approved at
db14509Macroscope's review found this PR approvable — Locally started Live Activities now link to their associated thread instead of the app root. Existing activation preferences and guards remain unchanged, keeping the change limited to navigation.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review.
Walkthrough
-
Local-work Live Activities now receive the selected thread ID. The activity entry uses the supplied environment and thread IDs, and its deep link points to the encoded thread route. A test checks the activity entry and generated link.
Changes: Local-work Live Activity links
Layer / File(s) Summary Pass thread identity into local-work activities
apps/mobile/src/features/agent-awareness/remoteRegistration.ts,apps/mobile/src/features/threads/ThreadComposer.tsx,apps/mobile/src/features/agent-awareness/remoteRegistration.test.tsThe arming input now includes a thread ID, and ThreadComposerpasses the selected thread’s ID. Activity creation uses the supplied environment and thread IDs and builds an encoded thread deep link. The test checks the activity entry and link.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Merge Risk:
Minimal · up todb145-
Tapping a Live Activity started by the app should now open its thread instead of a bare link that gets dropped. No merge-blocking risk was found.
Pre-merge checks:
4-
Check name Status Explanation Title check The title names the main change: tapping a Live Activity that the app started now opens its thread. It follows the conventional commit format and matches the changeset, which passes the thread ID and … Description check The description covers the problem, the change, the reproduction on main, and the tests run. It also notes the superseded PR and the authorship. The Scope section does not link an issue or explain why… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Title check
-
Explanation
The title names the main change: tapping a Live Activity that the app started now opens its thread. It follows the conventional commit format and matches the changeset, which passes the thread ID and builds the thread deep link for the local-work row.
Full details: Description check
-
Explanation
The description covers the problem, the change, the reproduction on main, and the tests run. It also notes the superseded PR and the authorship. The Scope section does not link an issue or explain why no issue is needed, and the Evidence section is still pending (screenshots or recording not yet attached). Those gaps are minor against the template, so the description is mostly complete.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: factory/pr-48108
- File: .coderabbit.config.ts
- Commit: db14509
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Team
- Run ID:
b1aa2bf6-27f1-4d5e-8dd3-e74e49997d97
Commits-
Reviewing files that changed from the base of the PR and between 7eba80e43120c8533738e7b5149f5b08b7ab0b14 and db145097d5d03b91f63660f657ade58491291b48.
Files selected for processing: 3-
apps/mobile/src/features/agent-awareness/remoteRegistration.test.tsapps/mobile/src/features/agent-awareness/remoteRegistration.tsapps/mobile/src/features/threads/ThreadComposer.tsx
-
-
The automated pipeline stopped on this pull request and will not merge it:
the fix is written and reviewed, but proving it needs something no worker has:
- Permanent blocker: the reported behavior depends on tapping a Live Activity in SpringBoard while a real provider turn is still running; the available Replay scenario runner cannot create that provider state or tap SpringBoard's activity-content-view.
It stays open for a person to finish or close.
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes