fix(mobile): tapping a Live Activity the app started opens its thread #48108
main fromrefs/pull/48108/head·opened View on GitHubProblem#
When the iOS app starts a Live Activity itself right after sending a message (armAgentAwarenessLiveActivityForLocalWork), the initial row is created with environmentId: "", threadId: "", and deepLink: "/". The Live Activity widget turns "/" into a bare t3code:// URL, which apps/mobile/src/lib/appLinking.ts drops on purpose, so tapping the Live Activity only brings the app forward wherever it was left (for example on Settings) instead of opening the thread, until a relay push later replaces the row.
I found this in daily use on an iPhone and reproduced it in the iPhone 18 Pro simulator (iOS 27.2).
Change#
apps/mobile/src/features/threads/ThreadComposer.tsx: passthreadId: props.selectedThread.idintoarmAgentAwarenessLiveActivityForLocalWork.apps/mobile/src/features/agent-awareness/remoteRegistration.ts: populateenvironmentId,threadId, anddeepLink: \/threads/${encodeURIComponent(input.environmentId)}/${encodeURIComponent(input.threadId)}`on the initial local-work Live Activity row, matching the format used bynotificationPayload.tsandpackages/shared/src/agentAwareness.ts`.apps/mobile/src/features/agent-awareness/remoteRegistration.test.ts: add a unit test coveringenvironmentId,threadId, and URL encoding in the generated deep link.
Scope#
Small bug fix for a broken deep link; searched open issues and PRs for armAgentAwarenessLiveActivityForLocalWork and Live Activity deep links and found no duplicate. Related: #19022 fixed Dynamic Island deep links.
Verification#
- iPhone 18 Pro simulator (iOS 27.2), dev build with and without this commit (in the simulator, the two T3 Connect sign-in guards inside
armAgentAwarenessLiveActivityForLocalWorkwere temporarily bypassed in an uncommitted test patch so the local Live Activity start path ran without a cloud session):- Before: send a message, switch to Settings, lock the screen, tap the Live Activity ->
appLinkingreceivest3code://(dropped) and the app stays on Settings. - After: same flow ->
appLinkingreceivest3code://threads/<environmentId>/<threadId>and opens the thread.
- Before: send a message, switch to Settings, lock the screen, tap the Live Activity ->
- Unit test
"links the Live Activity started for local work to its thread"inapps/mobile/src/features/agent-awareness/remoteRegistration.test.ts:- Fails on
main(ddc72ec5c9) without the fix (received{ environmentId: "", threadId: "", deepLink: "/" }). - Passes with the fix.
- Fails on
vp run check:changed: pass (format,lint,knip,typecheckacross 2 packages, 26/26 tests inremoteRegistration.test.ts, React Compiler coverage).
Evidence#
Lock screen Live Activity started by the app after sending a message:
Before (app left on Settings; tapping the Live Activity leaves it on Settings) vs After (tapping the Live Activity opens the thread):
| Before | After |
|---|---|
![]() | ![]() |
Videos:
- Before (tap stays on Settings): https://github.com/storefront-bvba/storefront-code/releases/download/pr-evidence-b1/before-tap-live-activity.mp4
- After (tap opens the thread): https://github.com/storefront-bvba/storefront-code/releases/download/pr-evidence-b1/after-tap-live-activity.mp4
Original patch written with Claude Opus 5.5 (Claude Code in T3 Code); rebased onto main and verified with Gemini 4 Neon (Antigravity 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
bde6e81Macroscope's review found this PR approvable — Locally started Live Activities now open their originating thread when tapped. Existing enablement guards remain unchanged, and the change is confined to the activity’s navigation metadata.
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 use the supplied environment and thread IDs in their activity props and encoded deep link. The post-send call provides the selected thread ID, and a test checks the activity props.
Changes: Local-work Live Activity linking
Layer / File(s) Summary Pass thread identity to the activity
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 requires a thread ID. The activity row and deep link use the supplied environment and thread IDs. The post-send call passes the selected thread ID, and the test checks the activity props and encoded deep link. Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
juliusmarminge
Merge Risk:
Minimal · up tobde6e-
Tapping a Live Activity started after sending a message should now open the correct thread instead of only foregrounding the app. No remaining merge risk was identified.
Pre-merge checks:
4-
Check name Status Explanation Title check The title "fix(mobile): tapping a Live Activity the app started opens its thread" states the main change. The PR passes the selected thread ID into the local-work Live Activity start and builds an enc… Description check The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section explains the broken deep link and its cause. The Change section lists the… 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 "fix(mobile): tapping a Live Activity the app started opens its thread" states the main change. The PR passes the selected thread ID into the local-work Live Activity start and builds an encoded thread deep link, so tapping the activity opens the thread. The title follows the conventional commit format from the template and is specific to the mobile app. It is 69 characters, which is within a reasonable length for a title.
Full details: Description check
-
Explanation
The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section explains the broken deep link and its cause. The Change section lists the three files and what changes in each. The Scope section says this is a small bug fix, links related work, and states that no duplicate issue exists. The Verification section gives the simulator steps and before/after results, the failing and passing unit test, and the check command results. It includes before/after screenshots and videos for the UI behavior. Two gaps remain: the Scope section does not link a specific issue for the bug, and the template asks for a link to the issue that shows the bug or a reason for omitting one. The author gives a reason for skipping an issue, which the template allows for small obvious fixes. The verification also relies on bypassed sign-in guards in an uncommitted patch, which the author states openly.
-
Finishing Touches
-
Generate unit tests (beta)
-
- 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: main
- File: .coderabbit.config.ts
- Commit: 7559944
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
175b9bae-6748-4c89-8dd9-2d5e539c0382
Commits-
Reviewing files that changed from the base of the PR and between 7559944b6c5e3e775dad46ebe8aa41468369a6be and bde6e81d92c398f276c3dd454be1ebb088fe3e13.
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
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
-
-
juliusmarminge added labelstakeover:in-progress
juliusmarminge added labelstakeover:blocked
juliusmarminge removed labelstakeover:in-progress
Sign in to join this conversation.


macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes