Skip to content

Deprecate @microsoft/sharepointembedded-copilotchat-react#242

Open
gnjoseph wants to merge 1 commit into
mainfrom
agents/deprecate-sharepoint-embedded-chat
Open

Deprecate @microsoft/sharepointembedded-copilotchat-react#242
gnjoseph wants to merge 1 commit into
mainfrom
agents/deprecate-sharepoint-embedded-chat

Conversation

@gnjoseph

@gnjoseph gnjoseph commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

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.

What changed

Across all three samples (boilerplate-typescript-react, project-management, legal-docs):

  • Deleted Copilot chat components, hooks, providers, and services
  • Removed the vendored SDK copy and .tgz tarball in legal-docs
  • Dropped the SDK dependency entry in each package.json (lockfiles regenerated)
  • Removed Copilot-only configuration:
    • sharePointHostname, COPILOT_CONFIG, SharePoint container scopes, copilotTheme
    • The getSharePointToken helpers that only existed to bootstrap the SDK
    • Dead Vite alias / dedupe blocks that were added to load the SDK shim
  • Removed UI affordances that opened the chat panel (toolbar buttons, flyout entries, resizable panels) and their dead CSS
  • Deleted 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
  • Repo-wide grep confirms no remaining references to the SDK package name, ChatEmbedded* types, useCopilotSite, getSharePointToken, or COPILOT_CONFIG

Rebased onto main + full smoke-test validation (2026-07-06)

Rebased onto current main (which now includes the validate-sample.ps1 smoke scripts from #248). Conflicts resolved by keeping the SDK removal while preserving main's unrelated changes; the legal-docs Vite 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-wide git grep now shows zero references to sharepointembedded-copilotchat-react anywhere (including lockfiles).

Validated all 8 sample apps on Windows / Node 24 via validate-sample.ps1:

Sample Touched by this PR Result
legal-docs yes ✅ PASS (build + preview)
project-management yes ✅ PASS (build + preview)
boilerplate-typescript-react yes ✅ build + tests pass (runtime SKIP_CONFIG — no secrets)
AI/mcp-server no ✅ build pass (SKIP_CONFIG)
Custom Apps/webhook no ✅ PASS
boilerplate-aspnet-webservice no ✅ build pass (SKIP_CONFIG)
boilerplate-react-azurefunction no ✅ build + tests pass (SKIP_CONFIG)
AI/ocr no ✅ build + tests + backend smoke pass (SKIP_CONFIG)

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.

legal-docs project-management boilerplate-typescript-react
legal-docs project-management boilerplate-typescript-react

@gnjoseph gnjoseph force-pushed the agents/deprecate-sharepoint-embedded-chat branch from 1a47f86 to bcab56d Compare June 15, 2026 21:57
@gnjoseph gnjoseph changed the title chore: deprecate @microsoft/sharepointembedded-copilotchat-react Deprecate @microsoft/sharepointembedded-copilotchat-react Jun 15, 2026
@gnjoseph gnjoseph requested review from Spucelik, Copilot and marcwindle and removed request for Spucelik and marcwindle June 15, 2026 22:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json files (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>
@gnjoseph gnjoseph force-pushed the agents/deprecate-sharepoint-embedded-chat branch from bcab56d to cba65cf Compare July 6, 2026 21:04
@gnjoseph

gnjoseph commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

✅ Sample apps running after SDK removal — screenshots

Built and launched each of the three samples touched by this PR (Node 24 / Windows) and captured the rendered UI to confirm they work with @microsoft/sharepointembedded-copilotchat-react fully removed. All three build, serve, and render their landing/sign‑in experience correctly with no Copilot chat surface.

legal-docs (vite preview)

The Copilot chat panel/flyout is gone; the app renders its full landing + sign‑in.

legal-docs running

project-management (vite preview)

Renders the login experience; the AI Assistant / Copilot toolbar affordances are removed.

project-management running

boilerplate-typescript-react (react-client production build)

ChatSidebar and the SDK provider are removed; Home/Containers and the getting‑started flow render normally.

boilerplate-typescript-react running


Screenshots captured with the repo's own Playwright tooling (Tools/sample-validation) against each sample's server, and hosted on the assets/pr-242-screenshots branch. The apps show their unauthenticated landing/sign‑in state because no local tenant secrets are configured — the same graceful downgrade the validate-sample.ps1 smoke tests report as SKIP_CONFIG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants