Skip to content

docs: HTML Widgets in-depth guide - #2934

Draft
corinagum wants to merge 6 commits into
mainfrom
cg/widgets
Draft

docs: HTML Widgets in-depth guide#2934
corinagum wants to merge 6 commits into
mainfrom
cg/widgets

Conversation

@corinagum

@corinagum corinagum commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Do not merge: putting on hold per request of HTML Widgets PM.

Summary

Adds documentation for the HTML Widgets feature (in-depth guide) covering all three SDKs (TypeScript, Python, .NET). HTML Widgets let an app render rich, interactive HTML inside a Teams message via an MCP Apps (ext-apps) surface.

Pages added

Under In-Depth Guides > HTML Widgets:

  • Overview (README.mdx) - what HTML Widgets are, how they travel inside an extendedmarkdown message, the payload shape, and a "What the SDK provides" helper index.
  • Sending Widgets - building a widget message/markdown with the build helpers.
  • Handling Tool Calls - the typed htmlwidget/calltool handler and typed response shape.
  • Security Policy - securityPolicy, the validate/inject helpers, and their limits.
  • Updating Model Context - parsing a widget's ui/update-model-context request off an incoming message.

Notes

  • Every page carries a Preview admonition (the feature and its API surface are still in preview).
  • The Security Policy page includes a "Not a security boundary" note clarifying the helpers are development-time aids, not a replacement for the client's runtime enforcement or your own HTML review.

@corinagum
corinagum marked this pull request as ready for review July 23, 2026 21:59
Copilot AI review requested due to automatic review settings July 23, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new HTML Widgets in-depth documentation section to teams.md, covering the end-to-end flow (sending widgets, handling tool calls, security policy helpers, and model-context updates) with per-language include snippets (TypeScript/Python/.NET).

Changes:

  • Adds the HTML Widgets overview page with payload shape + navigation to sub-guides.
  • Adds four sub-guides (sending widgets, tool calls, security policy, updating model context).
  • Adds language-specific include snippets for each guide section, plus the new doc category definition.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
teams.md/src/pages/templates/in-depth-guides/html-widgets/README.mdx Overview page: concept, wire format, payload fields, and SDK helper index.
teams.md/src/pages/templates/in-depth-guides/html-widgets/sending-widgets.mdx Guide page for constructing/sending widget messages and markdown.
teams.md/src/pages/templates/in-depth-guides/html-widgets/handling-tool-calls.mdx Guide page for receiving htmlwidget/calltool invokes and returning typed results.
teams.md/src/pages/templates/in-depth-guides/html-widgets/security-policy.mdx Guide page for securityPolicy and the validate/inject helpers.
teams.md/src/pages/templates/in-depth-guides/html-widgets/updating-model-context.mdx Guide page for parsing ui/update-model-context requests from message activities.
teams.md/src/pages/templates/in-depth-guides/html-widgets/category.json Adds the “HTML Widgets” category metadata (sidebar position/label).
teams.md/src/components/include/in-depth-guides/html-widgets/sending-widgets/typescript.incl.md TS snippets for building widget messages/markdown.
teams.md/src/components/include/in-depth-guides/html-widgets/sending-widgets/python.incl.md Python snippets for building widget messages/markdown.
teams.md/src/components/include/in-depth-guides/html-widgets/sending-widgets/csharp.incl.md C# snippets for building widget messages/markdown.
teams.md/src/components/include/in-depth-guides/html-widgets/handling-tool-calls/typescript.incl.md TS snippets for handling tool calls + response shape.
teams.md/src/components/include/in-depth-guides/html-widgets/handling-tool-calls/python.incl.md Python snippets for handling tool calls + response shape.
teams.md/src/components/include/in-depth-guides/html-widgets/handling-tool-calls/csharp.incl.md C# snippets for handling tool calls + response shape.
teams.md/src/components/include/in-depth-guides/html-widgets/security-policy/typescript.incl.md TS snippets for validating policy + injecting protocol script.
teams.md/src/components/include/in-depth-guides/html-widgets/security-policy/python.incl.md Python snippets for validating policy + injecting protocol script.
teams.md/src/components/include/in-depth-guides/html-widgets/security-policy/csharp.incl.md C# snippets for validating policy + injecting protocol script.
teams.md/src/components/include/in-depth-guides/html-widgets/updating-model-context/typescript.incl.md TS snippet for parsing ui/update-model-context.
teams.md/src/components/include/in-depth-guides/html-widgets/updating-model-context/python.incl.md Python snippet for parsing ui/update-model-context.
teams.md/src/components/include/in-depth-guides/html-widgets/updating-model-context/csharp.incl.md C# snippet for parsing ui/update-model-context.

@nickwalkmsft nickwalkmsft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Who is the feature PM for this? Widgets in general aren't on the docs backlog.

Sorry, forgot my general sentiment - this is great! Most of these comments are questions.

Comment thread teams.md/src/pages/templates/in-depth-guides/html-widgets/sending-widgets.mdx Outdated
Comment thread teams.md/src/pages/templates/in-depth-guides/html-widgets/security-policy.mdx Outdated
Comment thread teams.md/src/pages/templates/in-depth-guides/html-widgets/security-policy.mdx Outdated
@corinagum
corinagum marked this pull request as draft July 27, 2026 19:47
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.

3 participants