Repository navigation
Conversation
Generate lazy JavaScript media modules, preserve the approved raw assets, and let production UI logging use normal exports. Add package regression tests and update the sample and module specs. BREAKING CHANGE: Default wellness audio is a data URL. CSP must permit media-src data: or the host must supply an allowed wellnessAudioUrl.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
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. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
COMPLETES
Fixes the Vite compatibility regression reported after
@webex/cc-widgetswas upgraded from1.28.0-next.58to1.28.0-next.61.Related change: #741 — Agent Wellness Break (WXCC-12423). No separate defect issue was supplied.
This pull request addresses
The published AI Assistant media loader contains the Webpack request
!!./emit-wellness-asset.cjs!./WellnessBreakSound.mp3andrequire.ensure(). Vite cannot resolve these requests. Importing the widgets can therefore fail even when the consumer does not use wellness breaks.Full Vite consumer checks also found that UI logging was always built in development mode. Its exports were inside
eval()modules, which prevented Vite 8 from readingwithMetricsduring browser startup.by making the following changes
lottie-web. Accept both a default export and a direct CommonJS Lottie export.wellnessAudioUrlbypasses the default sound import.Compatibility and CSP
BREAKING CHANGE: The default wellness audio now uses a data URL. CSP must permit
data:inmedia-src. Consumers whose policy permits only hosted media must set the existingwellnessAudioUrlprop to an allowed MP3 URL. The encoded sound module is about 3.5 MB before compression; the original MP3 is 2,603,884 bytes.The existing recoverable
MEDIA_UNAVAILABLEpath handles media failures. Automatic retry and a hosted default fallback URL remain a follow-up that needs a published media endpoint.Rollback: revert this PR.
Change Type
The following scenarios were tested
yarn build:devandyarn build:prod; React and Web Component sample production builds./app/nested/.media-src 'self'blocks the data audio and permits the original MP3 served from the same origin.git diff --check.Browser: Chromium 156.0.8078.4, Playwright 1.64.0. Local consumers use the required UI peers and normal CSS/SCSS support; Parcel package exports are enabled. Browser import checks supply the existing host globals without starting an authenticated SDK session. These checks cover the listed versions. The Amplify preview build passed; hosted preview functionality and a live Contact Center agent session have not been tested.
The first full unit run with production fixtures stopped after a Jest worker was terminated. An isolated run reached Node's 4 GB heap limit. After
yarn build:dev, the store suite and the complete pre-commit hook passed.GitHub CI requires a code owner to add the
validatedlabel for a fork PR. The initial validation run stopped at this label gate, before the title check and CI tests.Testing record:
ai-docs/features/agent-wellness-break-intake.md.The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.