Skip to content

Conversation

@adhmenon
Copy link
Contributor

COMPLETES #< SPARK-647920 >

This pull request addresses

  • Currently, blind transfer to queue was not calling task:end event when the action happened.
  • Thus, as a result we were not getting any wrapupRequired in order to wrapup the call after transferring.
  • This is causing an issue in widgets.

by making the following changes

  • We listen for the AgentVTeamTransferred event on SDK and send out task:end event with wrapup payload.
  • This will work out of the box with widgets now.

Vidcast - https://app.vidcast.io/share/aa978abc-4a56-49a1-9b37-11a923430e33

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 blind transfer flow in sdk samples
  • Locally linked repo with the widgets and tested

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.

@adhmenon adhmenon requested a review from a team as a code owner April 16, 2025 07:06
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 16, 2025

📝 Walkthrough

Walkthrough

This change introduces new logic to the TaskManager component within the Webex Contact Center plugin. Specifically, it adds a case for handling the CC_EVENTS.AGENT_VTEAM_TRANSFERRED event within the registerTaskListeners method. When this event is detected, the current task emits a TASK_EVENTS.TASK_END event with a payload indicating that wrap-up is required, followed by the invocation of the handleTaskCleanup() method to perform necessary cleanup. To verify this behavior, a new unit test is added. The test simulates the event, checks that the correct event emission occurs, and confirms that the task is properly removed from the task collection after the event is processed. Additionally, in the sample app, the call to updateButtonsPostEndCall() was removed from the toggleTransferOptions() function, so toggling transfer options no longer triggers UI button state updates. No changes were made to exported or public entity declarations.

Possibly related PRs

  • fix(cc): emit-all-task-agent-events #4129: This PR restructures event definitions and enhances the re-emission of agent and task events in TaskManager, including introducing new event enums, which overlaps with the event handling logic modified in the current PR.

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e68059 and 485f27f.

📒 Files selected for processing (1)
  • docs/samples/contact-center/app.js (0 hunks)
💤 Files with no reviewable changes (1)
  • docs/samples/contact-center/app.js
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Initialize Project
  • GitHub Check: AWS Amplify Console Web Preview

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@adhmenon adhmenon added the validated If the pull request is validated for automation. label Apr 16, 2025
@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4212.d3m3l2kee0btzx.amplifyapp.com

Copy link
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.

Please fix the wrapup getting enabled issue on the samples page as highlighted by Priya. Rest looks good to me.

@adhmenon
Copy link
Contributor Author

For some reason - that issue is happening on amplify link only... not sure why.
On my local build it is not showin up.

@adhmenon
Copy link
Contributor Author

Edit: My bad - turns out I did not push that change. Will push it now.

@adhmenon adhmenon enabled auto-merge (squash) April 16, 2025 08:54
@adhmenon adhmenon merged commit b7c3879 into webex:next Apr 16, 2025
13 checks passed
@adhmenon adhmenon deleted the transfer-queues branch April 16, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants