Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): tapping a Live Activity the app started opens its thread #48220

Openjuliusmarmingewants to merge 2 commits intomain fromrefs/pull/48220/headopened View on GitHub

Showing 3 changed files with 40 additions and 10 deletions.

x
0 of 3 viewed, 3 left
28 additions and 0 deletionsapps/mobile/src/features/agent-awareness/remoteRegistration.test.tsModified
View file
@@ -34,10 +34,12 @@
} from "../../persistence/mobile-preferences";
import { MobileSecureStorageError } from "../../persistence/mobile-secure-storage";
import * as MobileStorage from "../../persistence/mobile-storage";
+import type { AgentActivityProps } from "../../widgets/AgentActivity";
import { makeRelayDeviceRegistrationRequest } from "./registrationPayload";
import {
__resetAgentAwarenessRemoteRegistrationForTest,
agentAwarenessNotificationsReady,
+ armAgentAwarenessLiveActivityForLocalWork,
getAgentAwarenessRegistrationStatus,
refreshActiveLiveActivityRemoteRegistration,
refreshAgentAwarenessRegistration,
@@ -576,6 +578,32 @@
});
​
+ it.effect("links the Live Activity started for local work to its thread", () => {
+ setAgentAwarenessRelayTokenProvider(() => Promise.resolve("clerk-token-user-a"));
+ vi.mocked(loadPreferences).mockResolvedValue({ liveActivitiesEnabled: true });
+ widgetMocks.start.mockReturnValueOnce(null as never);
+​
+ return Effect.gen(function* () {
+ yield* runBackgroundOperations();
+ armAgentAwarenessLiveActivityForLocalWork({
+ environmentId: "env 1" as EnvironmentId,
+ threadId: "thread-1" as ThreadId,
+ threadTitle: "Fix login",
+ projectTitle: "Shop",