Skip to content

feat(ccwidgets): Implementing Real Time Assistance feature within cc widgets#722

Open
Kesari3008 wants to merge 8 commits into
webex:nextfrom
Kesari3008:Suggested-Response
Open

feat(ccwidgets): Implementing Real Time Assistance feature within cc widgets#722
Kesari3008 wants to merge 8 commits into
webex:nextfrom
Kesari3008:Suggested-Response

Conversation

@Kesari3008

Copy link
Copy Markdown
Contributor

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

This pull request addresses

Implementing Real Time Assistant Widget within existing cc widgets

by making the following changes

Added new widget: AI Assiatnt under which real time assistance feature is implemented

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

  • The testing is done with the amplify link
    < ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

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 - Please Specify
  • 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.

@Kesari3008
Kesari3008 requested a review from a team as a code owner July 21, 2026 18:23
@Kesari3008 Kesari3008 added the validated Indicates that the PR is ready for actions label Jul 21, 2026
@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-722.d1b38q61t1z947.amplifyapp.com

@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: 65e4090194

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

@@ -0,0 +1,70 @@
{
"name": "@webex/cc-ai-assistant",

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 Add the AI assistant spec alongside the module

This introduces a new workspace package/widget, but the change contains no ai-assistant module spec or standing-doc/router update, so the new public surface cannot be routed or validated by the repo's SDD docs. Please add the module spec/standing doc updates in the same change as the code.

AGENTS.md reference: AGENTS.md:L68-L68

Useful? React with 👍 / 👎.

);
}

if (status === 'listening' || hasFiredInitialRequest) {

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 Show errors before the listening placeholder

When the first getRealTimeAssistance call rejects, the hook has already set hasFiredInitialRequest to true and then sets status to error; this branch runs before the error branch, so the panel keeps showing “Listening for information” and never exposes the retry/error message. Please check status === 'error' before the hasFiredInitialRequest listening fallback.

Useful? React with 👍 / 👎.

Comment on lines +22 to +24
oninput={(e: CustomEvent<{value: string}> & {target: HTMLInputElement}) =>
onChange(e.detail?.value ?? e.target?.value ?? '')
}

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 Use React's input handler for context changes

For the Momentum React Input, the repo's existing usage is the camel-cased onInput; this lowercase oninput prop is not handled by the React wrapper, so typing in the “Add context” field never calls onChange and the controlled value stays empty. That blocks agents from submitting extra context after starting a suggestion session.

Useful? React with 👍 / 👎.

onClose: 'function',
onClearChat: 'function',
onFullScreenToggle: 'function',
onSuggestionReceived: 'function',

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 Bridge the exposed suggestion callback

For Web Component consumers this is the only arrival callback exposed, but the AI assistant hook only reads and invokes onRealTimeAssistReceived, never onSuggestionReceived. As a result <widget-cc-ai-assistant onSuggestionReceived=...> will not fire when a suggestion arrives; please either expose onRealTimeAssistReceived here or bridge the deprecated prop to the new callback.

Useful? React with 👍 / 👎.

Comment on lines +630 to +637
<label key={widget}>
<input
type="checkbox"
name={widget}
checked={selectedWidgets[widget]}
onChange={handleCheckboxChange}
data-testid={`samples:widget-${widget}`}
/>

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 Remove the duplicate widget checkbox

Each widget now renders this second label in addition to the original one above it, producing duplicate checkboxes with the same name and data-testid. In WebRTC-locked mode the duplicate also omits the disabled guard, so users can still toggle widgets that the first checkbox correctly disables, and tests querying by test id become ambiguous.

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.

5 participants