Skip to content

fix(docs): add missing mcp apps and custom elements manifest docs#105

Merged
coryrylan merged 1 commit into
mainfrom
topic-mcp-doc
May 27, 2026
Merged

fix(docs): add missing mcp apps and custom elements manifest docs#105
coryrylan merged 1 commit into
mainfrom
topic-mcp-doc

Conversation

@coryrylan
Copy link
Copy Markdown
Collaborator

@coryrylan coryrylan commented May 22, 2026

Summary by CodeRabbit

  • New Features

    • Added three chat pattern templates: Page Chat, Panel Chat, and Popover Chat
    • Added a Chat pattern tile to the patterns index
  • Documentation

    • New Chat Patterns docs with embedded examples
    • New Custom Elements Manifest documentation
    • Updated MCP docs with icon-listing and example-rendering tools
    • Site navigation updated to surface Custom Elements and Chat entries

Review Change Stack

@coryrylan coryrylan requested a review from johnyanarella May 22, 2026 21:11
@coryrylan coryrylan self-assigned this May 22, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

Adds three Lit-based chat pattern examples (PageChat, PanelChat, PopoverChat), new Chat and Custom Elements Manifest docs, MCP documentation updates for interactive MCP Apps and tools, and sidebar/index navigation entries for the new pages.

Changes

Chat Patterns, Docs, and Site Navigation

Layer / File(s) Summary
Chat pattern examples
projects/internals/patterns/src/chat.examples.ts
Three reusable chat layouts exported as Lit template patterns: PageChat (centered full-page with header, transcript, composer), PanelChat (right-side panel with persistent header, transcript, composer), and PopoverChat (launcher nve-icon-button that anchors an nve-dialog popover with inline popover-open logic).
Chat documentation and navigation
projects/site/src/docs/patterns/chat.md, projects/site/src/docs/patterns/index.md, projects/site/src/_11ty/layouts/common.js
Adds a Chat Patterns docs page embedding the three examples (Page, Panel, Popover), inserts a Chat card on the patterns index, and adds a Chat sidebar nav node that highlights when the page URL contains /docs/patterns/chat/.
Custom Elements Manifest documentation
projects/site/src/docs/integrations/custom-elements.md, projects/site/src/_11ty/layouts/common.js
New reference page describing Custom Elements Manifest usage (declaration via package.json#customElements, manifest contents, companion artifacts) and tooling/editor consumption; adds a "Custom Elements" nav node highlighted when the URL contains /docs/integrations/custom-elements/.
MCP server tools and UI features
projects/site/src/docs/mcp/index.md
Updates Elements MCP docs to mention interactive MCP Apps views, adds api_icons_list and examples_render tool entries, and creates a "MCP Apps UI" section documenting ui://elements/* resources, advertised MIME type, tool _meta.ui.resourceUri linking, example app views, and host/client behavior notes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions only MCP Apps and Custom Elements Manifest docs, but the PR also adds Chat pattern examples and documentation, which represents a significant portion of the changes. Revise the title to reflect all major additions, such as: 'docs: add chat patterns, custom elements manifest, and mcp apps documentation'
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch topic-mcp-doc

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@projects/internals/patterns/src/chat.examples.ts`:
- Line 55: The demo composer currently uses a submitting button element
(<nve-button> with type="submit") which can trigger form submissions; update the
<nve-button> in the chat example to use type="button" instead so it does not
submit/reload the docs preview—locate the <nve-button> in chat.examples.ts (the
Send button) and change its type attribute from "submit" to "button".

In `@projects/site/src/_11ty/layouts/common.js`:
- Line 139: The selected-state check on the nve-tree-node is comparing
data.page.url against '/docs/integrations/custom-elements/' but the anchor href
points to 'docs/integrations/custom-elements-manifest/'; update the condition in
the highlighted/selected expression to use
'/docs/integrations/custom-elements-manifest/' (or alternatively change the
anchor href to match the original '/docs/integrations/custom-elements/') so the
URL checked by data.page.url.includes(...) matches the link target (adjust the
expression near nve-tree-node and the anchor href accordingly).

In `@projects/site/src/docs/integrations/custom-elements.md`:
- Line 76: Replace the redundant phrase "HTML language services" in the sentence
that explains converting CEM data into data.html.json so VS Code-compatible HTML
language services can offer completions and hover docs for `nve-*` tags and
attributes; change it to a concise term like "HTML services" (or "HTML tooling")
so the sentence reads that Elements converts CEM data into `data.html.json` so
VS Code-compatible HTML services can offer completions and hover docs for
`nve-*` tags and attributes, and ensure the updated wording passes Vale lint
rules for `**/*.{md,ts,tsx}`.

In `@projects/site/src/docs/mcp/index.md`:
- Line 11: The H2 heading is a long run-on sentence; split it into two sentences
and add terminal punctuation by updating the <h2> element text: end the first
sentence after "Elements design system." and start a new sentence with "It gives
tools like Claude Code, Cursor, and Codex direct access to component APIs,
design tokens, template validation, project scaffolding, and interactive MCP
Apps views so your AI assistant can build with Elements effectively." Ensure the
updated heading ends each sentence with a period and remains wrapped in the same
<h2> element.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 215ff226-561b-4743-acd5-0d23629aa7ce

📥 Commits

Reviewing files that changed from the base of the PR and between 0c1812f and 7db828f.

📒 Files selected for processing (6)
  • projects/internals/patterns/src/chat.examples.ts
  • projects/site/src/_11ty/layouts/common.js
  • projects/site/src/docs/integrations/custom-elements.md
  • projects/site/src/docs/mcp/index.md
  • projects/site/src/docs/patterns/chat.md
  • projects/site/src/docs/patterns/index.md

Comment thread projects/internals/patterns/src/chat.examples.ts Outdated
Comment thread projects/site/src/_11ty/layouts/common.js Outdated
Comment thread projects/site/src/docs/integrations/custom-elements.md
Comment thread projects/site/src/docs/mcp/index.md
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
projects/site/src/docs/mcp/index.md (1)

11-11: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Heading still needs sentence split and terminal punctuation.

This remains hard to scan and still appears to violate the doc style linting expectation for clear sentence boundaries.

As per coding guidelines, "**/*.{md,ts,tsx}: Documentation files (*.md) and JSDoc comments in TypeScript must follow Vale linting rules (Google style guide, write-good rules, and custom Element rules)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/site/src/docs/mcp/index.md` at line 11, The heading in the <h2
nve-text="heading sm muted"> element is a single run-on sentence and lacks
terminal punctuation; split it into two or three short, clear sentences with
periods and make each sentence scannable (for example: describe what the
Elements MCP server does, then list key capabilities like component API access,
template validation, scaffolding, and MCP Apps integration). Update the text
inside the <h2 nve-text="heading sm muted"> tag accordingly so it conforms to
Vale/Google style (clear sentence boundaries, terminal punctuation) and keeps
the same meaning.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@projects/internals/patterns/src/chat.examples.ts`:
- Around line 5-12: The chat examples import block is missing the avatar
registration so <nve-avatar> remains un-upgraded; update the top import list in
projects/internals/patterns/src/chat.examples.ts (the block that currently
imports `@nvidia-elements/core/button/define.js`, chat-message/define.js,
dialog/define.js, icon-button/define.js, logo/define.js, page/define.js,
page-header/define.js, textarea/define.js) to also import
`@nvidia-elements/core/avatar/define.js` so the avatars rendered at the example
usages (around the <nve-avatar> occurrences) are properly registered and
upgraded.

---

Duplicate comments:
In `@projects/site/src/docs/mcp/index.md`:
- Line 11: The heading in the <h2 nve-text="heading sm muted"> element is a
single run-on sentence and lacks terminal punctuation; split it into two or
three short, clear sentences with periods and make each sentence scannable (for
example: describe what the Elements MCP server does, then list key capabilities
like component API access, template validation, scaffolding, and MCP Apps
integration). Update the text inside the <h2 nve-text="heading sm muted"> tag
accordingly so it conforms to Vale/Google style (clear sentence boundaries,
terminal punctuation) and keeps the same meaning.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 6e7a2799-5984-41b9-88a8-6f5b9429c0f3

📥 Commits

Reviewing files that changed from the base of the PR and between 7db828f and de45068.

📒 Files selected for processing (6)
  • projects/internals/patterns/src/chat.examples.ts
  • projects/site/src/_11ty/layouts/common.js
  • projects/site/src/docs/integrations/custom-elements.md
  • projects/site/src/docs/mcp/index.md
  • projects/site/src/docs/patterns/chat.md
  • projects/site/src/docs/patterns/index.md

Comment on lines +5 to +12
import '@nvidia-elements/core/button/define.js';
import '@nvidia-elements/core/chat-message/define.js';
import '@nvidia-elements/core/dialog/define.js';
import '@nvidia-elements/core/icon-button/define.js';
import '@nvidia-elements/core/logo/define.js';
import '@nvidia-elements/core/page/define.js';
import '@nvidia-elements/core/page-header/define.js';
import '@nvidia-elements/core/textarea/define.js';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether nve-avatar is used without explicit definition import in this file,
# and inspect whether chat-message define appears to register avatar transitively.

rg -n "nve-avatar|`@nvidia-elements/core/avatar/define.js`|`@nvidia-elements/core/chat-message/define.js`" projects/internals/patterns/src/chat.examples.ts

# If core source is present in-repo, inspect related define modules.
fd -i "define.js" | rg -n "avatar|chat-message" || true

Repository: NVIDIA/elements

Length of output: 332


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Confirm whether the current file imports avatar define directly
echo "== Direct avatar import in chat.examples.ts =="
rg -n "`@nvidia-elements/core/avatar/define.js`" projects/internals/patterns/src/chat.examples.ts || true

# 2) Locate the chat-message define.js source file(s) in the repo
echo "== Locating chat-message/define.js sources =="
fd -i "chat-message/define\.js$" . | head -n 20

# 3) For each located file, check whether it imports or mentions avatar registration/define
echo "== Searching for avatar usage inside chat-message/define.js =="
fd -i "chat-message/define\.js$" . -x rg -n "avatar|core/avatar/define\.js|nve-avatar" || true

# 4) Also locate avatar/define.js sources and see what they register (quick grep only)
echo "== Locating avatar/define.js sources =="
fd -i "avatar/define\.js$" . | head -n 20
fd -i "avatar/define\.js$" . -x rg -n "customElements\.define|define\\(" || true

Repository: NVIDIA/elements

Length of output: 255


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="projects/internals/patterns/src/chat.examples.ts"

echo "== File head (imports) =="
sed -n '1,120p' "$FILE" | cat -n

echo "== PopoverChat section (search for inline script) =="
# print a broader window where PopoverChat likely lives; adjust if needed
sed -n '120,240p' "$FILE" | cat -n

echo "== Direct search for inline <script type=\"module\"> =="
rg -n "<script[^>]*type=\"module\"" "$FILE" || true

Repository: NVIDIA/elements

Length of output: 8846


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "<script type=\"module\">" -S projects/internals/patterns/src || true
rg -n "<script type=\"module\">" -S projects || true | head -n 50
rg -n "whenDefined\\('nve-dialog'\\)|showPopover\\(\\{ source:" -S projects/internals/patterns/src || true

Repository: NVIDIA/elements

Length of output: 27642


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Files importing avatar define.js =="
rg -n "`@nvidia-elements/core/avatar/define`\.js" . | head -n 50

echo "== Files using nve-avatar in patterns/examples =="
rg -n "nve-avatar" projects/internals/patterns/src | head -n 50

echo "== Chat-message define.js imports in patterns =="
rg -n "`@nvidia-elements/core/chat-message/define`\.js" projects/internals/patterns/src

# For each file using nve-avatar under internals/patterns, see if it also imports avatar define.js
echo "== Cross-check for nve-avatar usage vs avatar define import (internals/patterns) =="
for f in $(rg -l "nve-avatar" projects/internals/patterns/src); do
  echo "--- $f"
  rg -n "`@nvidia-elements/core/avatar/define`\.js" "$f" || echo "(no avatar define import)"
done

Repository: NVIDIA/elements

Length of output: 6272


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the chat-message examples import block (for avatar usage)
FILE="projects/core/src/chat-message/chat-message.examples.ts"
echo "== chat-message.examples.ts import block =="
sed -n '1,120p' "$FILE" | cat -n

# Locate actual define.js files under core/src/chat-message and core/src/avatar
echo "== define.js under projects/core/src/chat-message =="
fd -i "define\.js$" projects/core/src/chat-message -a || true

echo "== define.js under projects/core/src/avatar =="
fd -i "define\.js$" projects/core/src/avatar -a || true

# If define.js exists, search for avatar/define.js import usage inside chat-message define implementation
echo "== Search for avatar define import inside chat-message define.js (if present) =="
fd -i "define\.js$" projects/core/src/chat-message -a | xargs -r rg -n "`@nvidia-elements/core/avatar/define`\.js|avatar" || true

Repository: NVIDIA/elements

Length of output: 6115


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Find occurrences where chat-message define is imported, nve-avatar is used,
#    but avatar define is NOT imported (in same file).
echo "== Patterns/examples: chat-message define + nve-avatar usage without avatar define =="
rg -n "`@nvidia-elements/core/chat-message/define`\.js" projects | cut -d: -f1 | sort -u | while read -r f; do
  if rg -q "nve-avatar" "$f"; then
    if ! rg -q "`@nvidia-elements/core/avatar/define`\.js" "$f"; then
      echo "$f"
    fi
  fi
done

# 2) Inspect Vite inline <script type="module"> guidance
echo "== Inspect internals/vite/README.md around inline module script note =="
sed -n '150,230p' projects/internals/vite/README.md | cat -n

echo "== Search for 'does not emit JS from inline <script type=\"module\">' =="
rg -n "does not emit JS from inline `<script type=\"module\">`|inline `<script type=\"module\">`" projects/internals/vite -S || true

echo "== Inspect playwright runner comment area (if present) =="
sed -n '70,140p' projects/internals/vite/src/runners/playwright.js | cat -n

Repository: NVIDIA/elements

Length of output: 3448


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Locate chat-message/define.js in repo =="
fd -i "chat-message/define\.js$" . | head -n 50
fd -i "chat-message.*define\.js$" projects/core | head -n 50 || true
rg -n "`@nvidia-elements/core/chat-message/define`\.js" projects/core -S | head -n 50 || true

echo "== Locate avatar/define.js in repo =="
fd -i "avatar/define\.js$" . | head -n 50
fd -i "avatar.*define\.js$" projects/core | head -n 50 || true
rg -n "`@nvidia-elements/core/avatar/define`\.js" projects/core -S | head -n 50 || true

echo "== Inspect vite Playwright runner inline <script type=module> note =="
FILE="projects/internals/vite/src/runners/playwright.js"
if [ -f "$FILE" ]; then
  sed -n '70,140p' "$FILE" | cat -n
else
  echo "Missing $FILE"
fi

echo "== Search again for the inline-script note safely =="
rg -n "Vite 8/Rolldown does not emit JS from inline" projects/internals/vite -S || true

Repository: NVIDIA/elements

Length of output: 6017


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Files that import chat-message/define.js
# and also reference nve-avatar.
rg -l "`@nvidia-elements/core/chat-message/define`\.js" . | while read -r f; do
  if rg -q "nve-avatar" "$f"; then
    if ! rg -q "`@nvidia-elements/core/avatar/define`\.js" "$f"; then
      echo "$f"
    fi
  fi
done

Repository: NVIDIA/elements

Length of output: 110


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "inline <script type=\"module\">|html-proxy modules|does not emit JS from inline|whenDefined\\(|showPopover\\(" projects/internals projects/site projects/internals/patterns/src -S || true

# Specifically see if chat/popover examples are referenced in docs/tests.
rg -n "chat-popover|chat-launcher" projects/internals/patterns/src -S || true

Repository: NVIDIA/elements

Length of output: 2040


Add @nvidia-elements/core/avatar/define.js to the chat example import block

projects/internals/patterns/src/chat.examples.ts renders <nve-avatar> (lines 38, 42, 46) but the registration imports do not include @nvidia-elements/core/avatar/define.js, which can leave avatars un-upgraded in isolated pattern rendering. Other chat-message examples import both @nvidia-elements/core/chat-message/define.js and @nvidia-elements/core/avatar/define.js (e.g., projects/core/src/chat-message/chat-message.examples.ts), so this file should match.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/internals/patterns/src/chat.examples.ts` around lines 5 - 12, The
chat examples import block is missing the avatar registration so <nve-avatar>
remains un-upgraded; update the top import list in
projects/internals/patterns/src/chat.examples.ts (the block that currently
imports `@nvidia-elements/core/button/define.js`, chat-message/define.js,
dialog/define.js, icon-button/define.js, logo/define.js, page/define.js,
page-header/define.js, textarea/define.js) to also import
`@nvidia-elements/core/avatar/define.js` so the avatars rendered at the example
usages (around the <nve-avatar> occurrences) are properly registered and
upgraded.

Signed-off-by: Cory Rylan <crylan@nvidia.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
projects/site/src/docs/mcp/index.md (1)

11-11: ⚠️ Potential issue | 🟡 Minor

Split the run-on heading and add terminal punctuation.

This heading is still a long run-on sentence without proper punctuation. As noted in a previous review, break it into clearer sentences with terminal punctuation to improve readability and comply with Vale/write-good style rules.

As per coding guidelines, "**/*.{md,ts,tsx}: Documentation files (*.md) and JSDoc comments in TypeScript must follow Vale linting rules (Google style guide, write-good rules, and custom Element rules)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/site/src/docs/mcp/index.md` at line 11, The H2 heading string in the
Markdown ("The Elements MCP server connects AI coding assistants to the Elements
design system...") is a run-on sentence; split it into two or more clear
sentences and add terminal punctuation (periods) to improve readability and
satisfy Vale/write-good rules — for example, end the first sentence after
"design system." and start a new sentence like "It gives tools such as Claude
Code, Cursor, and Codex direct access to component APIs, design tokens, template
validation, project scaffolding, and interactive MCP Apps views so your AI
assistant can build with Elements effectively." Update the <h2> element text
accordingly to reflect the split and proper punctuation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@projects/site/src/docs/mcp/index.md`:
- Line 291: The paragraph is too dense—split the single sentence into 2–3
clearer sentences: first describe that each app resource is a self-contained
HTML document and list the included components (Elements components, theme CSS,
typography CSS, layout CSS, and the MCP Apps client); then describe the MCP Apps
client responsibilities (initializing the app, reporting size changes, receiving
tool input and result notifications, and calling server tools via the MCP Apps
message channel); finally add a short sentence about security: state that
message handling validates the parent origin before parsing inbound JSON-RPC
payloads. Use the phrases "MCP Apps client" and "message handling validates the
parent origin" so reviewers can locate and verify the change.

---

Duplicate comments:
In `@projects/site/src/docs/mcp/index.md`:
- Line 11: The H2 heading string in the Markdown ("The Elements MCP server
connects AI coding assistants to the Elements design system...") is a run-on
sentence; split it into two or more clear sentences and add terminal punctuation
(periods) to improve readability and satisfy Vale/write-good rules — for
example, end the first sentence after "design system." and start a new sentence
like "It gives tools such as Claude Code, Cursor, and Codex direct access to
component APIs, design tokens, template validation, project scaffolding, and
interactive MCP Apps views so your AI assistant can build with Elements
effectively." Update the <h2> element text accordingly to reflect the split and
proper punctuation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 9e088ac2-1489-473a-90e3-65b75023ee93

📥 Commits

Reviewing files that changed from the base of the PR and between de45068 and a1bd8d7.

📒 Files selected for processing (6)
  • projects/internals/patterns/src/chat.examples.ts
  • projects/site/src/_11ty/layouts/common.js
  • projects/site/src/docs/integrations/custom-elements.md
  • projects/site/src/docs/mcp/index.md
  • projects/site/src/docs/patterns/chat.md
  • projects/site/src/docs/patterns/index.md

</nve-grid-row>
</nve-grid>

Each app resource is a self-contained HTML document that includes Elements components, theme CSS, typography CSS, layout CSS, and a small MCP Apps client. The client initializes the app, reports size changes, receives tool input and result notifications, and calls server tools through the MCP Apps message channel when it needs more data. Message handling validates the parent origin before reading inbound JSON-RPC payloads.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Split the dense technical sentence for readability.

This sentence packs architecture details, five component types, four client responsibilities, and security validation into a single statement. Breaking it into two or three sentences would improve comprehension without losing technical accuracy.

✏️ Suggested restructuring
-Each app resource is a self-contained HTML document that includes Elements components, theme CSS, typography CSS, layout CSS, and a small MCP Apps client. The client initializes the app, reports size changes, receives tool input and result notifications, and calls server tools through the MCP Apps message channel when it needs more data. Message handling validates the parent origin before reading inbound JSON-RPC payloads.
+Each app resource is a self-contained HTML document that includes Elements components, theme CSS, typography CSS, layout CSS, and a small MCP Apps client. The client initializes the app, reports size changes, and receives tool input and result notifications. When the app needs more data, the client calls server tools through the MCP Apps message channel; message handling validates the parent origin before reading inbound JSON-RPC payloads.

As per coding guidelines, "**/*.{md,ts,tsx}: Documentation files (*.md) and JSDoc comments in TypeScript must follow Vale linting rules (Google style guide, write-good rules, and custom Element rules)".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Each app resource is a self-contained HTML document that includes Elements components, theme CSS, typography CSS, layout CSS, and a small MCP Apps client. The client initializes the app, reports size changes, receives tool input and result notifications, and calls server tools through the MCP Apps message channel when it needs more data. Message handling validates the parent origin before reading inbound JSON-RPC payloads.
Each app resource is a self-contained HTML document that includes Elements components, theme CSS, typography CSS, layout CSS, and a small MCP Apps client. The client initializes the app, reports size changes, and receives tool input and result notifications. When the app needs more data, the client calls server tools through the MCP Apps message channel; message handling validates the parent origin before reading inbound JSON-RPC payloads.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/site/src/docs/mcp/index.md` at line 291, The paragraph is too
dense—split the single sentence into 2–3 clearer sentences: first describe that
each app resource is a self-contained HTML document and list the included
components (Elements components, theme CSS, typography CSS, layout CSS, and the
MCP Apps client); then describe the MCP Apps client responsibilities
(initializing the app, reporting size changes, receiving tool input and result
notifications, and calling server tools via the MCP Apps message channel);
finally add a short sentence about security: state that message handling
validates the parent origin before parsing inbound JSON-RPC payloads. Use the
phrases "MCP Apps client" and "message handling validates the parent origin" so
reviewers can locate and verify the change.

@coryrylan coryrylan merged commit 56d8415 into main May 27, 2026
13 checks passed
@coryrylan coryrylan deleted the topic-mcp-doc branch May 27, 2026 19:29
@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.2.0 🎉

Changelog

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants