diff --git a/src/__tests__/home-listing-section.claw591.test.tsx b/src/__tests__/home-listing-section.claw591.test.tsx
index 1537cdde..e906557b 100644
--- a/src/__tests__/home-listing-section.claw591.test.tsx
+++ b/src/__tests__/home-listing-section.claw591.test.tsx
@@ -78,7 +78,7 @@ describe("HomeListingSection", () => {
fetchCanonicalTrendingPageMock.mockResolvedValue(canonicalPage([]));
});
- it("defaults the homepage to Skills and canonical Trending with exact tab order", () => {
+ it("labels canonical Trending values as downloads without changing order or values", () => {
const first = makeTrending("first", "First Skill", 17, 9000);
const second = makeTrending("second", "Second Skill", 3, 8000);
render();
@@ -112,9 +112,16 @@ describe("HomeListingSection", () => {
).toEqual(["First Skill", "Second Skill"]);
expect(screen.getByText("17")).toBeTruthy();
expect(screen.getByText("3")).toBeTruthy();
+ expect(screen.getByText("24h downloads")).toBeTruthy();
+ expect(screen.getAllByLabelText("24-hour downloads")).toHaveLength(2);
+ expect(screen.queryByText("24h installs")).toBeNull();
+ expect(screen.queryByLabelText("24-hour installs")).toBeNull();
expect(screen.queryByText("9K")).toBeNull();
expect(screen.queryByText("8K")).toBeNull();
expect(screen.queryByText("skills.sh")).toBeNull();
+
+ fireEvent.click(screen.getByRole("button", { name: "Grid view" }));
+ expect(screen.getAllByLabelText("24-hour downloads")).toHaveLength(2);
});
it("hides unavailable Trending and falls back to the Featured feed", async () => {
diff --git a/src/__tests__/skills-index.claw591.test.tsx b/src/__tests__/skills-index.claw591.test.tsx
index e930e6f1..5436f379 100644
--- a/src/__tests__/skills-index.claw591.test.tsx
+++ b/src/__tests__/skills-index.claw591.test.tsx
@@ -110,7 +110,7 @@ describe("SkillsIndex", () => {
expect(screen.queryByLabelText("Skill categories")).toBeNull();
});
- it("renders canonical Trending rows in API order with only 24-hour installs", async () => {
+ it("labels canonical Trending rows as downloads without changing API order or values", async () => {
fetchCanonicalTrendingPageMock.mockResolvedValue(
canonicalPage([
makeTrending("first", "First Skill", 17, 9000),
@@ -120,7 +120,7 @@ describe("SkillsIndex", () => {
render();
- expect(await screen.findByTitle("First Skill")).toBeTruthy();
+ expect(await screen.findByText("First Skill")).toBeTruthy();
const names = Array.from(
document.querySelectorAll(".skill-list-item-name"),
(node) => node.textContent,
@@ -128,12 +128,29 @@ describe("SkillsIndex", () => {
expect(names).toEqual(["First Skill", "Second Skill"]);
expect(screen.getByText("17")).toBeTruthy();
expect(screen.getByText("3")).toBeTruthy();
+ expect(screen.getByText("24h downloads")).toBeTruthy();
+ expect(screen.getAllByLabelText("24-hour downloads")).toHaveLength(2);
+ expect(screen.queryByText("24h installs")).toBeNull();
+ expect(screen.queryByLabelText("24-hour installs")).toBeNull();
expect(screen.queryByText("9K")).toBeNull();
expect(screen.queryByText("8K")).toBeNull();
expect(screen.queryByText("skills.sh")).toBeNull();
expect(screen.queryByText(/Not scanned by ClawHub/i)).toBeNull();
});
+ it("labels canonical Trending grid cards as downloads", async () => {
+ searchMock = { view: "grid" };
+ fetchCanonicalTrendingPageMock.mockResolvedValue(
+ canonicalPage([makeTrending("first", "First Skill", 17, 9000)]),
+ );
+
+ render();
+
+ expect(await screen.findByText("First Skill")).toBeTruthy();
+ expect(screen.getByLabelText("24-hour downloads").textContent).toContain("17");
+ expect(screen.queryByLabelText("24-hour installs")).toBeNull();
+ });
+
it("hides disabled Trending and falls back to the Featured feed", async () => {
fetchCatalogDiscoveryCapabilitiesMock.mockResolvedValue({
apiVersion: 0,
diff --git a/src/components/HomeListingSection.tsx b/src/components/HomeListingSection.tsx
index dcedf4cc..d6439a61 100644
--- a/src/components/HomeListingSection.tsx
+++ b/src/components/HomeListingSection.tsx
@@ -220,7 +220,7 @@ function HomeListingSkillRow({ entry, showStats }: { entry: SkillPageEntry; show
{typeof item.metrics.trending24hInstalls === "number" ? (
-
+
{formatCompactStat(item.metrics.trending24hInstalls)}
@@ -334,7 +334,7 @@ function HomeListingSkillCard({ entry, showStats }: { entry: SkillPageEntry; sho
{truncateText(item.summary || "Agent-ready skill pack.", 80)}
{typeof item.metrics.trending24hInstalls === "number" ? (
-
+
{formatCompactStat(item.metrics.trending24hInstalls)}
@@ -990,7 +990,7 @@ export function HomeListingSection({ initialListing = null }: HomeListingSection
{kind === "skills" ? "Skill" : "Plugin"}
{kind === "skills" && tab === "trending" ? (
-
24h installs
+
24h downloads
) : showSkillStats ? (
Popularity
) : null}
diff --git a/src/routes/skills/-SkillsResults.tsx b/src/routes/skills/-SkillsResults.tsx
index d78b636c..0dfc86ef 100644
--- a/src/routes/skills/-SkillsResults.tsx
+++ b/src/routes/skills/-SkillsResults.tsx
@@ -58,7 +58,7 @@ function TrendingSkillListItem({ item }: { item: TrendingSkillListEntry }) {
{truncateText(trending.summary, 80)}
) : null}
-
+
{typeof trending.metrics.trending24hInstalls === "number" ? (
@@ -95,7 +95,7 @@ function TrendingSkillCard({ item }: { item: TrendingSkillListEntry }) {
) : null}
{typeof trending.metrics.trending24hInstalls === "number" ? (
-
+
{formatCompactStat(trending.metrics.trending24hInstalls)}
@@ -275,7 +275,7 @@ export function SkillsResults({
Skill
{showTrendingLayout ? null : Category}
- {showTrendingLayout ? "24h installs" : "Popularity"}
+ {showTrendingLayout ? "24h downloads" : "Popularity"}