Skip to content

Fix config plugin display metadata - #2817

Merged
ascorbic merged 2 commits into
mainfrom
fix/config-plugin-metadata
Nov 6, 2026
Merged

ascorbic merged 2 commits into
mainfrom
fix/config-plugin-metadata

Conversation

@scottbuscemi

Copy link
Copy Markdown
Contributor

What does this PR do?

Allows config-registered trusted and sandboxed plugins to surface a display name and description in the admin Plugins list. Plugin build output now carries name and description from emdash-plugin.jsonc, and the first-party audit-log plugin declares its display name. Database-backed marketplace or registry metadata still takes precedence.

Closes #2815

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: OpenCode with GPT-5.6 Sol

Screenshots / test output

  • pnpm build
  • pnpm lint
  • pnpm typecheck
  • pnpm exec vitest run tests/integration/api/plugins.test.ts tests/unit/plugins/standard-format.test.ts tests/unit/astro/virtual-modules-sandbox.test.ts (20 tests)

@changeset-bot

changeset-bot Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b088502

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
emdash Patch
@emdash-cms/plugin-cli Patch
@emdash-cms/plugin-audit-log Patch
@emdash-cms/cloudflare Patch
@emdash-cms/plugin-test Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/admin Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
create-emdash Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@2817

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@2817

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@2817

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@2817

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@2817

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@2817

emdash

npm i https://pkg.pr.new/emdash@2817

create-emdash

npm i https://pkg.pr.new/create-emdash@2817

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@2817

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@2817

@emdash-cms/plugin-test

npm i https://pkg.pr.new/@emdash-cms/plugin-test@2817

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@2817

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@2817

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@2817

@emdash-cms/registry-loader

npm i https://pkg.pr.new/@emdash-cms/registry-loader@2817

@emdash-cms/registry-moderation

npm i https://pkg.pr.new/@emdash-cms/registry-moderation@2817

@emdash-cms/registry-verification

npm i https://pkg.pr.new/@emdash-cms/registry-verification@2817

upgrade-emdash

npm i https://pkg.pr.new/upgrade-emdash@2817

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@2817

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@2817

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@2817

@emdash-cms/plugin-ai-search

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-search@2817

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@2817

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@2817

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@2817

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@2817

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@2817

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@2817

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@2817

commit: b088502

@emdashbot emdashbot Bot 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.

This PR is the right fix for the stated problem: it threads optional displayName/description through the config plugin descriptor, the virtual-module generators, adaptSandboxEntry, definePlugin, and the admin list handler, while keeping marketplace/registry state metadata first. The changeset is accurate and proportional. I read the changed sources, the plugin manifest/schema pipeline, and the runtime bypass path.

The main gap is that the sandbox: false bypass path builds the in-process ResolvedPlugin via adaptSandboxEntry but drops the new metadata, so sandboxed config plugins still render as raw IDs when bypassed. That should be wired through to match the rest of the change. With that fixed, this is a clean bug fix.


Findings

  • [needs fixing] packages/core/src/emdash-runtime.ts:1983-1996

    The sandbox: false bypass path converts statically-sandboxed entries into in-process ResolvedPlugin objects, but the descriptor it builds for adaptSandboxEntry omits the displayName and description fields that were just added to SandboxedPluginEntry. As a result, config-registered sandboxed plugins loaded under sandbox: false still show their identifier instead of their display name and omit their description, undermining the PR's purpose for that mode. Since adaptSandboxEntry already accepts and returns these fields, pass them through here too.

    			const resolved = adaptSandboxEntry(pluginDef, {
    				id: entry.id,
    				displayName: entry.displayName,
    				description: entry.description,
    				version: entry.version,
    				entrypoint: "",
    				capabilities: entry.capabilities,
    				allowedHosts: entry.allowedHosts,
    				// eslint-disable-next-line typescript-eslint/no-unsafe-type-assertion -- adaptSandboxEntry copies storage through
    				storage: entry.storage as never,
    				adminPages,
    				adminWidgets,
    				settingsSchema: entry.settingsSchema,
    				portableTextBlocks: entry.portableTextBlocks,
    				fieldWidgets: entry.fieldWidgets,
    			});
    

@github-actions github-actions Bot added review/awaiting-author Reviewed; waiting on the author to respond overlap and removed review/needs-review No maintainer or bot review yet labels Aug 31, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Overlapping PRs

This PR modifies files that are also changed by other open PRs:

This may cause merge conflicts or duplicated work. A maintainer will coordinate.

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been inactive for 14 days. It will be closed automatically in 7 days if there is no further activity.

If you're still working on this, please push an update or leave a comment.

@github-actions github-actions Bot mentioned this pull request Sep 27, 2026
10 of 19 tasks
@github-actions github-actions Bot added stale and removed stale labels Sep 29, 2026
@github-actions github-actions Bot added review/needs-review No maintainer or bot review yet and removed review/awaiting-author Reviewed; waiting on the author to respond labels Oct 9, 2026
@emdashbot emdashbot Bot added review/needs-review No maintainer or bot review yet and removed review/needs-review No maintainer or bot review yet labels Nov 6, 2026
@ascorbic
ascorbic enabled auto-merge (squash) November 6, 2026 11:38
@github-actions github-actions Bot added review/approved Approved; no new commits since and removed review/needs-review No maintainer or bot review yet labels Nov 6, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
docs b088502 Nov 06 2026, 11:40 AM

@ascorbic
ascorbic merged commit dfbb9fc into main Nov 6, 2026
53 checks passed
@ascorbic
ascorbic deleted the fix/config-plugin-metadata branch November 6, 2026 11:49
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.

Config-registered plugins cannot surface a name or description in the admin Plugins list

2 participants