Skip to content

aiops: theme-screenshot - Make a theme screenshot.png from the site's logo - #4017

Merged
krugazul merged 1 commit into
developfrom
aiops/git-2764-theme-screenshot
Nov 11, 2026
Merged

krugazul merged 1 commit into
developfrom
aiops/git-2764-theme-screenshot

Conversation

@ZaredRogers

Copy link
Copy Markdown
Contributor

AI Operations Pull Request

This repository enforces changelog, release, and label automation for all PRs and issues.
See the organisation-wide Automation Governance & Release Strategy for contributor rules.

Linked issues

Closes #4010

Linear: GIT-2764

Branched from develop. It does not touch the site-to-design-tokens stack (#4011 to #4016) and can merge on its own.

AI Operation Summary

Adds the theme-screenshot skill. Generated block themes had no screenshot.png, so Appearance > Themes showed a blank card and Theme Check flagged it (scaffold end-to-end test, finding F4). It replaces the scaffold's screenshot.png.md placeholder (BTS-46).

The skill makes a 1200 x 900 screenshot.png in the KWV and Southern Destinations style: the logo centred on a soft radial gradient in the theme's colours, a thin divider, an industry line in spaced capitals, and "WordPress block theme · ".

Operation Details

  • Logo: a file (PNG, JPG, GIF, WebP, SVG), or found on a live site in this order: custom logo, header logo, og:image. It reads one public http(s) page and one image.
  • Colours: from the theme.json palette (base, contrast, and the first brand, primary or cta 600 or 500 step as the accent), with --base, --contrast and --accent overrides. Mode is light, dark or auto (a light logo gets the dark background).
  • Sizing: the logo is fitted to a 560 x 300 box. A vector logo may grow to fill it; a raster logo is never enlarged.
  • Render: HTML rendered with Puppeteer. Network, file system and the browser sit behind injectable interfaces, so tests use none of them.
  • Tried on the TSP live site and tsp-theme theme.json: the custom logo was found (an SVG), the mode came out light, and the image was viewed and compared with the KWV and SD references before this PR. The output is not committed.

Generated Changes

  • Added skills/theme-screenshot/: SKILL.md, agents/openai.yaml, and scripts/ (make-theme-screenshot.ts, lib/logo.ts, lib/palette.ts, lib/template.ts, lib/colour.ts) with __tests__/, jest.config.cjs and tsconfig.json.
  • Added test:theme-screenshot to package.json, and a CHANGELOG.md entry.
  • No existing skill or script is changed.

Verification

  • Output reviewed for correctness: the TSP screenshot was opened and checked
  • Generated code follows project standards: TypeScript run with tsx, tests beside the scripts, side effects injectable, no .sh
  • Tests pass (if applicable): 31 Jest tests, 99% statements, 95% branches, 98% lines; tsc --noEmit clean; ESLint no errors
  • No unintended side effects: tests use no network, files or browser
  • Manual spot-checks completed: live run on thesafaripartners.com with the tsp-theme palette

Changelog

Added

  • Theme Screenshot Skill — Makes a theme's 1200 by 900 screenshot.png from the site's logo, the theme.json palette and an industry line, rendered with Puppeteer. (#4010)

Automation Governance

  • Operation follows AGENTS.md rules
  • AI decisions are transparent and documented
  • No sensitive data generated or exposed
  • Rollback plan documented (if needed)
  • Related issues linked above
  • Changelog entry added

🤖 Generated with Claude Code

🤖 Generated with Claude Code

… from the site's logo

Renders a 1200 x 900 screenshot with Puppeteer: the logo centred on a radial gradient in
the theme.json colours, a divider, an industry line and the year. The logo comes from a
file or a live site (custom logo, header logo, og:image).

Closes GIT-2764

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZaredRogers
ZaredRogers requested review from a team and ashleyshaw as code owners November 9, 2026 12:50
@ZaredRogers
ZaredRogers requested a review from krugazul November 9, 2026 12:50
@linear-code

linear-code Bot commented Nov 9, 2026

Copy link
Copy Markdown

GIT-2764

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Linear review: risk level 2 of 4

  • Large diff: 1187 changed lines

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 13c3898 and b9e63fe.

Files selected for processing: 16

  • CHANGELOG.md
  • package.json
  • skills/theme-screenshot/SKILL.md
  • skills/theme-screenshot/agents/openai.yaml
  • skills/theme-screenshot/scripts/__tests__/colour.test.ts
  • skills/theme-screenshot/scripts/__tests__/logo.test.ts
  • skills/theme-screenshot/scripts/__tests__/make-theme-screenshot.test.ts
  • skills/theme-screenshot/scripts/__tests__/palette.test.ts
  • skills/theme-screenshot/scripts/__tests__/template.test.ts
  • skills/theme-screenshot/scripts/jest.config.cjs
  • skills/theme-screenshot/scripts/lib/colour.ts
  • skills/theme-screenshot/scripts/lib/logo.ts
  • skills/theme-screenshot/scripts/lib/palette.ts
  • skills/theme-screenshot/scripts/lib/template.ts
  • skills/theme-screenshot/scripts/make-theme-screenshot.ts
  • skills/theme-screenshot/scripts/tsconfig.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

PR Template Routing

Branch Type: aiops
Scope: git-2764-theme-screenshot
Template: pr_aiops.md
Labels Applied: type:aiops

This PR was automatically routed based on the branch naming strategy.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

📋 Changelog Quality Validation

Metric Count
✅ Passing 245
❌ Failing 0
🆕 New failures in this PR 0
📦 Pre-existing failures 0

Status

✅ Validation PASSED - No new failures introduced by this PR.

No action required.

@krugazul
krugazul enabled auto-merge (squash) November 11, 2026 06:48
@krugazul
krugazul merged commit b63f9bb into develop Nov 11, 2026
39 checks passed
@krugazul
krugazul deleted the aiops/git-2764-theme-screenshot branch November 11, 2026 06:48
@mergify

mergify Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aiops: theme-screenshot - Make a theme screenshot.png from the site's logo

2 participants