Skip to content

Commit 1002da8

Browse files
fix: restore package version controls in the catalog dialog
1 parent 63c7a9e commit 1002da8

7 files changed

Lines changed: 33 additions & 14 deletions

‎e2e/local-auth/delete-account-resources.pw.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ test("users can permanently delete their account and personal publisher resource
182182
await gotoUntilVisible(
183183
page,
184184
`/plugins/${encodeURIComponent(packageName)}`,
185-
page.getByText(packageDisplayName),
185+
page.getByRole("heading", { level: 1, name: packageDisplayName, exact: true }),
186186
);
187187

188188
await page.goto("/settings?view=danger", { waitUntil: "domcontentloaded" });

‎e2e/local-auth/delete-org-resources.pw.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ test("org owners can delete an org and hide its skills and plugins", async ({ pa
160160
await gotoUntilVisible(
161161
page,
162162
`/plugins/${encodeURIComponent(packageName)}`,
163-
page.getByText(packageDisplayName),
163+
page.getByRole("heading", { level: 1, name: packageDisplayName, exact: true }),
164164
);
165165

166166
await gotoUntilVisible(

‎e2e/local-auth/manage-context-proof.pw.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,9 @@ test("seeded public plugin detail supports versions navigation", async ({
341341
await expect(
342342
page.getByRole("heading", { name: "Local Scanned Runtime Plugin", exact: true }).first(),
343343
).toBeVisible();
344-
const versions = page.getByRole("tab", { name: "Versions", exact: true });
344+
await page.getByRole("button", { name: "Package details", exact: true }).click();
345+
const dialog = page.getByRole("dialog", { name: "Package details", exact: true });
346+
const versions = dialog.getByRole("tab", { name: "Versions", exact: true });
345347
await versions.click();
346348
await expect(page).toHaveURL(/#versions$/);
347349
await expect(versions).toHaveAttribute("aria-selected", "true");

‎e2e/local-auth/plugin-api-retirements.pw.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test("retirement notices stay off plugin pages and remain available in the manag
2525
await waitForHydration(page);
2626
const notice = page.getByRole("region", { name: "OpenClaw API updates" });
2727
await expect(page.getByRole("heading", { name: "Local API Retirement Example" })).toBeVisible();
28-
await expect(page.getByRole("heading", { name: "Install", exact: true })).toBeVisible();
28+
await expect(page.getByRole("button", { name: "Install", exact: true })).toBeVisible();
2929
await expect(notice).toHaveCount(0);
3030
await expect(page.getByText("API details", { exact: true })).toHaveCount(0);
3131
await expect(page.getByText(/This plugin is incompatible/)).toHaveCount(0);
@@ -34,7 +34,7 @@ test("retirement notices stay off plugin pages and remain available in the manag
3434
await page.screenshot({ path: testInfo.outputPath("after-desktop.png"), fullPage: true });
3535
await page.setViewportSize({ width: 390, height: 844 });
3636
await expect(notice).toHaveCount(0);
37-
await expect(page.getByRole("heading", { name: "Install", exact: true })).toBeVisible();
37+
await expect(page.getByRole("button", { name: "Install", exact: true })).toBeVisible();
3838
expect(
3939
await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth),
4040
).toBe(true);
@@ -50,10 +50,10 @@ test("retirement notices stay off plugin pages and remain available in the manag
5050
await waitForHydration(page);
5151
await expect(page.getByRole("heading", { name: "Local Current API Example" })).toBeVisible();
5252
await expect(notice).toHaveCount(0);
53-
await expect(page.getByRole("heading", { name: "Install", exact: true })).toBeVisible();
53+
await expect(page.getByRole("button", { name: "Install", exact: true })).toBeVisible();
5454

5555
await page.goto("/plugins/local-api-retirement-incompatible", { waitUntil: "domcontentloaded" });
56-
await expect(page.getByRole("heading", { name: "Install", exact: true })).toBeVisible();
56+
await expect(page.getByRole("button", { name: "Install", exact: true })).toBeVisible();
5757
await expect(notice).toHaveCount(0);
5858
await expect(
5959
page.getByText("This plugin is incompatible with OpenClaw versions greater than 2026.10.1."),
@@ -62,7 +62,7 @@ test("retirement notices stay off plugin pages and remain available in the manag
6262
await signInAsLocalPersona(page, "owner");
6363
await page.goto("/plugins/local-api-retirement-plugin", { waitUntil: "domcontentloaded" });
6464
await waitForHydration(page);
65-
await expect(page.getByRole("heading", { name: "Install", exact: true })).toBeVisible();
65+
await expect(page.getByRole("button", { name: "Install", exact: true })).toBeVisible();
6666
await expect(notice).toHaveCount(0);
6767
await page.goto("/dashboard");
6868
await waitForHydration(page);

‎e2e/local-auth/plugin-inspector-findings.pw.test.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
claimMockPrePublicationChecks,
1717
completeMockPrePublicationChecks,
1818
escapeRegExp,
19+
publishedDetailTitle,
1920
signInAsLocalPersona,
2021
} from "./helpers";
2122

@@ -427,9 +428,7 @@ test("plugin publish stays private until mocked TruffleHog and ClawScan pass", a
427428
await page.goto(buildPluginDetailHref(name), { waitUntil: "domcontentloaded" });
428429
await waitForHydration(page);
429430
await recoverFromTransientErrorScreen(page);
430-
await expect(page.locator("h1.skill-page-title", { hasText: displayName })).toBeVisible({
431-
timeout: 30_000,
432-
});
431+
await expect(publishedDetailTitle(page)).toHaveText(displayName, { timeout: 30_000 });
433432
await expectHealthyInspectorPage(page, errors);
434433
});
435434

‎src/__tests__/ui-design-contract.test.ts‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,24 @@ describe("restored UI design contract", () => {
461461
expect(css).not.toMatch(/#(?:8eb8e8|4a7fd0|6b9fd4)/i);
462462
});
463463

464-
it("keeps detail heroes full width unless an explicit sidebar is present", () => {
465-
const shellSource = read("src/components/DetailPageShell.tsx");
464+
it("keeps the public catalog hero full width and stacks its sidebar on narrow layouts", () => {
465+
const css = read("src/components/catalog-detail-layout.css");
466+
expect(cssRule(css, ".catalog-detail")).toContain("grid-template-columns: minmax(0, 1fr)");
467+
expect(cssRule(css, ".catalog-detail__content")).toContain(
468+
"grid-template-columns: minmax(0, 1fr) 248px",
469+
);
470+
const narrow = balancedCssBlock(
471+
css,
472+
css.indexOf("@container (max-width: 768px)"),
473+
"narrow catalog",
474+
);
475+
expect(cssRule(narrow, ".catalog-detail__content")).toContain(
476+
"grid-template-columns: minmax(0, 1fr)",
477+
);
478+
});
479+
480+
it("keeps legacy detail heroes full width unless an explicit sidebar is present", () => {
481+
const shellSource = read("src/components/PendingPackageListing.tsx");
466482
const css = styles();
467483

468484
expect(shellSource).toContain('"skill-hero-layout has-sidebar"');

‎src/routes/plugins/-plugin-catalog-detail.css‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@
194194
text-decoration: underline;
195195
text-underline-offset: 3px;
196196
}
197-
.plugin-package-dialog {
197+
.plugin-package-dialog[data-slot="dialog-content"] {
198+
/* The site's generic .grid auto-fills columns; tabs and panels must each get a full row. */
199+
grid-template-columns: minmax(0, 1fr);
198200
width: min(680px, calc(100vw - 32px));
199201
max-height: 85dvh;
200202
overflow: auto;

0 commit comments

Comments
 (0)