Client_app_sdk interaction event mismatch during messaging transition in Angular 16

Hi all,

The current implementation involves a custom agent desktop built on the Premium App framework, deployed across our prod k8s clusters. A strange behavior has emerged where the interaction event stream via the client_app_sdk fails to trigger the expected lifecycle hooks when transitioning between web messaging sessions. The logic is designed to clear the local state and refresh the view when a new interaction is picked up. However, the RxJS stream remains silent, and the UI continues to display the previous session’s data. From a governance standpoint, this creates a data leakage risk between different customer interactions, which is unacceptable for our security config.

The repro involves monitoring the WebSocket stream for interaction changes. The SDK version is current, and the Angular service is utilizing a switchMap to handle the stream. A manual call to /api/v2/webmessaging/messages confirms the data exists on the backend, but the client_app_sdk event doesn’t fire. The sequence of events is as follows: the agent accepts the interaction, the interaction enters the “active” state, but the SDK event emitter doesn’t push the update to the subscriber.

this.sdk.interactionService.interactionEvents$.pipe(
 filter(event => event.type === 'InteractionActive'),
 takeUntil(this.destroy$)
).subscribe(event => {
 console.log('Interaction active event received', event);
 this.refreshInteractionContext(event.interactionId);
});

The logs show no network errors, and the browser console is empty. We’ve verified the client app integration via /api/v2/integrations/clientapps and confirmed the permissions are correct for the logged-in user. The perf impact is negligible, but the functional failure is absolute.