The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(website): plugin disclosures go at the bottom of the page
a37a140b16d91
diff --git a/website/src/components/PluginCatalog/MiniCard.tsx b/website/src/components/PluginCatalog/MiniCard.tsxindex 28354606e07..bb48ec6b8e3 100644--- a/website/src/components/PluginCatalog/MiniCard.tsx+++ b/website/src/components/PluginCatalog/MiniCard.tsx@@ -2,6 +2,7 @@ import React from "react";import Link from "@docusaurus/Link";import {type CatalogPlugin,+ cardSummary,categoryOf,formatStars,pluginPagePath,@@ -34,7 +35,7 @@ export default function MiniCard({ plugin }: { plugin: CatalogPlugin }) {</span>)}</div>- <p className={styles.miniDesc}>{plugin.description || "No description available."}</p>+ <p className={styles.miniDesc}>{cardSummary(plugin.description || "") || "No description available."}</p><span className={styles.miniCategory}>{category.label}</span></Link>);diff --git a/website/src/components/PluginCatalog/PluginPage.tsx b/website/src/components/PluginCatalog/PluginPage.tsxindex e4b7f5b1951..a2c0099f414 100644--- a/website/src/components/PluginCatalog/PluginPage.tsx+++ b/website/src/components/PluginCatalog/PluginPage.tsx@@ -155,11 +155,6 @@ export default function PluginPage({ data }: { data: PluginPageData }) {)}</p>{prose && <p className={styles.lede}>{prose}</p>}- {disclosures.map((text) => (- <aside key={text} className={styles.disclosure} role="note">- <strong>Disclosure</strong> — {text}- </aside>- ))}<div className={styles.actions}><a@@ -276,6 +271,17 @@ export default function PluginPage({ data }: { data: PluginPageData }) {</aside></div>+ {disclosures.length > 0 && (+ <section className={styles.section} aria-labelledby="disclosure">+ <h2 id="disclosure" className={styles.sectionTitle}>Disclosure</h2>+ {disclosures.map((text) => (+ <aside key={text} className={styles.disclosure} role="note">+ {text}+ </aside>+ ))}+ </section>+ )}+{author && moreByAuthor.length > 0 && (<section className={styles.section} aria-labelledby="more-by"><div className={styles.shelfHead}>diff --git a/website/src/components/PluginCatalog/catalog.ts b/website/src/components/PluginCatalog/catalog.tsindex e0349acb4e5..10fab1b1f0e 100644--- a/website/src/components/PluginCatalog/catalog.ts+++ b/website/src/components/PluginCatalog/catalog.ts@@ -179,9 +179,10 @@ export function formatDate(iso?: string | null): string | null {}/** Split a description into prose and its "Disclosure — …" sentences (catalog convention for- * behaviour a user opts into: auto-payments, vendor client identity, etc.). */+ * behaviour a user opts into: auto-payments, vendor client identity, etc.). Entries write the+ * marker with an em dash, en dash, hyphen or colon. */export function splitDisclosure(description: string): { prose: string; disclosures: string[] } {- const marker = /\bDisclosure\s*[—–-]\s*/g;+ const marker = /\bDisclosure\s*[—–:-]\s*/g;const idx = description.search(marker);if (idx === -1) return { prose: description, disclosures: [] };const prose = description.slice(0, idx).trim();@@ -192,3 +193,9 @@ export function splitDisclosure(description: string): { prose: string; disclosur.filter(Boolean);return { prose, disclosures };}++/** The one-line summary a card shows: the description minus its disclosure, or the whole+ * description when it opens with the disclosure and has no separate summary. */+export function cardSummary(description: string): string {+ return splitDisclosure(description).prose || description;+}diff --git a/website/src/pages/plugins/index.tsx b/website/src/pages/plugins/index.tsxindex 37497808438..e3879a6d180 100644--- a/website/src/pages/plugins/index.tsx+++ b/website/src/pages/plugins/index.tsx@@ -14,6 +14,7 @@ import {TIER_CONFIG,authorPagePath,capToolChips,+ cardSummary,categoryOf,desktopInstallLink,formatDate,@@ -86,7 +87,8 @@ function PluginCard({const hookCount = caps.providesHooks?.length || 0;const middlewareCount = caps.providesMiddleware?.length || 0;const toolChips = capToolChips(caps.providesTools);- const description = plugin.description || "No description available.";+ // Cards show what the plugin does; its disclosure sits at the bottom of the plugin's own page.+ const description = cardSummary(plugin.description || "") || "No description available.";// A broken banner URL swaps to the placeholder instead of collapsing, so the card keeps its// height (every card in a grid row shares one height; see .grid in styles.module.css).const [imageBroken, setImageBroken] = useState(false);