Repository navigation
Fix config plugin display metadata - #2817
Conversation
🦋 Changeset detectedLatest commit: b088502 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
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 |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-test
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-loader
@emdash-cms/registry-moderation
@emdash-cms/registry-verification
upgrade-emdash
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-ai-search
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
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-1996The
sandbox: falsebypass path converts statically-sandboxed entries into in-processResolvedPluginobjects, but the descriptor it builds foradaptSandboxEntryomits thedisplayNameanddescriptionfields that were just added toSandboxedPluginEntry. As a result, config-registered sandboxed plugins loaded undersandbox: falsestill show their identifier instead of their display name and omit their description, undermining the PR's purpose for that mode. SinceadaptSandboxEntryalready 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, });
Overlapping PRsThis PR modifies files that are also changed by other open PRs:
This may cause merge conflicts or duplicated work. A maintainer will coordinate. |
|
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. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | b088502 | Nov 06 2026, 11:40 AM |
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
nameanddescriptionfromemdash-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
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.AI-generated code disclosure
Screenshots / test output
pnpm buildpnpm lintpnpm typecheckpnpm 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)