From ec8a9ec508297cbb4978d5482ba79aa9acef1b28 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Sat, 1 Aug 2026 17:40:19 -0700 Subject: [PATCH] fix: simplify skills.sh catalog presentation (#3371) --- .../home-listing-section.claw591.test.tsx | 2 +- src/components/HomeListingSection.tsx | 1 - src/components/SkillsShCatalogDetail.test.tsx | 15 ++++++++++++++- src/components/SkillsShCatalogDetail.tsx | 5 ++++- src/styles.css | 14 -------------- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/__tests__/home-listing-section.claw591.test.tsx b/src/__tests__/home-listing-section.claw591.test.tsx index d7e9388d..c5e3582a 100644 --- a/src/__tests__/home-listing-section.claw591.test.tsx +++ b/src/__tests__/home-listing-section.claw591.test.tsx @@ -155,7 +155,7 @@ describe("HomeListingSection", () => { render(); expect(screen.getByText("@doany-skills")).toBeTruthy(); - expect(screen.getByText("skills.sh")).toBeTruthy(); + expect(screen.queryByText("skills.sh")).toBeNull(); expect(screen.getByLabelText("Downloads").textContent).toContain("12.3k"); }); diff --git a/src/components/HomeListingSection.tsx b/src/components/HomeListingSection.tsx index 917e3e39..637570e1 100644 --- a/src/components/HomeListingSection.tsx +++ b/src/components/HomeListingSection.tsx @@ -136,7 +136,6 @@ function HomeListingSkillRow({ entry }: { entry: SkillPageEntry }) { {truncateText(item.displayName, PUBLIC_CATALOG_NAME_PREVIEW_LENGTH)} - {isSkillsSh ? skills.sh : null} {owner ? @{owner} : null}

diff --git a/src/components/SkillsShCatalogDetail.test.tsx b/src/components/SkillsShCatalogDetail.test.tsx index c77a40e3..3c0a7b2b 100644 --- a/src/components/SkillsShCatalogDetail.test.tsx +++ b/src/components/SkillsShCatalogDetail.test.tsx @@ -95,7 +95,18 @@ describe("SkillsShCatalogDetailPage", () => { }); it("renders only stored bounded content and no file explorer", () => { - render(); + const entry = makeEntry(); + entry.content = { + ...entry.content!, + markdown: `--- +name: html +description: Build useful HTML artifacts. +--- +# Use this skill + +Build a useful artifact.`, + }; + render(); const detailTabs = screen.getByRole("tablist", { name: "Skill detail tabs" }); expect(detailTabs).toBeTruthy(); @@ -106,6 +117,8 @@ describe("SkillsShCatalogDetailPage", () => { expect(screen.queryByText("Files")).toBeNull(); expect(screen.queryByText("File explorer")).toBeNull(); expect(screen.queryByText("skills/html/SKILL.md")).toBeNull(); + expect(screen.queryByText("name: html")).toBeNull(); + expect(screen.queryByText("description: Build useful HTML artifacts.")).toBeNull(); expect(screen.getByText("Content is truncated to the stored 64 KiB snapshot.")).toBeTruthy(); }); diff --git a/src/components/SkillsShCatalogDetail.tsx b/src/components/SkillsShCatalogDetail.tsx index 01f3da74..81ada4dd 100644 --- a/src/components/SkillsShCatalogDetail.tsx +++ b/src/components/SkillsShCatalogDetail.tsx @@ -11,6 +11,7 @@ import { truncateText } from "../lib/truncateText"; import { MarkdownPreview } from "./MarkdownPreview"; import { SidebarMetadata } from "./SidebarMetadata"; import { SkillDetailPageView, type SkillDetailViewSkill } from "./SkillDetailPageView"; +import { stripFrontmatter } from "./skillDetailUtils"; import { SkillCommandLineCard } from "./SkillInstallSurface"; import { Alert, AlertDescription } from "./ui/alert"; import { Badge } from "./ui/badge"; @@ -275,7 +276,9 @@ function SkillsShContentTabs({ entry }: { entry: SkillsShCatalogDetail }) {

) : null}
- {entry.content.markdown} + + {stripFrontmatter(entry.content.markdown)} +
) : ( diff --git a/src/styles.css b/src/styles.css index 16aee5a2..47118d2d 100644 --- a/src/styles.css +++ b/src/styles.css @@ -23290,20 +23290,6 @@ a.search-empty-action { white-space: nowrap; } -.home-v2-listing-source-badge { - flex: 0 0 auto; - padding: 2px 6px; - border: 1px solid color-mix(in srgb, var(--hv2-text-tertiary) 42%, transparent); - border-radius: var(--r-pill); - color: var(--hv2-text-tertiary); - font-family: var(--font-mono), ui-monospace, monospace; - font-size: 9px; - font-weight: 650; - line-height: 1.2; - letter-spacing: 0.02em; - white-space: nowrap; -} - .home-v2-listing-row-summary { margin: 0; font-size: 13px;