fix(cc-task): delegate consult transfer list policy to SDK (CAI-8354) - #736
Conversation
|
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: 6ae5a6c414
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7395d5788d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cc7a18f13
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e9b5ccbb0
ℹ️ 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".
…g-queue-transfer-epic-cti # Conflicts: # packages/contact-center/cc-components/ai-docs/cc-components-spec.md # packages/contact-center/store/tests/util.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b457fa243a
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
If a user types a two-character query and switches categories within the 500 ms debounce window, these resets run before any request has started and therefore cannot invalidate it. The queued callback subsequently starts with a newer request ID and repopulates the old category with filtered data; returning to that category shows a blank search field with the stale filtered results because the initial-load effect sees a nonempty array. Cancel the pending debounce or invalidate it with a category/search generation when changing categories.
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f99fb634bf
ℹ️ 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".
| action: 'Consult' | 'Transfer'; | ||
| availableDestinations: TaskUIControls['consultTransferDestinations']['consult']; |
There was a problem hiding this comment.
Keep exported popover props backward compatible
ConsultTransferPopoverComponentProps is publicly re-exported through @webex/cc-components/src/index.ts, so making action and availableDestinations required breaks existing consumers that construct or extend this type; object literals using the former required allowConsultToQueue prop will also fail excess-property checks. Since this is a patch release without a migration path, retain a compatible deprecated shape with defaults or defer the required-prop change to a major release.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This compatibility change is intentional. ConsultTransferPopoverComponentProps is an internal implementation detail rather than a consumer contract we need to preserve; consumers should use the CallControl surface. The required action and availableDestinations fields ensure the component follows the task-owned SDK destination policy, so we are not retaining the former allowConsultToQueue props shape.
There was a problem hiding this comment.
ConsultTransferPopoverComponentProps is part of the published TypeScript surface: src/index.ts re-exports task.types, and the package ships dist/types. The updated CONTRACTS.md also marks cc-components.consult-transfer-lists as stable semver. Calling this interface internal conflicts with both the package barrel and this PR’s contract documentation. Please either preserve the old props shape with deprecated compatibility fields/defaults, or make the breaking release and contract change explicit rather than landing it as a patch fix.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea628be4d5
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03b76ed38a
ℹ️ 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".
| if (availableDestinations.includes('agent')) { | ||
| loadBuddyAgents(action); | ||
| } |
There was a problem hiding this comment.
Load agents when live controls add the category
When TASK_UI_CONTROLS_UPDATED adds agent after this popover has already opened, onShow has already run and no later path loads agents when the newly visible Agents tab is selected. Because buddyAgents persists in useCallControl, the tab can show either an empty list or agents cached from a previous Consult/Transfer action, potentially exposing an ineligible destination. Trigger an action-specific load when Agents becomes available or is selected, and invalidate cached agent data when it is removed.
Useful? React with 👍 / 👎.
Thank you for your contribution! |
Integrate origin/next (webex#736 consult transfer SDK policy) with wxApp Keypad/mute changes. Combined Keypad skip + loadBuddyAgents(action). Co-authored-by: Cursor <cursoragent@cursor.com>
COMPLETES CAI-8354
This pull request addresses
The embedded Contact Center widgets duplicated consult and transfer destination policy and did not consistently preserve the SDK-provided category and row order.
Depends on SDK: webex/webex-js-sdk#5179.
Changes
Impact
Widgets now consume the Task visibility decision and existing SDK lists directly. Host options can still hide supported Dial Number or Entry Point categories, but cannot enable a category omitted by the Task.
Validation
Change Type
GAI Coding Policy