Skip to content

fix(cc-store): hydrate engaged state on multi-login events#694

Open
Shreyas281299 wants to merge 4 commits into
webex:nextfrom
Shreyas281299:mobius-reg-config
Open

fix(cc-store): hydrate engaged state on multi-login events#694
Shreyas281299 wants to merge 4 commits into
webex:nextfrom
Shreyas281299:mobius-reg-config

Conversation

@Shreyas281299

@Shreyas281299 Shreyas281299 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7899

This pull request addresses

Multi-login mirrored widget sessions were not consistently hydrating ENGAGED custom state when task updates arrived through multi-login event flow.

by making the following changes

  • add TASK_MULTI_LOGIN_HYDRATE event support in store event types and SDK listener wiring
  • handle task:multiLoginHydrate in storeEventsWrapper with dedupe guard for already-known new interactions
  • add/adjust unit tests in storeEventsWrapper to verify listener registration/removal and multi-login hydrate behavior
  • include existing branch commit docs(samples): disableWebRTCRegistration toggle

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

Uploading Screen Recording 2026-06-04 at 10.01.51 AM.mov…

  • The testing is done with the amplify link

  • Automated: yarn workspace @webex/cc-store exec jest tests/storeEventsWrapper.ts --runInBand

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Cursor/Codex
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

Made with Cursor

mkesavan13 and others added 2 commits May 8, 2026 11:05
Handle task:multiLoginHydrate in store event wiring so mirrored sessions can refresh task state and set engaged status, while skipping duplicate processing for already-new interactions. Add store event tests that validate listener registration/cleanup and multi-login hydrate dedupe behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@aws-amplify-us-east-2

Copy link
Copy Markdown

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

Access this pull request here: https://pr-694.d1b38q61t1z947.amplifyapp.com

@Shreyas281299 Shreyas281299 marked this pull request as ready for review June 22, 2026 14:11
@Shreyas281299 Shreyas281299 requested a review from a team as a code owner June 22, 2026 14:11
@Shreyas281299 Shreyas281299 added the validated Indicates that the PR is ready for actions label Jun 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5f7419140

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


this.registerTaskEventListeners(task);
this.refreshTaskList();
this.handleTaskAssigned(task);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid marking new multi-login tasks engaged

When a task:multiLoginHydrate payload is still in interaction state new but this mirrored session has not yet refreshed store.taskList, it falls through to handleTaskAssigned(). That helper only keeps campaign previews reserved; for normal offered tasks it sets the custom state to ENGAGED, unlike the existing task:incoming/task:hydrate handling for new tasks. This can make a multi-login session show the agent as engaged before the offered interaction is accepted, so new payloads should not be sent through the assigned path unless they are actually accepted.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated Indicates that the PR is ready for actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants