Add repeatable marketing screenshot generation - #4508
Draft
shaunandrews wants to merge 6 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
How AI was used in this PR
This proof of concept was designed, implemented, and exercised with Codex. The agent inspected the Agentic UI, built the deterministic capture harness and synthetic fixtures, added tests and documentation, ran capture matrices, and visually reviewed both light and dark output. Human direction set the marketing goals and corrected the important compositions: more sites, narrower chat/wider preview, sidebar/no-sidebar variants, preview/no-preview variants, longer conversations, focused composer copy, square site icons, compact conversation exports, and the missing Settings control.
Reviewers should validate the architecture, fixture content, and visual choices rather than treating AI-generated implementation as inherently merge-ready.
Executive summary
This draft adds a repeatable system for generating Studio Agentic UI screenshots for landing pages, documentation, app stores, Pressable, Automattic for Agencies, and similar marketing surfaces.
It renders production UI components against deterministic synthetic data, exposes named scenarios plus layout/presentation controls, captures exact-size PNGs in light and dark themes, validates every run, and writes a manifest and standalone contact sheet for review. Bulk generated output is intentionally ignored by Git; this PR checks in only the curated examples below, and approved exports can be copied wherever the marketing team needs them.
Example output
These are deterministic synthetic captures generated from the committed PR head. The broad matrix and compact export completed with zero diagnostics.
Generated contact sheet
The generated contact sheet collects eight wide scenarios in light and dark and links each thumbnail to its exact-size PNG.
Representative states
Multi-site overview · light
Populated site sidebar with the core management actions.
Focused composer · light
A new agent session with seeded draft copy and suggested tasks.
Working agent + preview · dark
A narrow conversation panel leaves room for the live site preview.
Long conversation · compact light
The 900 × 600 logical window export with sidebar and preview hidden.
Connected-site controls · dark
Studio, Preview, Live, and Settings controls for a connected site.
Responsive preview · light
Desktop and mobile versions shown together for comparison.
Proposed Changes
Agent-first workflow
The intended workflow is for a marketer or engineer to describe the desired compositions and let an agent run the mechanical parts: checkout, build, capture, inspect, iterate, and collect approved PNGs.
A useful prompt is:
The agent should:
Checkout, build, and use
Run the default smoke export:
Generate the conversation set at both wide and compact desktop sizes:
Generate a targeted preview composition with explicit panel sizing:
List scenarios, themes, and presets with:
When no output path is supplied, the runner writes to
artifacts/marketing-screenshots/<commit>/. Each run contains PNGs,manifest.json, andcontact-sheet.html. For fast iteration against an already-built target, usenpm run screenshots:marketing:capturewith the same flags.How it works
The fixture path is intentionally separate from normal app startup. It does not load local sites, authentication, or personal configuration, and the embedded preview stays on the loopback server.
Review guide
Please review carefully:
Reasonable to skim initially:
Bulk generated output remains ignored. The diff includes only the seven curated synthetic documentation examples shown above.
Known tradeoffs and follow-ups
ignorepackage type mismatch inapps/studio/src/ipc-handlers.ts. Focused typechecks for the Agentic UI and screenshot tool pass.Testing Instructions
Build and focused validation completed:
Results:
To review manually, run one of the commands above and open the generated
contact-sheet.html. Check every requested state in both light and dark, then confirmmanifest.jsonhas no diagnostics.Pre-merge Checklist
ignorepackage type mismatch before merge.