Skip to content

feat(cc-widgets): added Agent-Multi-Login-Alert Feature #364

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

Merged
merged 18 commits into from
Jan 31, 2025

Conversation

pagour98
Copy link
Contributor

@pagour98 pagour98 commented Jan 21, 2025

COMPLETES #<SPARK-601180>

SDK Changes PR:- webex/webex-js-sdk#4068

ISSUE

  • Currently, for the widgets, we did not have logic to handle agent multiple sign in.
  • There should always be one active agent session, if agent tries to login second time then we should show multiple login alert and the dialog box should be opened and on pressing of Continue button the agent should be re-logged in the current tab.

FIX

  • UI has been added to take care of the agent multi login, when the agent login multiple a dialog box will appear with the informational message and on pressing Continue button the user will be re-logged in the current tab.
  • From SDK side agent:multiLogin event has been emitted and listed on the CC widgets side to perform the desired action when the event is triggered.

Vidcasts

https://app.vidcast.io/share/37777ae3-5065-4985-8c76-9658fc29ab63

Manual Tests

Note Test Doc with changes - https://confluence-eng-gpk2.cisco.com/conf/display/WSDK/CC+Widgets+Test+Plan

  • Tested with BROWSER, DN in react and web components and logged in and logged out.
  • Tested with above types by logging in multiple time and ensured the alert is showed up.
  • Tested by logging in, closing the browser and then re-registering to see if it worked.
  • Tested by logging out, refreshing and checking to see if everything was working alright.

Copy link

coderabbitai bot commented Jan 21, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.

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


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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. (Beta)
  • @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.

@pagour98 pagour98 marked this pull request as draft January 21, 2025 12:15
@pagour98 pagour98 marked this pull request as ready for review January 21, 2025 15:31
@rsarika
Copy link
Contributor

rsarika commented Jan 22, 2025

Please update corresponding UT's

@pagour98
Copy link
Contributor Author

Please update corresponding UT's

@rsarika , UTs has been added!

@pagour98 pagour98 requested a review from rsarika January 26, 2025 17:54
Copy link
Contributor

@adhmenon adhmenon left a comment

Choose a reason for hiding this comment

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

Please link the the SDK PR as well.

Copy link
Contributor

@adhmenon adhmenon left a comment

Choose a reason for hiding this comment

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

Also, please ensure that we do have the multiLoginEnabled flag as false in the SDK while running this... only then should we show all these alerts.

@pagour98
Copy link
Contributor Author

Also, please ensure that we do have the multiLoginEnabled flag as false in the SDK while running this... only then should we show all these alerts.

@adhmenon , multiLoginEnabled flag is already set to false in SDK, I have attached the PR in description.

@pagour98
Copy link
Contributor Author

I have attached the PR in description.

@adhmenon I have attached the SDK Changes PR in description.

@pagour98 pagour98 requested review from rsarika and adhmenon January 30, 2025 16:21
Copy link
Contributor

@adhmenon adhmenon left a comment

Choose a reason for hiding this comment

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

Approving with a minor comment.

method: 'handleContinue',
});
} else {
logger.error(`Agent Relogin Failed`, {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:
Not sure if we really need this as SDK would emit the error, but I think it's alright to keep it.

@pagour98 pagour98 merged commit f7d75ca into webex:ccwidgets Jan 31, 2025
2 checks passed
@sreenara
Copy link
Contributor

sreenara commented Feb 5, 2025

🎉 This PR is included in version 1.28.0-ccconnectors.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@sreenara
Copy link
Contributor

sreenara commented Feb 6, 2025

🎉 This PR is included in version 1.28.0-ccwidgets.14 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

mkesavan13 pushed a commit to mkesavan13/widgets that referenced this pull request Feb 7, 2025
# [1.28.0-ccconnectors.1](webex/widgets@v1.27.5...v1.28.0-ccconnectors.1) (2025-02-05)

### Bug Fixes

* add material to all components ([webex#376](webex#376)) ([de0ca28](webex@de0ca28))
* **bundling:** fixed the multiple React instance and useRef errors  ([webex#355](webex#355)) ([473cd4f](webex@473cd4f))
* **call-control:** add-call-control-widget ([webex#362](webex#362)) ([a677f5e](webex@a677f5e))
* **cc-station-login:** material design ui ([webex#377](webex#377)) ([aec7034](webex@aec7034))
* **cc-store:** receive webex on init, add store types ([webex#341](webex#341)) ([9648969](webex@9648969))
* **cc-widgets:** ship-all-widgets-together ([webex#345](webex#345)) ([83d5a37](webex@83d5a37))
* cleanup and using mobx-react-lite ([webex#356](webex#356)) ([0b304c4](webex@0b304c4))
* convert npm to yarn ([webex#234](webex#234)) ([432ed3c](webex@432ed3c))
* **release:** add-publish-step-in-tooling ([webex#334](webex#334)) ([ca32235](webex@ca32235))
* rename agent state to user state ([webex#361](webex#361)) ([fe409db](webex@fe409db))
* **samples:** change samples index html hrefs ([webex#367](webex#367)) ([ff126ab](webex@ff126ab))
* **user-state:** receive agent stateChange event ([webex#350](webex#350)) ([21d6ce7](webex@21d6ce7))

### Features

* **cc-components:** setup and move user state sample ui comp ([webex#359](webex#359)) ([16a44d0](webex@16a44d0))
* **cc-store:** add logger from sdk ([webex#354](webex#354)) ([a62494b](webex@a62494b))
* **cc-widgets:** added Agent-Multi-Login-Alert Feature ([webex#364](webex#364)) ([f7d75ca](webex@f7d75ca))
* **release:** add new branch to circleci ([18f7bec](webex@18f7bec))
* **release:** publish pipeline for wxcc widgets ([webex#324](webex#324)) ([864fb52](webex@864fb52))
* taskList and IncomingTask widgets added ([webex#348](webex#348)) ([ce3a619](webex@ce3a619))
* **user-state:** load and change state, client timer ([webex#347](webex#347)) ([f1ccaeb](webex@f1ccaeb))
* **widget-cc-station-login:** Spark 575845 login widget ([webex#239](webex#239)) ([66b8a20](webex@66b8a20))
* **widgets:** added-relogin-logic ([webex#357](webex#357)) ([94dd415](webex@94dd415))
* **widgets:** shifted-timer-to-worker ([webex#352](webex#352)) ([c06fe9c](webex@c06fe9c))
rsarika pushed a commit to rsarika/widgets that referenced this pull request Feb 7, 2025
# [1.28.0-ccwidgets.14](webex/widgets@v1.28.0-ccwidgets.13...v1.28.0-ccwidgets.14) (2025-02-06)

### Bug Fixes

* **cc-components:** replace momentum-ui with momentum-design lib ([webex#378](webex#378)) ([b98d76c](webex@b98d76c))

### Features

* **cc-components:** setup and move user state sample ui comp ([webex#359](webex#359)) ([16a44d0](webex@16a44d0))
* **cc-widgets:** added Agent-Multi-Login-Alert Feature ([webex#364](webex#364)) ([f7d75ca](webex@f7d75ca))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants