Skip to content

fix(cc-task): delegate consult transfer list policy to SDK (CAI-8354) - #736

Merged
rsarika merged 13 commits into
webex:nextfrom
rsarika:fix/cai-8354-missing-queue-transfer-epic-cti
Aug 24, 2026
Merged

fix(cc-task): delegate consult transfer list policy to SDK (CAI-8354)#736
rsarika merged 13 commits into
webex:nextfrom
rsarika:fix/cai-8354-missing-queue-transfer-epic-cti

Conversation

@rsarika

@rsarika rsarika commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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

  • Read ordered Consult and Transfer destination categories from the current Task UI controls.
  • Load agents, queues, entry points, and dial numbers through the existing store and SDK methods.
  • Forward the selected Consult or Transfer action and retain the existing queue media compatibility path.
  • Preserve SDK response rows, pagination metadata, and backend order without widget-side list policy.
  • Render Momentum Avatar active or away presence from buddy-agent state.
  • Show SDK-provided dial-number and entry-point numbers as secondary row text.
  • Update focused store, task, component, fixture, and feature-spec coverage.

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

  • Full widgets pre-commit test suite passed.
  • Focused Consult/Transfer popover suite: 27 tests passed.
  • Style checks completed with 0 errors; 6 existing sample-app warnings remain.
  • Diff-scoped specification drift check passed.

Change Type

  • Bug fix
  • Internal policy delegation
  • Documentation update

GAI Coding Policy

  • GAI was used to create a draft that was subsequently customized or modified.

@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-736.d1b38q61t1z947.amplifyapp.com

@rsarika
rsarika marked this pull request as ready for review August 19, 2026 14:42
@rsarika
rsarika requested a review from a team as a code owner August 19, 2026 14:42

@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: 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".

Comment thread packages/contact-center/task/src/CallControl/index.tsx Outdated

@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: 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".

Comment thread packages/contact-center/test-fixtures/src/taskUIControlsFixtures.ts Outdated

@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: 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".

Comment thread packages/contact-center/task/src/helper.ts

@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: 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".

Comment thread packages/contact-center/store/src/storeEventsWrapper.ts Outdated
…g-queue-transfer-epic-cti

# Conflicts:
#	packages/contact-center/cc-components/ai-docs/cc-components-spec.md
#	packages/contact-center/store/tests/util.ts

@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: 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".

Comment thread packages/contact-center/store/src/storeEventsWrapper.ts Outdated

@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


P2 Badge Cancel pending searches when resetting categories

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".

Comment thread packages/contact-center/store/src/store.types.ts

@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: 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".

Comment on lines +685 to +686
action: 'Consult' | 'Transfer';
availableDestinations: TaskUIControls['consultTransferDestinations']['consult'];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@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: 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".

Comment thread packages/contact-center/store/src/storeEventsWrapper.ts
@rsarika rsarika added the validated Indicates that the PR is ready for actions label Aug 24, 2026
@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Aug 24, 2026
@rsarika rsarika added the validated Indicates that the PR is ready for actions label Aug 24, 2026
@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Aug 24, 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: 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".

Comment on lines +182 to +184
if (availableDestinations.includes('agent')) {
loadBuddyAgents(action);
}

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 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 👍 / 👎.

@rsarika rsarika added the validated Indicates that the PR is ready for actions label Aug 24, 2026
@rsarika
rsarika enabled auto-merge (squash) August 24, 2026 06:50

@rarajes2 rarajes2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just one comment

@rsarika
rsarika merged commit 7ff2433 into webex:next Aug 24, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown
🎉 Your changes are now available!
Released in: webex-cc-widgets-v1.28.0-next.54
📖 View full changelog →
Packages Updated Version
@webex/cc-widgets 1.28.0-next.54
@webex/cc-ai-assistant 0.0.0-next.5
@webex/cc-components 1.28.0-next.44
@webex/cc-digital-channels 0.0.0-next.24
@webex/cc-station-login 1.28.0-next.44
@webex/cc-store 1.28.0-next.28
@webex/cc-task 1.28.0-next.47
@webex/cc-ui-logging 1.28.0-next.29
@webex/cc-user-state 1.28.0-next.45
@webex/test-fixtures 0.0.0-next.1
samples-cc-react-app 0.0.0-next.1
samples-cc-wc-app 0.0.0-next.1

Thank you for your contribution!
🤖 This is an automated message. For queries, please contact support.

akulakum added a commit to akulakum/widgets that referenced this pull request Aug 24, 2026
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>
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.

3 participants