diff --git a/screenshots/PAP-10242/01-browse-light.png b/screenshots/PAP-10242/01-browse-light.png deleted file mode 100644 index 1f65b7b8aa4..00000000000 Binary files a/screenshots/PAP-10242/01-browse-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/02-detail-dark.png b/screenshots/PAP-10242/02-detail-dark.png deleted file mode 100644 index 9bad4b3107c..00000000000 Binary files a/screenshots/PAP-10242/02-detail-dark.png and /dev/null differ diff --git a/screenshots/PAP-10242/02-detail-light.png b/screenshots/PAP-10242/02-detail-light.png deleted file mode 100644 index 083bb510711..00000000000 Binary files a/screenshots/PAP-10242/02-detail-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/03-install-target-manager-light.png b/screenshots/PAP-10242/03-install-target-manager-light.png deleted file mode 100644 index 7470b832465..00000000000 Binary files a/screenshots/PAP-10242/03-install-target-manager-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/04-install-source-policy-light.png b/screenshots/PAP-10242/04-install-source-policy-light.png deleted file mode 100644 index 96b5e6cad1b..00000000000 Binary files a/screenshots/PAP-10242/04-install-source-policy-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/05-install-skill-plan-light.png b/screenshots/PAP-10242/05-install-skill-plan-light.png deleted file mode 100644 index c5b41d630de..00000000000 Binary files a/screenshots/PAP-10242/05-install-skill-plan-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/06-install-preview-dark.png b/screenshots/PAP-10242/06-install-preview-dark.png deleted file mode 100644 index c7bda717754..00000000000 Binary files a/screenshots/PAP-10242/06-install-preview-dark.png and /dev/null differ diff --git a/screenshots/PAP-10242/06-install-preview-light.png b/screenshots/PAP-10242/06-install-preview-light.png deleted file mode 100644 index ae2a1447343..00000000000 Binary files a/screenshots/PAP-10242/06-install-preview-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/07-install-blocked-light.png b/screenshots/PAP-10242/07-install-blocked-light.png deleted file mode 100644 index 533e82357f3..00000000000 Binary files a/screenshots/PAP-10242/07-install-blocked-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/08-apply-progress-light.png b/screenshots/PAP-10242/08-apply-progress-light.png deleted file mode 100644 index 72c32dd9904..00000000000 Binary files a/screenshots/PAP-10242/08-apply-progress-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/09-success-light.png b/screenshots/PAP-10242/09-success-light.png deleted file mode 100644 index b99820b1be2..00000000000 Binary files a/screenshots/PAP-10242/09-success-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/mobile-detail-light.png b/screenshots/PAP-10242/mobile-detail-light.png deleted file mode 100644 index 5dc5f04c572..00000000000 Binary files a/screenshots/PAP-10242/mobile-detail-light.png and /dev/null differ diff --git a/screenshots/PAP-10242/mobile-install-preview-light.png b/screenshots/PAP-10242/mobile-install-preview-light.png deleted file mode 100644 index 003f6f6858c..00000000000 Binary files a/screenshots/PAP-10242/mobile-install-preview-light.png and /dev/null differ diff --git a/scripts/screenshot-pap-10242-storybook.mjs b/scripts/screenshot-pap-10242-storybook.mjs deleted file mode 100644 index ec275bc0c70..00000000000 --- a/scripts/screenshot-pap-10242-storybook.mjs +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env node -import path from "node:path"; -import fs from "node:fs/promises"; -import { fileURLToPath } from "node:url"; - -const repoRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url))); -const playwrightPkgRoot = path.join(repoRoot, "node_modules/.pnpm/playwright@1.58.2/node_modules/playwright"); -const { chromium } = await import(path.join(playwrightPkgRoot, "index.mjs")); - -const BASE = process.env.SB_BASE ?? "http://127.0.0.1:6099"; -const outDir = path.join(repoRoot, "screenshots/PAP-10242"); -await fs.mkdir(outDir, { recursive: true }); - -const PREFIX = "surfaces-team-catalog"; -const desktop = [ - ["browse-list", "01-browse"], - ["detail-pane", "02-detail"], - ["install-target-manager", "03-install-target-manager"], - ["install-source-policy", "04-install-source-policy"], - ["install-skill-plan", "05-install-skill-plan"], - ["install-preview", "06-install-preview"], - ["install-preview-blocked", "07-install-blocked"], - ["install-apply-progress", "08-apply-progress"], - ["install-success", "09-success"], -]; -const mobile = [ - ["detail-pane", "mobile-detail"], - ["install-preview", "mobile-install-preview"], -]; - -const browser = await chromium.launch({ - executablePath: "/srv/paperclip/home/.cache/ms-playwright/chromium-1223/chrome-linux/chrome", - args: ["--no-sandbox"], -}); -const captured = []; -try { - async function capture(viewport, theme, jobs, suffix) { - const context = await browser.newContext({ viewport }); - const page = await context.newPage(); - for (const [storyId, slug] of jobs) { - const url = `${BASE}/iframe.html?id=${PREFIX}--${storyId}&viewMode=story&globals=theme:${theme}`; - await page.goto(url, { waitUntil: "networkidle" }).catch(() => {}); - await page.waitForTimeout(900); - const target = path.join(outDir, `${slug}-${theme}${suffix}.png`); - await page.screenshot({ path: target, fullPage: true }); - captured.push(path.basename(target)); - console.log("captured", path.basename(target)); - } - await context.close(); - } - - await capture({ width: 1440, height: 900 }, "light", desktop, ""); - await capture({ width: 1440, height: 900 }, "dark", [["detail-pane", "02-detail"], ["install-preview", "06-install-preview"]], ""); - await capture({ width: 390, height: 844 }, "light", mobile, ""); -} finally { - await browser.close(); -} -console.log(`\n${captured.length} screenshots written to screenshots/PAP-10242/`); diff --git a/scripts/screenshot-pap-10242.mjs b/scripts/screenshot-pap-10242.mjs deleted file mode 100644 index ae641f451b4..00000000000 --- a/scripts/screenshot-pap-10242.mjs +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env node -import path from "node:path"; -import fs from "node:fs/promises"; -import { fileURLToPath } from "node:url"; - -const repoRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url))); -const playwrightPkgRoot = path.join( - repoRoot, - "node_modules/.pnpm/playwright@1.58.2/node_modules/playwright", -); -const { chromium } = await import(path.join(playwrightPkgRoot, "index.mjs")); - -const HOST = process.env.PAP_HOST ?? "100.123.243.20"; -const BASE = `http://${HOST}:3100`; -const outDir = path.join(repoRoot, "screenshots/PAP-10242"); -await fs.mkdir(outDir, { recursive: true }); - -// Reuse the PAP-9704 local board session token, re-hosted onto the reachable -// tailscale interface with a fresh client-side expiry (the server validates the -// token value, not the cookie expiry). -const authState = JSON.parse( - await fs.readFile(path.join(repoRoot, "screenshots/PAP-9704-local-auth-state.json"), "utf8"), -); -const sessionCookie = authState.cookies.find((c) => c.name.endsWith("session_token")); - -const browser = await chromium.launch({ - executablePath: "/srv/paperclip/home/.cache/ms-playwright/chromium-1223/chrome-linux/chrome", - args: ["--no-sandbox"], -}); - -const results = []; -try { - const context = await browser.newContext({ viewport: { width: 1440, height: 1000 } }); - if (sessionCookie) { - await context.addCookies([ - { - name: sessionCookie.name, - value: sessionCookie.value, - domain: HOST, - path: "/", - expires: Math.floor(Date.now() / 1000) + 3600, - httpOnly: sessionCookie.httpOnly ?? true, - secure: false, - sameSite: "Lax", - }, - ]); - } - const page = await context.newPage(); - page.on("console", (m) => { - if (m.type() === "error") console.log(" [browser console error]", m.text().slice(0, 200)); - }); - - async function shot(slug, urlPath, prep) { - const url = `${BASE}${urlPath}`; - await page.goto(url, { waitUntil: "networkidle" }).catch(() => {}); - await page.waitForTimeout(1500); - if (prep) await prep(page); - const target = path.join(outDir, `${slug}.png`); - await page.screenshot({ path: target, fullPage: false }); - const title = await page.title().catch(() => ""); - const bodyText = (await page.evaluate(() => document.body.innerText).catch(() => "")) || ""; - results.push({ slug, url, title, hasTeams: bodyText.includes("Teams"), sample: bodyText.slice(0, 120).replace(/\n/g, " ") }); - console.log(`captured ${target} :: title="${title}" :: ${bodyText.slice(0, 80).replace(/\n/g, " ")}`); - } - - // 01 browse - await shot("01-browse", "/PAP/teams"); - - // 02 detail (click first team row) - await shot("02-detail", "/PAP/teams", async (p) => { - const row = p.locator('button:has-text("Team")').first(); - if (await row.count()) await row.click().catch(() => {}); - await p.waitForTimeout(800); - }); - - // 03 install wizard (click Install team) - await shot("03-install-wizard", "/PAP/teams", async (p) => { - const cta = p.locator('button:has-text("Install team")').first(); - if (await cta.count()) await cta.click().catch(() => {}); - await p.waitForTimeout(1500); - }); -} finally { - await browser.close(); -} - -await fs.writeFile(path.join(outDir, "_capture-summary.json"), JSON.stringify(results, null, 2)); -console.log("\nSummary:", JSON.stringify(results, null, 2));