Improve live activity routing and diagnostics - #3685
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
vp checkvp run typecheckvp testNote
High Risk
Touches relay registration, APNs routing, cloud link modes, and Live Activity lifecycle (including removing push-to-start); misconfiguration or partial deploy could break mobile notifications or mis-route pushes.
Overview
Improves mobile agent awareness end-to-end: relay device registration now sends bundle ID and sandbox vs production APNs routing, tracks whether the relay actually accepted registration (settings toggles and alerts follow that, not just iOS permission), skips duplicate registrations via a persisted signature, and re-registers Live Activity tokens on foreground with short-window deduping. Push-to-start registration is removed in favor of arming a card when the user sends a task (and priming from a relay activity snapshot when idle), plus cleanup on cloud sign-out and a
releaseAgentAwarenessRelayTokenProviderpath so auth UI remounts do not wipe registration or end activities.Agent Activity Live Activity UI is reworked (attention-first rows, phase tints aligned with web, deep links, branded T3 mark via new Expo config plugins and
actoolshell phase). expo-widgets gainsfrequentUpdatesfor higher update budget.T3 Connect vs publishing split: environments can link in
publish_onlymode (manual endpoint, no Cloudflare tunnel) via CLI (connect link --publish-only,connect publish) and web settings (separate toggles reconciled together). Link proofs accept manual providers with activity-only scopes; server publish path defers transient tombstones and first completed snapshots before publishing.Relay DB adds
bundle_idandaps_environmenton mobile devices (migration in diff).Reviewed by Cursor Bugbot for commit 6f0b32d. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add per-device APNs routing, JWT token caching, and publish-only link mode to Live Activity delivery
bundle_idandaps_environmentper device in the relay and uses them to route APNs pushes to the correct topic and environment per device rather than using global config.ApnsProviderTokensservice that caches APNs JWTs quantized to 45-minute windows, preventingTooManyProviderTokenUpdateserrors; uses deterministic ES256 signing via@noble/curves.publish_onlycloud link mode in the CLI (t3 connect publish) and web settings UI, allowing agent activity publishing without a managed Cloudflare tunnel; linking with this mode usesproviderKind: "manual"and deprovisions any existing tunnel allocation.AgentActivitywidget to sort rows attention-first, apply per-phase tints from the web palette, deep-link to the most relevant thread, show a branded logo, and display a phase glyph in minimal presentation.unknown/pending/registered/failed) to the settings UI so notification and Live Activity toggles only appear enabled when the device is actually registered.makeAggregateStatenow requires anowMsparameter andstatusForPhase('starting')returns'Connecting'instead of'Starting', which are breaking changes for callers.Macroscope summarized 6f0b32d.