docs: rename trusted -> native, improve native vs sandboxed plugin comparison#602
docs: rename trusted -> native, improve native vs sandboxed plugin comparison#602
Conversation
Rewrites plugin documentation to use 'native' instead of 'trusted' terminology and adds side-by-side comparisons showing what each plugin mode supports. Key changes: - Rewrite sandbox.mdx as comprehensive comparison page with tabbed examples - Fix incorrect claim that sandboxed plugins can't have API routes - Add sandbox-first messaging throughout plugin docs - Update terminology across 10 doc files (zero 'trusted' references remain)
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 6011227 | Apr 16 2026, 02:47 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
Pull request overview
Updates EmDash plugin documentation to standardize terminology (“native” vs “sandboxed”) and reduce confusion by adding a clearer, side-by-side comparison of execution modes and supported features.
Changes:
- Renames “trusted” → “native” across plugin docs and reference pages.
- Rewrites the sandbox page into a “Native vs. Sandboxed Plugins” comparison with tables, tabs, and decision guidance.
- Corrects docs to state that sandboxed plugins do support API routes, and clarifies route handler signature differences by plugin format.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/reference/hooks.mdx | Updates page fragment injection wording to “native plugins” terminology. |
| docs/src/content/docs/plugins/sandbox.mdx | Full rewrite into a native vs sandboxed comparison and sandbox architecture explanation. |
| docs/src/content/docs/plugins/publishing.mdx | Updates terminology in bundling/publishing guidance. |
| docs/src/content/docs/plugins/overview.mdx | Shifts overview to sandbox-first framing and updates execution mode terminology. |
| docs/src/content/docs/plugins/installing.mdx | Updates install paths and marketplace vs config comparison using “native” terminology. |
| docs/src/content/docs/plugins/hooks.mdx | Updates hook docs and reference table to “native-only” for page fragments. |
| docs/src/content/docs/plugins/creating-plugins.mdx | Adds guidance on standard vs native formats; removes outdated “routes are trusted-only” note. |
| docs/src/content/docs/plugins/block-kit.mdx | Updates terminology in Block Kit positioning/description. |
| docs/src/content/docs/plugins/api-routes.mdx | Corrects claim about sandbox support and clarifies handler signature differences. |
| docs/src/content/docs/concepts/architecture.mdx | Updates architecture terminology from trusted → native. |
Comments suppressed due to low confidence (1)
docs/src/content/docs/plugins/installing.mdx:122
- Native plugins run in-process on any platform (including Cloudflare Workers), so saying they “have full access to Node.js APIs” (and the comparison table’s “Node.js APIs: Full access”) isn’t accurate outside Node deployments. Please reword to “full access to the host runtime APIs” and, if you want to call out Node specifically, scope it to Node.js deployments (e.g., filesystem/process.env/Node built-ins).
Native plugins:
- Run in-process (not sandboxed)
- Have full access to Node.js APIs
- Are loaded at build time and on every server start
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| --- | ||
|
|
||
| import { Aside, Card, CardGrid, Steps } from "@astrojs/starlight/components"; | ||
| import { Aside, Card, CardGrid, Steps, Tabs, TabItem } from "@astrojs/starlight/components"; |
There was a problem hiding this comment.
The import list includes Card and CardGrid, but this page doesn't use either component. Unused imports can fail lint/typecheck in MDX tooling and add noise—please remove them or add the missing Card/CardGrid section if intended.
| import { Aside, Card, CardGrid, Steps, Tabs, TabItem } from "@astrojs/starlight/components"; | |
| import { Aside, Steps, Tabs, TabItem } from "@astrojs/starlight/components"; |
| Plugins can add custom block types to the Portable Text editor (YouTube embeds, code snippets, etc.). The editing UI uses Block Kit fields, which works in both modes. But rendering those blocks on the public site requires Astro components loaded at build time from npm -- so only native plugins can provide a `componentsEntry`. | ||
|
|
||
| In trusted mode: | ||
| Sandboxed plugins can still declare PT block types with editing fields. The site author just needs to provide their own rendering components or use a companion native package for rendering. |
There was a problem hiding this comment.
This section says sandboxed plugins can declare Portable Text block types (with editing fields) and only need help for site rendering. However, the bundler/runtime treats admin.portableTextBlocks as trusted/native-only (the CLI errors or warns that they’re ignored in sandboxed/marketplace plugins). Please update this text to reflect that sandboxed plugins can’t ship portableTextBlocks today (and adjust the guidance accordingly).
What does this PR do?
Rewrites plugin documentation to standardize on "native" (not "trusted") terminology and adds clear side-by-side comparisons of what sandboxed vs native plugins support. People were confused about the differences between the two modes.
Key changes:
plugins/sandbox.mdxfrom a security-focused page into a comprehensive comparison page ("Native vs. Sandboxed Plugins") with tabbed code examples showing React admin vs Block Kit, standard vs native format, etc.Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runpnpm locale:extracthas been run (if applicable)AI-generated code disclosure
Files changed
plugins/sandbox.mdxplugins/api-routes.mdxplugins/overview.mdxplugins/creating-plugins.mdxplugins/installing.mdxplugins/hooks.mdxplugins/block-kit.mdxplugins/publishing.mdxconcepts/architecture.mdxreference/hooks.mdx