fix(mobile): keep agent widgets updated in the background - #14848
jakeleventhal wants to merge 7 commits into
Conversation
…kground error expo-widgets stopped applying containerBackground for us, and the home-screen widget never got a createWidget layout. iOS 17 then showed "Please adopt containerBackground API" instead of agent activity. Adopt the modifier on the home-screen views, register the widget layout, and publish snapshots from the Live Activity refresh path. While the app is foregrounded, regular widgets follow complete live environment shells and reconcile them with relay snapshots scoped to the remaining environments. Rebased onto main as a single commit. Widget publishing goes through the platform-split agentLiveActivity module so non-iOS builds never import the widget, the Live Activity banner keeps the system glass tint and hierarchical foregrounds, and environments switched off in Settings no longer own widget rows. Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Note This comment is posted by Julius' dot Could a maintainer confirm whether the approved widget scope includes native background relay reads, WidgetKit refresh pushes, and the one-hour freshness window? The earlier review requested scheduled expiration; this adds a persistent read capability and background updates. The supplied recording shows scheduled Working → Approval → Done updates, while the description explicitly leaves real push delivery unverified. Please link the approval for this broader direction or confirm it here so the scope assessment can proceed. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This 45-file change adds a new background iOS WidgetKit capability with native extension code, authenticated relay access, database state, APNs delivery, and altered account lifecycle behavior. Its production-wide scope and bearer-token handling, alongside unresolved security and stale-state concerns, require human review. Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
|
lets just continue on the old PR. i added the label there so the dot wont close it |
The iOS Agent Activity widget could render blank and keep showing an old “Working” snapshot after T3 closed. This change embeds the native layouts and lets the widget extension fetch current linked agent activity directly from the relay, independently of the app’s JavaScript runtime.
The relay registers an install/account-scoped read capability, stores its hash, and queues WidgetKit refresh pushes when agent activity changes. On iOS 26+, the extension registers its WidgetKit push token and receives quiet refresh requests. Scheduled native reads request another refresh after five minutes; iOS controls the actual timing and budgets both mechanisms. Successful reads renew freshness, including unchanged results. After an hour without a confirmed relay read, unfinished rows become out of date; Done and Failed outcomes stay intact. Direct-only observations retain their ten-minute deadline.
Foreground reconciliation preserves live environment precedence, handles older relay responses with an unavailable count when needed, and clears previous-account content. The native configuration survives app suspension and is cleared on sign-out. The change includes the relay migration, generated extension entitlements, and native fingerprint inputs. It requires a compatible native rebuild and relay deployment.
Continues #14608 and replaces the closed draft #14830. Rebased onto current main without conflicts.
Validation
Native evidence
Baseline before: the original native client had no Agent Activity layout before publication.
Current build: Working while T3 is closed.
After a native background read:
After the next native background read:
40-second recording, accelerated 12× · Full uninterrupted seven-minute recording · Timestamped native relay reads
Implementation and validation by GPT-6.1-sol through the Codex harness in T3 Code.