Skip to content

fix(mobile): arm local-work Live Activity for signed-in Connect accounts - #198

Merged
Nurozen merged 1 commit into
mainfrom
fix/mobile-live-activity-scoped-accounts
Nov 9, 2026
Merged

Nurozen merged 1 commit into
mainfrom
fix/mobile-live-activity-scoped-accounts

Conversation

@Nurozen

@Nurozen Nurozen commented Nov 9, 2026

Copy link
Copy Markdown
Owner

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, armAgentAwarenessLiveActivityForLocalWork runs only through the per-account registrations. Each one returns early unless environmentConnections.get(environmentId)?.accountId matches its account. That map is filled only by registerAgentAwarenessConnection, 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 by CloudEnvironmentRows, 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 accounts a and b, puts env-1 in the catalog as owned by b, arms local work, and expects exactly one card, tagged with account b. On main (8e46cbc) it fails: startAgentLiveActivity is called 0 times.

Checks: full mobile unit and react suites (324 files, 3741 tests), tsc --noEmit for apps/mobile, and vp lint and vp fmt --check on the touched files.

🤖 Generated with Claude Code

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
Nurozen merged commit 9112c90 into main Nov 9, 2026
14 checks passed
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants