From e02801629659c2fa1c17f3bf9f800a8ce6c093f3 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 2 May 2026 17:29:25 +0800 Subject: [PATCH] feat(admin): surface ep.json disables in /admin plugin browser (#7649) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Companion to ether/ether.github.com#395 — the admin UI's "available plugins" listing now also renders the plugin's declared `disables` (see doc/PLUGIN_FEATURE_DISABLES.md) so an operator about to click Install sees the same warning as a user browsing etherpad.org/plugins: "Disables: chat". - src/node/types/PackageInfo.ts: optional `disables?: string[]` on the registry payload type. - admin/src/pages/Plugin.ts: same on the admin-side PluginDef. - admin/src/pages/HomePage.tsx: render an amber callout under the description when `disables` is present and non-empty. Plugins without a disables field render unchanged. The plugin-registry build pipeline still has to start surfacing `disables` from ep.json into plugins.json/plugins.viewer.json — until that lands, the new callout no-ops everywhere, which is fine. Co-authored-by: Claude Opus 4.7 (1M context) --- admin/src/pages/HomePage.tsx | 25 ++++++++++++++++++++++++- admin/src/pages/Plugin.ts | 6 ++++++ src/node/types/PackageInfo.ts | 10 +++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/admin/src/pages/HomePage.tsx b/admin/src/pages/HomePage.tsx index f5ce0a5ab..c21f593f3 100644 --- a/admin/src/pages/HomePage.tsx +++ b/admin/src/pages/HomePage.tsx @@ -229,7 +229,30 @@ export const HomePage = () => { filteredInstallablePlugins.map((plugin) => { return {plugin.name} - {plugin.description} + + {plugin.description} + {plugin.disables && plugin.disables.length > 0 && ( +
+ Disables: + {plugin.disables + .map((tag) => tag.replace(/^@feature:/, '')) + .join(', ')} +
+ )} + {plugin.version} {plugin.time} diff --git a/admin/src/pages/Plugin.ts b/admin/src/pages/Plugin.ts index 7e556d8a6..72c768c53 100644 --- a/admin/src/pages/Plugin.ts +++ b/admin/src/pages/Plugin.ts @@ -4,6 +4,12 @@ export type PluginDef = { version: string, time: string, official: boolean, + /** + * `@feature:*` Playwright tags for core specs the plugin intentionally + * disables. See doc/PLUGIN_FEATURE_DISABLES.md. May be undefined for + * plugins without a disables list, which is the common case. + */ + disables?: string[], } diff --git a/src/node/types/PackageInfo.ts b/src/node/types/PackageInfo.ts index c1be45847..9f83754fa 100644 --- a/src/node/types/PackageInfo.ts +++ b/src/node/types/PackageInfo.ts @@ -10,7 +10,15 @@ export type PackageInfo = { }, homepage: string, repository: string, - path: string + path: string, + /** + * `@feature:*` Playwright tags for core specs the plugin intentionally + * disables. Sourced from the plugin's ep.json `disables` array; see + * doc/PLUGIN_FEATURE_DISABLES.md for the contract. Populated by the + * plugin-registry build pipeline; absent for plugins that don't + * declare a disables list. + */ + disables?: string[] }