Skip to content

chore: updated CXProvider init and config flow#2326

Merged
greenfrvr merged 2 commits into
mainfrom
cxprovider-config
Jul 8, 2026
Merged

chore: updated CXProvider init and config flow#2326
greenfrvr merged 2 commits into
mainfrom
cxprovider-config

Conversation

@greenfrvr

@greenfrvr greenfrvr commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

💡 Overview

Avoided CXProvider redundant recreation.
Updated CXProvider configuration setup.

🎫 Ticket: https://linear.app/stream/issue/RN-414/cxprovider-instantiation-and-configuration-updates

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
    • Improved call setup reliability by consistently applying the latest call configuration before creating and starting calls.
    • Fixed settings handling with a safer in-memory cache to improve reliability across app sessions.
    • Reduced issues from concurrent settings access to help prevent inconsistent behavior.

@greenfrvr greenfrvr requested a review from santhoshvai July 8, 2026 12:50
@greenfrvr greenfrvr self-assigned this Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fae1a23a-c596-43c5-9c2b-0b52be9da189

📥 Commits

Reviewing files that changed from the base of the PR and between 1785722 and b247da3.

📒 Files selected for processing (1)
  • packages/react-native-callingx/ios/CallingxImpl.swift
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/react-native-callingx/ios/CallingxImpl.swift

📝 Walkthrough

Walkthrough

This PR updates iOS CallingxImpl provider configuration timing and adds a cached, serialized Settings store. It initializes callKeepCallController earlier, reapplies CXProvider configuration in setup/start flows, and reads handleType from stored settings.

Changes

iOS Calling Provider Configuration and Settings Caching

Layer / File(s) Summary
Startup controller setup and provider refresh
packages/react-native-callingx/ios/CallingxImpl.swift
init() now creates callKeepCallController; initializeIfNeeded() reapplies the shared CXProvider configuration from Settings.
setup and call start refresh
packages/react-native-callingx/ios/CallingxImpl.swift
setup(options:) now updates Settings and the shared provider configuration directly, and startCall(...) reapplies provider configuration before creating the call while reading handleType from Settings.
Settings cache and serialized access
packages/react-native-callingx/ios/Settings.swift
getSettings()/setSettings(_:) use an in-memory cache with a serial DispatchQueue, loading from and persisting to UserDefaults within synchronized access.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: oliverlaz, santhoshvai

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes an overview and ticket, but it omits the required Implementation notes and Docs sections. Add the Implementation notes section and the Docs section, and keep the overview aligned with the template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: CXProvider initialization and configuration flow updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cxprovider-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Bundle size

Built package output. Sizes in KB; delta vs main@95bcc2a.

No significant package size increase vs main.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/react-native-callingx/ios/CallingxImpl.swift`:
- Line 600: The outgoing call setup in CallingxImpl.startCall is mismatched with
the refreshed provider configuration because the CXStartCallAction handle type
is still hardcoded to generic. Update startCall to derive the outgoing handle
type from Settings.getProviderConfiguration() (or keep the provider
configuration pinned to generic) so the handle passed to CXStartCallAction stays
aligned with the configured handleType.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cb099a7f-341f-4c9f-86d9-023f35932957

📥 Commits

Reviewing files that changed from the base of the PR and between 95bcc2a and 1785722.

📒 Files selected for processing (2)
  • packages/react-native-callingx/ios/CallingxImpl.swift
  • packages/react-native-callingx/ios/Settings.swift

Comment thread packages/react-native-callingx/ios/CallingxImpl.swift
@greenfrvr greenfrvr merged commit 23d9f49 into main Jul 8, 2026
6 checks passed
@greenfrvr greenfrvr deleted the cxprovider-config branch July 8, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants