Repository navigation
fix(mobile): arm local-work Live Activity for signed-in Connect accounts - #198
Merged
Merged
Conversation
Account-scoped registrations decided environment ownership from an in-memory connection registry that nothing populates since the client connection rewrite, so signed-in users never got a local-work Live Activity. Read the owning account from the environment catalog's relay route, as the rest of mobile does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nurozen
pushed a commit
that referenced
this pull request
Nov 9, 2026
Keeps main's Live Activity owner check (environment catalog) on top of upstream's removal of the connection registry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Problem
On iOS, a user signed in to Lecturn Connect never gets the local-work Live Activity (the "Agent work in progress" lock-screen card) when they start a task from the composer. Signed-out users still get it.
Cause
Once Connect accounts are synced,
armAgentAwarenessLiveActivityForLocalWorkruns only through the per-account registrations. Each one returns early unlessenvironmentConnections.get(environmentId)?.accountIdmatches its account. That map is filled only byregisterAgentAwarenessConnection, and nothing outside tests calls it since the client connection rewrite (e95b57d). The multi-account change (d7c6ea2) came after that rewrite, so on device the scoped check has always failed.Fix
The owning account now comes from the environment catalog's Lecturn Connect (relay) route, through
relayRouteTarget(entry)?.accountId. That is the same ownership source used byCloudEnvironmentRows, the home account sections and notification routing. Nothing new depends on the connection registry, which the upstream sync is removing (pingdotgg#26238). Environments that aren't Connect-owned still don't arm for a scoped account, as before.Test
remoteRegistration.test.ts› "arms the local-work card only for the account that owns the environment" signs in accountsaandb, putsenv-1in the catalog as owned byb, arms local work, and expects exactly one card, tagged with accountb. On main (8e46cbc) it fails:startAgentLiveActivityis called 0 times.Checks: full mobile unit and react suites (324 files, 3741 tests),
tsc --noEmitfor apps/mobile, andvp lintandvp fmt --checkon the touched files.🤖 Generated with Claude Code