Skip to content

Conversation

@mahmoud-ghalayini
Copy link
Collaborator

@mahmoud-ghalayini mahmoud-ghalayini force-pushed the feature/promise-based-service-calls-1310 branch from 59cf513 to ae08f65 Compare October 27, 2025 12:53
@coveralls
Copy link

coveralls commented Oct 27, 2025

Coverage Status

coverage: 82.028% (+0.3%) from 81.767%
when pulling 6d1e681 on mahmoud-ghalayini:feature/promise-based-service-calls-1310
into 4d5bc66 on RobotWebTools:develop.

@minggangw minggangw requested a review from Copilot October 28, 2025 05:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds promise-based service calls to the rclnodejs library through a new sendRequestAsync() method, providing modern async/await patterns as an alternative to the existing callback-based sendRequest() method.

Key changes:

  • Added sendRequestAsync() method to the Client class with timeout and cancellation support
  • Comprehensive test coverage for the new async functionality
  • Documentation and examples demonstrating usage patterns

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
lib/client.js Implements sendRequestAsync() method with Promise-based API, timeout handling, and AbortSignal support; also fixes typos in existing documentation
test/test-async-client.js Comprehensive test suite covering all aspects of async client functionality including timeouts, cancellation, concurrent requests, and error handling
example/services/client/async-client-example.js Example demonstrating basic usage of the new async client API
example/services/README.md Documentation updates explaining the new async API, usage patterns, and differences from callback-based approach

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@minggangw minggangw left a comment

Choose a reason for hiding this comment

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

@mahmoudalghalayini thanks for submitting the PR, just a comment about the parameter used for the added function. BTW, please feel free to add your name into CONTRIBUTORS

@mahmoud-ghalayini mahmoud-ghalayini force-pushed the feature/promise-based-service-calls-1310 branch from ae08f65 to b957ff4 Compare October 28, 2025 14:08
@mahmoud-ghalayini mahmoud-ghalayini force-pushed the feature/promise-based-service-calls-1310 branch from b957ff4 to 6d1e681 Compare October 30, 2025 13:38
Copy link
Member

@minggangw minggangw left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your PR!

@minggangw
Copy link
Member

@mahmoud-ghalayini I have approved, please add some description when merging, thanks!

@mahmoud-ghalayini
Copy link
Collaborator Author

@mahmoud-ghalayini I have approved, please add some description when merging, thanks!

Description is added, but I don't have merge right 😄

@minggangw
Copy link
Member

@mahmoud-ghalayini I have approved, please add some description when merging, thanks!

Description is added, but I don't have merge right 😄

@mahmoud-ghalayini I have added you as collaborator, please check your email inbox to see any invitation received.

@mahmoud-ghalayini mahmoud-ghalayini merged commit 7c306aa into RobotWebTools:develop Oct 31, 2025
18 checks passed
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.

4 participants