Skip to content

Realtime ws connection#4813

Open
Kesari3008 wants to merge 11 commits intowebex:task-refactorfrom
Kesari3008:realtime-ws-connection
Open

Realtime ws connection#4813
Kesari3008 wants to merge 11 commits intowebex:task-refactorfrom
Kesari3008:realtime-ws-connection

Conversation

@Kesari3008
Copy link
Copy Markdown
Contributor

@Kesari3008 Kesari3008 commented Mar 27, 2026

COMPLETES

This pull request addresses

New websocket implementation for real time data

by making the following changes

New websocket implementation for real time data

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

https://app.vidcast.io/share/c2d427f6-2b17-40ea-8eda-7ffe73e58483?playerMode=vidcast

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.

@Kesari3008 Kesari3008 added the validated If the pull request is validated for automation. label Mar 27, 2026
@Kesari3008 Kesari3008 requested a review from a team as a code owner March 27, 2026 07:26
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5f53da1d6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +581 to +582
if (!this.services.rtdWebSocketManager.isSocketClosed) {
this.services.rtdWebSocketManager.close(false, 'Unregistering the SDK');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard RTD websocket close when no RTD connection exists

This unconditional RTD close path can throw during deregister() for agents without realtime transcription enabled. rtdWebSocketManager.initWebSocket() is only called when aiFeature.realtimeTranscripts.enable is true, but a fresh WebSocketManager starts with isSocketClosed = false and websocket = {}, so calling close() here leads to this.websocket.close() on a non-WebSocket object and aborts deregistration. Please gate this close call on actual RTD connection initialization/open state (or make the manager default to a closed state until connected).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adrressed

constructor(options: {webex: WebexSDK; connectionConfig: SubscribeRequest}) {
const {webex, connectionConfig} = options;
this.webSocketManager = new WebSocketManager({webex});
this.rtdWebSocketManager = new WebSocketManager({webex});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add reconnect wiring for the RTD websocket manager

The new RTD manager is created but not integrated into reconnection handling: ConnectionService only subscribes to 'message'/'socketClose' on the primary webSocketManager, and WebSocketManager itself does not perform retries. In practice, if the RTD socket drops once (for example, a transient network loss), transcript delivery will stop for the rest of the session unless the SDK is fully re-registered. Please attach equivalent reconnect logic for rtdWebSocketManager.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant