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: f75a3c08dc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return transcriptLines.map((line, index) => { | ||
| const payload: RealtimeTranscriptionData = { | ||
| messageId: line.messageId, | ||
| conversationId: line.conversationId, | ||
| role: line.role, |
There was a problem hiding this comment.
Filter realtime transcript lines by current task
useRealtimeTranscript receives currentTaskId but maps every item in realtimeTranscriptLines without task/conversation filtering. Since the store subscribes transcription events on each task, multi-task sessions will show utterances from other interactions in the currently selected task transcript, which can leak cross-call content and corrupt the UI. Filter by the selected task (or store a task identifier on each line) before mapping.
Useful? React with 👍 / 👎.
| aria-selected={activeTab === 'live'} | ||
| className={`real-time-transcript__tab ${activeTab === 'live' ? 'real-time-transcript__tab--active' : ''}`.trim()} | ||
| onClick={() => onTabChange?.('live')} | ||
| data-testid="real-time-transcript:live-tab" | ||
| > |
There was a problem hiding this comment.
Add an IVR tab trigger to the transcript tablist
The component models two tabs ('ivr' | 'live') and has separate IVR rendering, but the tablist renders only a Live tab and its handler only emits 'live'. In the default state, users have no in-component way to switch to IVR content, so ivrTranscript is effectively inaccessible unless a parent forces activeTab='ivr' externally.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c933ce8eb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| CallControlCAD, | ||
| store, | ||
| OutdialCall, | ||
| RealtimeTranscript, |
There was a problem hiding this comment.
Import RealTimeTranscript using the exported symbol name
@webex/cc-widgets now exports the widget as RealTimeTranscript, but this sample imports RealtimeTranscript (lowercase t in Time). In environments that type-check or validate ESM named imports, this causes a build/runtime failure (RealtimeTranscript is undefined), so the new sample toggle cannot render the transcript widget.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I went back to SDK PR#4794 to realize that the transcripts are being started always based on certain events:
export const TRANSCRIPT_EVENT_MAP = {
[CC_EVENTS.AGENT_CONTACT_ASSIGNED]: 'START',
[CC_EVENTS.AGENT_CONSULTING]: 'START',
[CC_EVENTS.AGENT_CONSULT_CONFERENCED]: 'START',
[CC_EVENTS.AGENT_WRAPUP]: 'STOP',
[CC_EVENTS.AGENT_CONSULT_ENDED]: 'STOP',
[CC_EVENTS.PARTICIPANT_LEFT_CONFERENCE]: 'STOP',
};
However, what if the developer doesn't want to enable transcript from SDK or in this case, the RTT widget isn't included by the developer?
There was a problem hiding this comment.
Shouldn't it still be "transcripts" because it is not one transcript you get?
There was a problem hiding this comment.
feature says real time transcript and everywhere we are keeping without s so to make it consistent I changed
There was a problem hiding this comment.
Can we remove this file change? Looks like they're only quotes and spacing change that's unnecessary
| <section className={`real-time-transcript ${className || ''}`.trim()} data-testid="real-time-transcript:root"> | ||
| <div className="real-time-transcript__content" data-testid="real-time-transcript:live-content"> | ||
| {sortedEntries.length === 0 ? ( | ||
| <div className="real-time-transcript__empty">No live transcript available.</div> |
There was a problem hiding this comment.
Should this be behind a constant so that we can do i18n later?
| const normalizedRealtimeData = { | ||
| ...data, | ||
| role, | ||
| caller, | ||
| content: (payload?.content || data.content || '').trim(), | ||
| publishTimestamp: Number.isNaN(publishTimestamp) ? Date.now() : publishTimestamp, | ||
| }; |
There was a problem hiding this comment.
Couldn't we have encapsulated this normalization in the SDK itself so that other SDK users also benefitted from it?
We could have the raw data but also the normalized one?
Or better, we handle this whole merging of transcripts at the SDK itself and just send the new list of transcripts to Widgets?
There was a problem hiding this comment.
This is to be able to provide control to the consumers. As of now we do not know how each consumer would like to handle these event data so that's why I have kept it in widgets.
AGENT_CONTACT_ASSIGNED is an event that happens for any incoming call and for consult offer, it is going to be CONSULTING so transcriptions are basically supposed to start for any incoming accepted task. RealTime transcription enablement is actually dependent on if the feature is enabled from control hub setting |
COMPLETES
This pull request addresses
Merging the feature branch created for rtt with next
by making the following changes
Merging the feature branch created for rtt with next
Change Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.