Deprecate @microsoft/sharepointembedded-copilotchat-react#242
Conversation
1a47f86 to
bcab56d
Compare
There was a problem hiding this comment.
Pull request overview
This PR deprecates @microsoft/sharepointembedded-copilotchat-react across the samples repository by removing all Copilot chat UI/code paths, related configuration, and documentation/prompts that referenced the SDK.
Changes:
- Removed Copilot chat components/hooks/providers and all UI entry points that launched chat across the three samples.
- Deleted SDK shims/vendored artifacts and removed the SDK dependency from sample
package.jsonfiles (with lockfile updates where applicable). - Updated READMEs and removed AI prompt templates that instructed integrating the deprecated SDK.
Reviewed changes
Copilot reviewed 44 out of 47 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates root sample table to remove Copilot SDK advertising for legal-docs. |
| Custom Apps/README.md | Updates Custom Apps table to remove Copilot SDK mention for legal-docs. |
| Custom Apps/project-management/src/pages/Files.tsx | Removes Copilot panel/button and resizable split-pane layout; leaves file list as sole content. |
| Custom Apps/project-management/src/hooks/useCopilotSite.ts | Deletes Copilot-specific site/container metadata hook. |
| Custom Apps/project-management/src/context/AuthContext.tsx | Removes SharePoint-token helper that only supported Copilot auth. |
| Custom Apps/project-management/src/config/appConfig.ts | Removes Copilot-only config (sharePointHostname, theme). |
| Custom Apps/project-management/src/components/CopilotChat.tsx | Deletes Copilot chat wrapper component. |
| Custom Apps/project-management/src/components/copilot/CopilotMobileView.tsx | Deletes Copilot mobile drawer UI. |
| Custom Apps/project-management/src/components/copilot/CopilotDesktopView.tsx | Deletes Copilot desktop embedded chat view. |
| Custom Apps/project-management/src/components/copilot/CopilotChatContainer.tsx | Deletes Copilot chat container/auth/config wiring. |
| Custom Apps/project-management/package.json | Removes deprecated SDK dependency. |
| Custom Apps/legal-docs/vite.config.ts | Removes SDK-related React alias/dedupe/optimization configuration. |
| Custom Apps/legal-docs/tsconfig.app.json | Removes path mapping to the local SDK shim. |
| Custom Apps/legal-docs/src/services/copilotChat.ts | Deletes Copilot chat service (beta retrieval + search fallback). |
| Custom Apps/legal-docs/src/pages/Dashboard.tsx | Removes Copilot panel wiring from the dashboard flyout layout. |
| Custom Apps/legal-docs/src/lib/sharepointembedded-copilotchat-react/index.tsx | Deletes local shim for the deprecated SDK. |
| Custom Apps/legal-docs/src/hooks/useCopilotSite.ts | Deletes Copilot site/container hook used for chat context. |
| Custom Apps/legal-docs/src/context/AuthContext.tsx | Removes SharePoint-scoped token helper used only for Copilot SDK. |
| Custom Apps/legal-docs/src/config/sharepoint.ts | Removes Copilot/SDK-specific scopes and auth/config types. |
| Custom Apps/legal-docs/src/config/appConfig.ts | Removes Copilot configuration and SharePoint hostname utility used for Copilot. |
| Custom Apps/legal-docs/src/components/panels/CopilotPanel.tsx | Deletes Copilot flyout panel component. |
| Custom Apps/legal-docs/src/components/FlyoutButtons.tsx | Removes Copilot panel option from flyout button set/types. |
| Custom Apps/legal-docs/src/components/FloatingCopilotIcon.tsx | Deletes floating Copilot launcher UI. |
| Custom Apps/legal-docs/src/components/CustomCopilotChat.tsx | Deletes custom (non-SDK) Copilot-style chat UI. |
| Custom Apps/legal-docs/src/components/CopilotChat.tsx | Deletes SDK-based Copilot chat modal/panel. |
| Custom Apps/legal-docs/src/components/copilot/SDKCopilotChat.tsx | Deletes SDK-based chat implementation component. |
| Custom Apps/legal-docs/src/components/copilot/InlineCopilotChat.tsx | Deletes inline Copilot chat implementation. |
| Custom Apps/legal-docs/src/components/copilot/index.ts | Deletes Copilot component barrel exports. |
| Custom Apps/legal-docs/src/components/copilot/CopilotErrorBoundary.tsx | Deletes Copilot-specific error boundary. |
| Custom Apps/legal-docs/src/components/copilot/CopilotDesktopView.tsx | Deletes Copilot desktop view with CSP/debug handling. |
| Custom Apps/legal-docs/src/components/copilot/CopilotChatContainer.tsx | Deletes Copilot container/auth/config wrapper. |
| Custom Apps/legal-docs/src/components/copilot/CopilotAuthProvider.ts | Deletes Copilot SDK auth provider implementation. |
| Custom Apps/legal-docs/README.md | Removes Copilot integration claims and related configuration notes. |
| Custom Apps/legal-docs/package.json | Removes deprecated SDK dependency (file-based tgz). |
| Custom Apps/boilerplate-typescript-react/react-client/src/routes/Containers.tsx | Removes ChatController side effects from container selection. |
| Custom Apps/boilerplate-typescript-react/react-client/src/routes/App.tsx | Removes chat sidebar UI plumbing and hidden toolbar toggle. |
| Custom Apps/boilerplate-typescript-react/react-client/src/routes/App.css | Removes sidebar/chat-related styling. |
| Custom Apps/boilerplate-typescript-react/react-client/src/providers/ChatController.ts | Deletes Copilot chat controller/provider. |
| Custom Apps/boilerplate-typescript-react/react-client/src/providers/ChatAuthProvider.ts | Deletes Copilot chat auth provider. |
| Custom Apps/boilerplate-typescript-react/react-client/src/components/ChatSidebar.tsx | Deletes chat sidebar component (stubbed/disabled UI). |
| Custom Apps/boilerplate-typescript-react/react-client/src/common/Scopes.ts | Removes chat/SharePoint Container.Selected scope constants. |
| Custom Apps/boilerplate-typescript-react/react-client/package.json | Removes deprecated SDK dependency. |
| Custom Apps/boilerplate-typescript-react/react-client/package-lock.json | Removes deprecated SDK entry from lockfile. |
| AI/prompts/contoso-legal-agent.md | Removes prompt template that instructs integrating the deprecated SDK. |
| AI/prompts/contoso-audit-agent.md | Removes prompt template that instructs integrating the deprecated SDK. |
Files not reviewed (1)
- Custom Apps/boilerplate-typescript-react/react-client/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The @microsoft/sharepointembedded-copilotchat-react SDK is being deprecated. This PR removes every consumer of the SDK from the samples repo so the surface no longer advertises or depends on it. Removed across three samples (boilerplate-typescript-react, project-management, legal-docs): - Copilot chat components, hooks, providers, and services - The vendored SDK copy and tarball in legal-docs - The SDK dependency entry in each package.json (lockfiles regenerated) - Copilot-only config (sharePointHostname, COPILOT_CONFIG, SharePoint container scopes, copilotTheme), the SharePoint token acquisition helpers that only existed to bootstrap the SDK, and the dead Vite alias/dedupe blocks added to load the SDK shim - UI affordances that opened the chat panel (toolbar buttons, flyout entries, resizable panels) and their dead CSS - The AI prompt recipes that targeted this SDK (contoso-audit-agent, contoso-legal-agent) Documentation: - Root README and Custom Apps README no longer advertise "Copilot SDK" / "AI-assisted document review" for legal-docs - legal-docs README drops the Copilot integration bullet Verification: - npm install + npm run build pass for all three samples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bcab56d to
cba65cf
Compare
✅ Sample apps running after SDK removal — screenshotsBuilt and launched each of the three samples touched by this PR (Node 24 / Windows) and captured the rendered UI to confirm they work with legal-docs (
|



Summary
The
@microsoft/sharepointembedded-copilotchat-reactSDK is being deprecated. This PR removes every consumer of the SDK from the samples repo so the surface no longer advertises or depends on it.What changed
Across all three samples (
boilerplate-typescript-react,project-management,legal-docs):.tgztarball inlegal-docspackage.json(lockfiles regenerated)sharePointHostname,COPILOT_CONFIG, SharePoint container scopes,copilotThemegetSharePointTokenhelpers that only existed to bootstrap the SDKalias/dedupeblocks that were added to load the SDK shimcontoso-audit-agent,contoso-legal-agent)Documentation:
Custom Apps/READMEno longer advertise "Copilot SDK" / "AI-assisted document review" for legal-docslegal-docs/READMEdrops the Copilot integration bulletVerification
npm install+npm run buildpass for all three samplesChatEmbedded*types,useCopilotSite,getSharePointToken, orCOPILOT_CONFIGRebased onto main + full smoke-test validation (2026-07-06)
Rebased onto current main (which now includes the
validate-sample.ps1smoke scripts from #248). Conflicts resolved by keeping the SDK removal while preserving main's unrelated changes; thelegal-docsVite SDK alias/shim that #248 added was removed along with the rest of the SDK surface. Lockfiles re-pruned from main's versions (SDK-only deltas). Repo-widegit grepnow shows zero references tosharepointembedded-copilotchat-reactanywhere (including lockfiles).Validated all 8 sample apps on Windows / Node 24 via
validate-sample.ps1:SKIP_CONFIG= the sample built/tested successfully and gracefully skipped the runtime/browser smoke because tenant secrets (.env/local.settings.json/appsettings.json) aren't present locally — the expected downgrade, not a failure.Screenshots — apps running after SDK removal
Each touched sample was built and launched (Node 24), and the rendered UI captured with the repo's Playwright tooling. All three render correctly with the Copilot chat surface removed. Full-size images in this comment.