Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff0880bccc
ℹ️ 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".
| resolution: "@webex/contact-center@file:./vendor/contact-center-cc-summaries.tgz#./vendor/contact-center-cc-summaries.tgz::hash=66e859&locator=webex-widgets%40workspace%3A." | ||
| dependencies: | ||
| "@types/platform": "npm:1.3.4" | ||
| "@webex/calling": "npm:3.12.0-next.98" |
There was a problem hiding this comment.
Regenerate the vendored SDK's transitive lock entries
The new tarball stanza names @webex/calling@3.12.0-next.98 and six exact plugin versions, but yarn.lock contains no package records for any of those descriptors; local Yarn 4.5.1 already reports that the calling package is absent. In the checked .github/workflows/pull-request.yml Install Dependencies step, bare yarn runs on CI, and yarn install --help says --immutable “defaults to true on CI” and aborts if the lockfile would be modified, so a clean PR/deploy checkout cannot reach the build or tests. Regenerate and commit the complete lockfile for the vendored package.
AGENTS.md reference: AGENTS.md:L80-L81
Useful? React with 👍 / 👎.
| "@momentum-design/components": "0.133.23", | ||
| "@momentum-design/icons": "0.17.0" | ||
| "@momentum-design/icons": "0.17.0", | ||
| "@webex/contact-center": "file:./vendor/contact-center-cc-summaries.tgz" |
There was a problem hiding this comment.
Depend on a published SDK with the summary surface
This root-only resolution makes the private monorepo build against 3.12.0-cc-summaries.15f3da706d84, but the checked .github/workflows/deploy.yml publishes the workspace's own manifest, where @webex/cc-store still depends on @webex/contact-center@3.12.0-next.133. The added store spec explicitly says release requires a published SDK containing these APIs, so external TypeScript consumers receive declarations importing missing AISummary* exports and the supported host-supplied Webex path receives task objects without the new methods/events. Update the workspace dependency to a compatible published SDK, or block publishing this package until one exists.
AGENTS.md reference: AGENTS.md:L55-L57
Useful? React with 👍 / 👎.
| /** Sends the final post-call response once; it is never retried. */ | ||
| sendPostCallSummaryResponse = async ( | ||
| response: AISummaryResponse, | ||
| task: ITask = this.currentTask |
There was a problem hiding this comment.
Retain the summarized task for post-call submission
When a consumer follows the documented flow of freezing the response before wrap-up and sending it afterward, handleTaskRemove has already cleared or promoted currentTask; omitting the optional task argument here therefore either dereferences null (reported as response-failed) or sends the frozen response through a different task whose SDK context targets another interaction. Retain the original task/context with the response or make that task required so the default public path cannot lose or misroute the post-call result.
Useful? React with 👍 / 👎.
| this.logAISummaryFailure('request', error); | ||
| result = 'failed'; | ||
| } | ||
| if (this.getAISummaryEntry(role, task)?.status === 'loading') { |
There was a problem hiding this comment.
Tokenize overlapping AI summary requests
When requests A and B overlap and A rejects after B has set this shared entry to loading (the vendored SDK's requestAndWaitForRtd can still reject from A's send acknowledgement after its RTD waiter was replaced), this status-only check treats A's failure as current and changes B's entry to error; any later B settlement is then discarded because the status is no longer loading. The existing latest-request test only rejects A after B is already ready, so track and compare a per-request generation/token here instead.
AGENTS.md reference: AGENTS.md:L102-L102
Useful? React with 👍 / 👎.
Use SDK summary types directly and send only changed structured sections. Guard superseded request results, pair task listener cleanup, and require the original task for post-call submission. Repair the lockfile for immutable installs.
|
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: c8a3b2944b
ℹ️ 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.store.realTimeAssist = next; | ||
| }); | ||
| } | ||
| if (taskId && this.store.aiSummaries[taskId]) { |
There was a problem hiding this comment.
Clean up summaries for ended background tasks
When two interactions are active and the non-current task ends, its TASK_END handler only schedules refreshTaskList; since the current task is still present, that method takes its setCurrentTask branch and never calls handleTaskRemove for the ended task. Consequently this deletion (and the listener teardown just above it) never runs, so aiSummaries[taskId] and aiSummaryReceivedListeners[taskId] survive until logout and retain stale summary state and task listeners for the whole agent session. Prune summary entries and listeners for every ID removed from the refreshed task list, not only the current task.
Useful? React with 👍 / 👎.
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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: c75883b7c5
ℹ️ 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".
| const {sections, summaryText} = entry?.content ?? {}; | ||
| let summary: AISummaryResponse['summary'] = summaryText ?? ''; | ||
| // Receivers report SDK text. Editable summaries report only changed sections, like Desktop. | ||
| if (role !== 'receiver' && sections) { |
There was a problem hiding this comment.
Preserve text edits for mixed summary payloads
When an SDK payload contains both sections and summaryText (the new typedSections and structured fixtures do), the public editAISummary(..., 'summaryText', ...) succeeds and marks the entry edited, but this branch unconditionally replaces the outgoing summary with section deltas; if no section changed it sends {} while numberOfTimesEdited is 1. A component choosing the text field therefore silently drops the agent's edited content, so composition must follow the edited/displayed representation or the mutation API must reject that edit.
Useful? React with 👍 / 👎.
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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: 79b8573d80
ℹ️ 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".
| "@momentum-design/components": "0.133.23", | ||
| "@momentum-design/icons": "0.17.0" | ||
| "@momentum-design/icons": "0.17.0", | ||
| "@webex/contact-center": "file:./vendor/contact-center-cc-summaries.tgz" |
There was a problem hiding this comment.
Rebuild the vendored SDK before resolving it
When a receiving-agent summary carries the original conversation ID while the receiving task has its own interaction ID (the consult/transfer lineage covered by the SDK's included tests), this resolution loads the archive's main (dist/webex.js), whose dist/services/task/TaskManager.js still looks up only taskCollection[conversationId] and later flushes by task.data.interactionId; the archive's newer src/services/task/TaskManager.ts routes by interaction.mainInteractionId, but that source was not compiled into dist. Consequently TASK_MID_CALL_SUMMARY_RECEIVED is never emitted for those tasks, so the new store listener cannot populate the receiver summary. Rebuild and repack the archive from its included source before making it workspace-wide.
AGENTS.md reference: AGENTS.md:L56-L57
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 199f875fd0
ℹ️ 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".
| "@momentum-design/components": "0.133.23", | ||
| "@momentum-design/icons": "0.17.0" | ||
| "@momentum-design/icons": "0.17.0", | ||
| "@webex/contact-center": "file:./vendor/contact-center-cc-summaries.tgz" |
There was a problem hiding this comment.
Redact summaries from the vendored SDK log
When a submitted mid/post-call summary contains customer details, this resolution executes an archive whose dist/services/task/Task.js puts response.summary in eventMetaData, while dist/services/ApiAiAssistant.js logs that whole object through LoggerProxy.info('Sending event', ...) and LoggerProxy JSON-serializes it. ai-docs/SECURITY.md:30-35 classifies transcript/customer text as PII that must never be logged, so every such submission leaks generated or edited summary text to configured SDK logs; redact the metadata before using this archive.
AGENTS.md reference: AGENTS.md:L67-L67
Useful? React with 👍 / 👎.
|
|
||
| let result: AISummary | undefined; | ||
| try { | ||
| result = await (action ? task.requestMidCallSummary(action) : task.requestPostCallSummary()); |
There was a problem hiding this comment.
Settle superseded summary requests
When requests A and B of the same kind/conversation overlap, A's HTTP acknowledgement fails after B replaces it, and B's acknowledgement succeeds, this generation guard cannot make B finish: in the vendored runtime's dist/services/ApiAiAssistant.js, A's rejection calls removeRtdRequest by key, deleting B's waiter and clearing B's timeout. B's RTD response then has no waiter, so this await and the public promise remain pending and the entry stays loading indefinitely. Fresh evidence beyond the earlier status-race report is that the actual vendored runtime removes the new SDK waiter; cancel/settle superseded requests or serialize these calls.
AGENTS.md reference: AGENTS.md:L55-L57
Useful? React with 👍 / 👎.
| state: 'DEFAULT', | ||
| numberOfTimesViewed: 1, |
There was a problem hiding this comment.
Record unavailable summaries as not viewed
When the SDK returns an AISummary with areTranscriptsAvailable: false, getAISummarySurface and the status notification classify it as unavailable, but this response is still initialized as DEFAULT with one view. If the agent then continues the consult/transfer or wrap-up flow, the send methods forward that record and report a summary that was hidden as successfully viewed, corrupting summary outcome metrics; initialize transcript-unavailable results with zero views and the appropriate non-received state.
Useful? React with 👍 / 👎.
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Adds AI summary state, SDK event handling, feedback and response flows to the existing Contact Center store for consult/transfer, receiving-agent and post-call summaries.
AISummaryinentry.contentand SDKAISummaryResponseinentry.response, grouped by interaction and summary role. Requests, receiver events and edit/copy/feedback actions access the record directly and replace it insiderunInAction; senders forward it without a response composer or duplicate counter/feedback fields. Result handling, logging and status notification live in the owning flow. Empty responses supply the required SDK fields when no summary has arrived.task.aiSummaryCapabilitiesdirectly for summary requests and responses, matching suggested responses without an additional media-type restriction.task:featureEnablementrefreshes the current task after the SDK updates those flags, including late enablement and later disabling. The store keeps no separate capability map or enablement helper.Stack
This is PR 1 of 3. This cleanup is scoped to store PR #748.
Component PR #749 and widget integration PR #750 need to consume the SDK fields in
entry.contentandentry.response, includingentry.response.feedbackand the SDK copy/edit counts. Widget enablement checks should readtask.aiSummaryCapabilitiesdirectly in place of the removedisAISummaryEnabledhelper. Their presentation and UI lifecycle props remain in those PRs; SDK-backed fixtures includeconversationId.Verification
yarn test:unitpassed (91 suites, 1,834 tests passed, 7 skipped) andyarn test:stylespassed with 6 existing warnings.yarn install --immutableyarn build:dev(all widget packages)yarn workspace samples-cc-react-app build(sample TypeScript check)yarn workspace @webex/cc-store test:unit --runInBand: 330 passed, 3 skipped.git diff --checkis clean.SDK dependency
Uses published
@webex/contact-center3.12.0-next.148for the store, React sample and the sample's transitive Webex SDK. The vendored SDK archive is removed. Three scoped resolutions map unavailable transitive versions to their published predecessors: Devicenext.55tonext.54, Metricsnext.56tonext.55, and Mercurynext.62tonext.61. Remove these resolutions once the referenced versions are published. The React sample uses the SDK-supportedUser requested logoutreason on page unload.