docs: add developer guide for MCP Apps UI#23
Conversation
Documents which tools ship an inline app UI, the SDK building blocks used by each app, and the shared theme/types/styles in ui/shared.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
Code ReviewDocs-only change (+133/-0). I verified the new Bugs / inaccuracies in the doc
Smaller things
Things that check out
Other considerations
Nice addition — once the |
Address review feedback on PR #23: - Describe the three-step build pipeline (build:ui → build:ui-imports → build:server) and clarify that src/generated/ui-html.ts is auto-generated, with the .ts/.js specifier distinction explained. - Rewrite the "Adding a new app" step that pointed at the generated file: contributors now edit package.json's build:ui, the tools array in scripts/generate-ui-imports.ts, and ui-html.d.ts. - List the file-tool-only CSS classes (.card-grid, .file-viewer, .entity-gallery) so a future de-identify_file revival has the reference. - Note the known drift between server outputSchema error fields and ui/shared/types.ts. - Document the two available layout patterns (tabs vs. side-by-side panels) using the existing apps as examples.
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
Review: docs: add developer guide for MCP Apps UIThanks for this — it's a genuinely useful internal guide, and I verified the claims against the current ✅ Verified accurate
🔧 One correction"SDK building blocks" table is mis-attributed. It says "Each 💬 Minor nits (non-blocking)
No bugs, security, or performance concerns — it's docs-only and doesn't touch the build. Test plan items (skim for accuracy, verify class table) are essentially satisfied by the verification above. Once the SDK-building-blocks attribution is fixed, this is good to merge. 👍 |
Address second-round review feedback on PR #23: - Split the "SDK building blocks" table into per-tool main.ts imports (App, PostMessageTransport) and the helpers used only in ui/shared/theme.ts (applyDocumentTheme, applyHostStyleVariables, applyHostFonts, McpUiHostContext). The previous single table implied every symbol was imported in main.ts. - Note that onhostcontextchanged is registered indirectly by setupHostTheming, not by the per-tool main.ts directly. - Add a pointer to docs/mcp-apps-ui.md from CLAUDE.md's "MCP Apps UI Layer" section so the guide is discoverable.
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
Review:
|
Summary
docs/mcp-apps-ui.mddescribing the apps UI layerde-identify,re-identify; notes the disabledde-identify_file)App,PostMessageTransport, host-theming helpers, lifecycle hooks) and the shared theme/types/styles inui/shared/CLAUDE.mdTest plan
docs/mcp-apps-ui.mdfor accuracy against currentui/andsrc/server.tsui/shared/styles.cssGenerated by Claude Code