fix(cc-store): hydrate engaged state on multi-login events#694
fix(cc-store): hydrate engaged state on multi-login events#694Shreyas281299 wants to merge 4 commits into
Conversation
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>
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
💡 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); |
There was a problem hiding this comment.
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 👍 / 👎.
COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7899
This pull request addresses
Multi-login mirrored widget sessions were not consistently hydrating
ENGAGEDcustom state when task updates arrived through multi-login event flow.by making the following changes
TASK_MULTI_LOGIN_HYDRATEevent support in store event types and SDK listener wiringtask:multiLoginHydrateinstoreEventsWrapperwith dedupe guard for already-knownnewinteractionsstoreEventsWrapperto verify listener registration/removal and multi-login hydrate behaviordocs(samples): disableWebRTCRegistration toggleChange Type
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 --runInBandThe GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.
Made with Cursor