Skip to content

fix(calling): read and use mobius-ws setting from wdm#4871

Merged
mkesavan13 merged 3 commits intowebex:mobius-socketfrom
mkesavan13:mobius-wss-flag
Apr 17, 2026
Merged

fix(calling): read and use mobius-ws setting from wdm#4871
mkesavan13 merged 3 commits intowebex:mobius-socketfrom
mkesavan13:mobius-wss-flag

Conversation

@mkesavan13
Copy link
Copy Markdown
Contributor

COMPLETES CAI-7723

This pull request addresses

Reading and using the feature flag from Settings Service instead of SDK configuration to choose either HTTP requests or Mobius Requests

by making the following changes

  • Reading the setting from WDM plugin with a new Util isWsFeatureEnabled
  • Using the value of setting to decide whether Mobius socket should be connected in CallingClient.ts
  • Using the value of setting to decide whether requests should flow through HTTP or Mobius socket
  • In addition, have retained the SDK config to test this feature until the Setting is rolled out to PROD. Right now the PR is against integration in the settings service repo: https://sqbu-github.cisco.com/WebExSquared/settings-service-definitions/pull/1157

Pending Items

  • Actual Testing with right config
  • Removal of SDK config when the setting is PROD
  • Unit Tests

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

  • Tested some of the existing PROD config from the repo against webex.internal.device.settings
  • An example:

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 - Cursor
  • 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.

* Reads WDM `webex.internal.device.settings['webrtc-calling-over-ws'].value`; must be
* strictly `true` to enable WebSocket—otherwise use HTTP.
*/
export function isWsFeatureEnabled(webex: WebexSDK): boolean {
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.

May be a better naming is needed here. Suggestions are welcome

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isMobiusWssFeatureEnabled or isMobiusWssFeatEnabled ?

Copy link
Copy Markdown
Contributor

@rarajes2 rarajes2 left a comment

Choose a reason for hiding this comment

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

LGTM

@mkesavan13 mkesavan13 marked this pull request as ready for review April 17, 2026 13:25
@mkesavan13 mkesavan13 requested a review from a team as a code owner April 17, 2026 13:25
@mkesavan13 mkesavan13 added the validated If the pull request is validated for automation. label Apr 17, 2026
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: 39b8c8c02b

ℹ️ 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 +45 to +46
this.isMobiusSocketEnabled =
isWsFeatureEnabled(config.webex) || (config.isMobiusSocketEnabled ?? false);
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 Preserve SDK WebSocket override in APIRequest init

This constructor now relies on config.isMobiusSocketEnabled for the interim opt-in path, but production call sites still create the singleton with {webex} only (for example in CallingClient, registration/register.ts, and calling/call.ts), so the override is effectively dropped unless WDM already returns true. In the rollout scenario where WDM is still false and CallingClientConfig.isMobiusSocketEnabled is set to true, APIRequest will incorrectly route requests over HTTP, breaking the intended fallback behavior described in this change.

Useful? React with 👍 / 👎.

@mkesavan13 mkesavan13 merged commit 1b0b8e7 into webex:mobius-socket Apr 17, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mobius-wss validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants