Follow-up items deferred from #320785 based on review feedback from @dmitrivMS.
1. Replace polling with observables/events in agentsVoiceWindowService
Comment: agentsVoiceWindowService.ts:275
The session polling (setInterval every 3s to call agentSessionsService.model.resolve()) is a workaround. We should subscribe to proper events/observables for session state changes instead of polling.
2. Make BroadcastChannel window-scoped
Comments: agentsVoiceWidget.ts:176, chatViewPane.ts:398
The BroadcastChannel used for communication between the voice controller and the chat widget is global. If two chat panes or windows race on commands like getCurrentSession, the last one wins. This should be scoped per-window to prevent conflicts.
cc @meganrogge
Follow-up items deferred from #320785 based on review feedback from @dmitrivMS.
1. Replace polling with observables/events in
agentsVoiceWindowServiceComment: agentsVoiceWindowService.ts:275
The session polling (
setIntervalevery 3s to callagentSessionsService.model.resolve()) is a workaround. We should subscribe to proper events/observables for session state changes instead of polling.2. Make BroadcastChannel window-scoped
Comments: agentsVoiceWidget.ts:176, chatViewPane.ts:398
The
BroadcastChannelused for communication between the voice controller and the chat widget is global. If two chat panes or windows race on commands likegetCurrentSession, the last one wins. This should be scoped per-window to prevent conflicts.cc @meganrogge