Fix compatibility issues in nodejs copilotstudio-webchat-react sample - #705
Merged
tracyboehrer (tracyboehrer) merged 6 commits intoAug 26, 2026
Merged
tracyboehrer (tracyboehrer) merged 6 commits into
tracyboehrer (tracyboehrer) merged 6 commits into
Conversation
Copilot started reviewing on behalf of
Cecilia Avila (ceciliaavila)
August 26, 2026 13:29
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates several Node.js samples to address dependency compatibility issues (notably MSAL in the Copilot Studio WebChat React sample), modernize React rendering for newer React versions, and improve OpenTelemetry trace sampling behavior.
Changes:
- Pinned/downgraded
@azure/msal-browser(and corresponding@azure/msal-common) plus pinned@microsoft/agents-copilotstudio-clientincopilotstudio-webchat-react. - Updated the React sample entrypoint to use
react-dom/client’screateRootAPI instead of legacyReactDOM.render. - Updated Agents SDK package versions in the
cardsandentra-agent-id-sidecarsamples; adjusted lockfiles accordingly; updated OTel instrumentation to sample all traces.
Reviewed changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| samples/nodejs/copilotstudio-webchat-react/package.json | Pins MSAL and Copilot Studio client dependency versions for compatibility. |
| samples/nodejs/copilotstudio-webchat-react/package-lock.json | Aligns lockfile with pinned MSAL/Copilot Studio client versions. |
| samples/nodejs/copilotstudio-webchat-react/src/index.tsx | Switches to createRoot rendering path for React 18+/19 compatibility. |
| samples/nodejs/cards/package.json | Updates Agents hosting dependency versions. |
| samples/nodejs/cards/package-lock.json | Updates lockfile to match Agents hosting dependency changes. |
| samples/nodejs/entra-agent-id-sidecar/package.json | Updates Agents hosting-express dependency version. |
| samples/nodejs/entra-agent-id-sidecar/package-lock.json | Updates lockfile for new Agents hosting-express version and transitive deps. |
| samples/nodejs/otel/src/instrumentation.ts | Ensures trace sampling is always-on to avoid missing traces. |
Files not reviewed (3)
- samples/nodejs/cards/package-lock.json: Generated file
- samples/nodejs/copilotstudio-webchat-react/package-lock.json: Generated file
- samples/nodejs/entra-agent-id-sidecar/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tracyboehrer (tracyboehrer)
enabled auto-merge
August 26, 2026 13:59
tracyboehrer (tracyboehrer)
approved these changes
Aug 26, 2026
tracyboehrer (tracyboehrer)
deleted the
southworks/update/revert-incompatible-deps
branch
August 26, 2026 14:00
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.
Description
This PR downgrades the
@azure/msal-browserpackage in thecopilotstudio-webchat-reactsample to previously used version to avoid compatibility issues.It also fix a React rendering issue raised after upgrading to version 19.
Additionally, it upgrades some missing @microsoft/agents packages to latest release and fixes the OTel sample not exporting traces problem.
Dependency updates:
@azure/msal-browserfrom version^5.18.0/5.19.0to4.13.1and locked the version in bothpackage.jsonandpackage-lock.jsonforsamples/nodejs/copilotstudio-webchat-react, including updating its dependency@azure/msal-commonto15.7.0. Also locked@microsoft/agents-copilotstudio-clientto1.7.2. [1] [2] [3]@microsoft/agents-hostingand@microsoft/agents-hosting-expressto^1.7.2insamples/nodejs/cards/package.jsonandsamples/nodejs/entra-agent-id-sidecar/package.json. [1] [2]React rendering update:
samples/nodejs/copilotstudio-webchat-react/src/index.tsxto use the moderncreateRootAPI fromreact-dom/clientinstead of the legacyReactDOM.render, improving compatibility with React 18+.OpenTelemetry instrumentation improvements:
AlwaysOnSamplerto the OpenTelemetry SDK configuration insamples/nodejs/otel/src/instrumentation.ts, ensuring all traces are sampled for telemetry. [1] [2]Testing
This image shows the copilotstudio-webchat-react sample working after the changes.
