Skip to content

fix(client): don't overwrite call members on call.update#2147

Draft
jdimovska wants to merge 4 commits intomainfrom
update-members-issue
Draft

fix(client): don't overwrite call members on call.update#2147
jdimovska wants to merge 4 commits intomainfrom
update-members-issue

Conversation

@jdimovska
Copy link
Contributor

@jdimovska jdimovska commented Mar 2, 2026

💡 Overview

This PR fixes an issue where call.update overwrites the local members state with an empty array from the backend response.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where call members were unexpectedly cleared when updating custom call properties. Members are now properly preserved during these operations.

@jdimovska jdimovska requested a review from oliverlaz March 2, 2026 11:47
@changeset-bot
Copy link

changeset-bot bot commented Mar 2, 2026

⚠️ No Changeset found

Latest commit: fa2ff0e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7104ab3f-427b-4a20-b074-70af5191f9b0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Call.update method is modified to no longer extract and apply members from API responses. A corresponding test ensures that members remain uncleared when custom call data is updated, validating the new behavior.

Changes

Cohort / File(s) Summary
Members Extraction Removal
packages/client/src/Call.ts
Removes destructuring of members from the response in Call.update and eliminates the subsequent members state update call. Other update operations (call state and own capabilities) remain unchanged.
Test Coverage
packages/client/src/__tests__/Call.test.ts
Adds new test case verifying that members are not cleared when updating custom call data, ensuring the modified behavior is preserved.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Members stay put, no clearing in sight,
Custom data flows, everything's right,
When updates arrive with fresh data in hand,
The members stand tall, just as we planned! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes the Overview section but is missing the Implementation notes section and ticket/docs references specified in the template. Add Implementation notes explaining the technical approach and include ticket/docs links to complete the description template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: preventing call.update from overwriting the local members state.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-members-issue
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

CodeRabbit can use oxc to improve the quality of JavaScript and TypeScript code reviews.

Add a configuration file to your project to customize how CodeRabbit runs oxc.

const { call, members, own_capabilities } = response;
const { call, own_capabilities } = response;
this.state.updateFromCallResponse(call);
this.state.setMembers(members);
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about this @jdimovska. This seems to be a backend bug; the SDK is implemented according to the OpenAPI contract.

@jdimovska jdimovska marked this pull request as draft March 6, 2026 16:24
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