-
Notifications
You must be signed in to change notification settings - Fork 17
Add optional listen param to dial() to support starting calls using a single method. #1289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…le to send the `verto.answer` (#1263)
Fabric references renamed too Call
# Conflicts: # internal/e2e-client/playwright.config.ts # package-lock.json # packages/js/CHANGELOG.md # packages/js/package.json # packages/realtime-api/CHANGELOG.md # packages/realtime-api/package.json # packages/web-api/CHANGELOG.md # packages/web-api/package.json
- Remove browser-js workflows (production and staging) - Remove realtime-api workflows (production and staging) - Update unit-tests.yml to only run browser-client workflows - Remove stack tests that reference deleted realtime-api package - Add --passWithNoTests flag to test scripts to handle empty test suites This focuses the CI/CD pipeline on the @signalwire/client package only.
- Fix test file path: buildVideoWithCallSDK.spec.ts -> buildVideoWithFabricSDK.spec.ts - Add correct path prefixes for callfabric tests (callfabric/*.spec.ts) - Fix renegotiation test paths to include callfabric/ prefix - Disable relayApp.spec.ts test that depends on removed @signalwire/realtime-api These configuration mismatches were causing e2e workflow failures.
This reverts commit e6537bf.
Merging the type renames for @signalwire/client back to the original repository
# Conflicts: # internal/e2e-js/fixtures.ts # internal/e2e-js/package.json # internal/e2e-js/playwright.config.ts # internal/e2e-js/tests/buildVideoWithVideoSDK.spec.ts # internal/e2e-js/tests/callfabric/agentCustomer.spec.ts # internal/e2e-js/tests/roomSession.spec.ts # internal/e2e-js/tests/roomSessionAudienceCount.spec.ts # internal/e2e-js/tests/roomSessionAutomaticStream.spec.ts # internal/e2e-js/tests/roomSessionBadNetwork.spec.ts # internal/e2e-js/tests/roomSessionCleanup.spec.ts # internal/e2e-js/tests/roomSessionDemote.spec.ts # internal/e2e-js/tests/roomSessionDemoteAudience.spec.ts # internal/e2e-js/tests/roomSessionDemotePromote.spec.ts # internal/e2e-js/tests/roomSessionDemoteReattachPromote.spec.ts # internal/e2e-js/tests/roomSessionDevices.spec.ts # internal/e2e-js/tests/roomSessionFollowLeader.spec.ts # internal/e2e-js/tests/roomSessionJoinFrom.spec.ts # internal/e2e-js/tests/roomSessionJoinUntil.spec.ts # internal/e2e-js/tests/roomSessionLocalStream.spec.ts # internal/e2e-js/tests/roomSessionLockUnlock.spec.ts # internal/e2e-js/tests/roomSessionMaxMembers.spec.ts # internal/e2e-js/tests/roomSessionMethodsOnNonExistingMembers.spec.ts # internal/e2e-js/tests/roomSessionMultipleStreams.spec.ts # internal/e2e-js/tests/roomSessionPromoteDemote.spec.ts # internal/e2e-js/tests/roomSessionPromoteMeta.spec.ts # internal/e2e-js/tests/roomSessionPromoteParticipant.spec.ts # internal/e2e-js/tests/roomSessionPromoteReattachDemote.spec.ts # internal/e2e-js/tests/roomSessionRaiseHand.spec.ts # internal/e2e-js/tests/roomSessionReattach.spec.ts # internal/e2e-js/tests/roomSessionReattachBadAuth.spec.ts # internal/e2e-js/tests/roomSessionReattachMultiple.spec.ts # internal/e2e-js/tests/roomSessionReattachScreenshare.spec.ts # internal/e2e-js/tests/roomSessionReattachWrongCallId.spec.ts # internal/e2e-js/tests/roomSessionReattachWrongProtocol.spec.ts # internal/e2e-js/tests/roomSessionRemoveAllMembers.spec.ts # internal/e2e-js/tests/roomSessionStreaming.spec.ts # internal/e2e-js/tests/roomSessionStreamingAPI.spec.ts # internal/e2e-js/tests/roomSessionTalkingEventsParticipant.spec.ts # internal/e2e-js/tests/roomSessionTalkingEventsToAudience.spec.ts # internal/e2e-js/tests/roomSessionUnauthorized.spec.ts # internal/e2e-js/tests/roomSessionUpdateMedia.spec.ts # internal/e2e-js/tests/roomSettings.spec.ts # internal/e2e-js/utils.ts # packages/js/src/fabric/FabricRoomSession.ts # packages/js/src/fabric/utils/validationProxy.ts # packages/js/src/fabric/utils/validators.ts
- Copy playground-js to playground-client - Remove non-fabric samples (chat, pubSub, video, videoManager) - Update imports to use @signalwire/client instead of @signalwire/js - Add Vite configuration for proper module resolution - Update e2e-client to use playground-client 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
- Apply Vite configuration fixes to properly resolve @signalwire/client modules - Update blank template to explicitly import and expose SignalWire exports - Add module aliases, optimization, and process definitions for browser compatibility - This ensures window._SWJS is properly populated during e2e tests The combination of playground-client and these fixes resolves the module loading issue. 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
- Remove direct dependency on @signalwire/realtime-api in test file - Create relayAppWorker.js to execute realtime-api operations in Node.js context - Add relayAppClient fixture to manage Node.js child processes - Install @signalwire/realtime-api as dev dependency from npm registry - Update all three test cases to use the new fixture pattern - Maintain same test assertions and behavior This change isolates the realtime-api package execution to a separate Node.js process, allowing the tests to work without importing the Node.js-only package directly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Co-authored-by: Ammar Ansari <[email protected]>
Co-authored-by: Ammar Ansari <[email protected]>
Co-authored-by: Ammar Ansari <[email protected]>
Co-authored-by: Ammar Ansari <[email protected]>
Claude finished @jpsantosbh's task —— View job Pull Request ReviewReviewing PR #1289: Add optional listen param to dial() to support starting calls using a single method. Review Tasks:
SummaryThis PR successfully implements the optional Code Quality Assessment✅ Strengths
|
Claude finished @jpsantosbh's task —— View job Pull Request ReviewReviewing PR #1289: Add optional listen param to dial() to support starting calls using a single method. Review Tasks:
SummaryThis PR successfully implements the optional Code Quality Assessment✅ Strengths
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore this changes I will revert them
Claude finished @jpsantosbh's task —— View job Pull Request ReviewReviewing PR #1289: Add optional listen param to dial() to support starting calls using a single method. Review Tasks:
SummaryThis PR successfully implements the optional Code Quality Assessment✅ Strengths
|
this.logger.debug(`adding listener for event '${eventName}'`) | ||
const wrappedHandler = async (params: any) => { | ||
try { | ||
await handler(params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then there could be a problem, either with the design or the TS. The IDE should not complain about this, and VS Code is clearly showing a warning on this line.
this.logger.debug(`adding listener for event '${eventName}'`) | ||
const wrappedHandler = async (params: any) => { | ||
try { | ||
await handler(params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, if the handler is passed by the developer, shouldn't you NOT swallow the error and let it be handled by the developer? Currently, if the handler throws an error, the SDK will swallow it and just show a log.
@@ -122,11 +123,15 @@ export interface CallParams extends DefaultCallParams { | |||
export interface DialParams extends CallParams { | |||
to: string | |||
nodeId?: string | |||
/** Optional event listeners for the call session */ | |||
listen?: Partial<CallListeners> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you wanted to use the CallSessionEvents
? As you were describing in the call.
@@ -10,7 +10,7 @@ | |||
"scripts": { | |||
"changeset": "changeset", | |||
"clean": "npm exec --ws -- npx rimraf node_modules && npm exec --ws -- npx rimraf dist && npx rimraf node_modules", | |||
"test": "npm exec --ws npm run test", | |||
"test": "npm exec --ws npm run test && npx jest internal/e2e-client/*.test.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no jest
tests in internal/e2e-client
.
await resource.createVideoRoomResource(roomName) | ||
|
||
await createCFClient(page) | ||
const callState = createCallStateUtility(page) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The callState
variable is not used anywhere.
Just highlighting, 34 tests are failing currently in the CI. It might be worth validating if those are related. |
Claude finished @jpsantosbh's task —— View job Pull Request ReviewReviewing PR #1289: Add optional listen param to dial() to support starting calls using a single method. SummaryThis PR successfully implements the optional Code Quality Assessment✅ Strengths
|
Claude finished @jpsantosbh's task —— View job Pull Request ReviewReviewing PR #1289: Add optional listen param to dial() to support starting calls using a single method. Review Tasks:
SummaryThis PR successfully implements the optional Code Quality Assessment✅ Strengths
|
Claude finished @jpsantosbh's task —— View job Pull Request ReviewReviewing PR #1289: Add optional listen param to dial() to support starting calls using a single method. Review Tasks:
SummaryThis PR successfully implements the optional Code Quality Assessment✅ Strengths
|
…l-with-events # Conflicts: # .serena~HEAD # package.json # packages/client/src/unified/WSClient.ts
Claude finished @jpsantosbh's task —— View job Pull Request ReviewReviewing PR #1289: Add optional listen param to dial() to support starting calls using a single method. Review Tasks:
SummaryThis PR successfully implements the optional Code Quality Assessment✅ Strengths
🚨 Critical Issues1. Implementation Mismatch - BLOCKINGThe most serious issue is a disconnect between the interface, tests, and actual implementation:
This suggests the implementation was partially reverted but not completed. The feature is not working as intended. 2. Missing Core FunctionalityThe public dial(params: DialParams) {
getStorage()?.removeItem(getCallIdKey(this.options.profileId))
return this.buildOutboundCall(params) // Doesn't handle params.listen
} But tests expect it to:
|
Claude finished @jpsantosbh's task —— View job Claude finished @jpsantosbh's task —— View job Pull Request ReviewReviewing PR #1289: Add optional listen param to dial() to support starting calls using a single method. Review Tasks:
SummaryThis PR successfully implements the optional Code Quality Assessment✅ Strengths
🚨 Critical Issues1. Implementation Mismatch - BLOCKINGThe most serious issue is a disconnect between the interface, tests, and actual implementation:
This suggests the implementation was partially reverted but not completed. The feature is not working as intended. 2. Missing Core FunctionalityThe public dial(params: DialParams) {
getStorage()?.removeItem(getCallIdKey(this.options.profileId))
return this.buildOutboundCall(params) // Doesn't handle params.listen
} But tests expect it to:
|
Claude finished @jpsantosbh's task —— View job Pull Request ReviewReviewing PR #1289: Add optional listen param to dial() to support starting calls using a single method. Review Tasks:
SummaryThis PR successfully implements the optional Code Quality Assessment✅ Strengths
|
Description
Make
dial()
async again to support listen parameters similar to the realtime-sdk API. This is an old request from the DevEx team, and we need this before the first public release of @signalwire/client SDK.The old way still allowed developers to choose between the "dial(), add listeners, start()" or "dial(listen:{...})" approach.
Type of change
Code snippets
In case of new feature or breaking changes, please include code snippets.