Skip to content

Retake the guide's automatic screenshots against the redesigned window - #620

Merged
zaerl merged 3 commits into
trunkfrom
docs/retake-fixture-screenshots
Oct 5, 2026
Merged

zaerl merged 3 commits into
trunkfrom
docs/retake-fixture-screenshots

Conversation

@zaerl

@zaerl zaerl commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Why

First part of #561. The redesign is on trunk (#591) and the guide's screenshots still show the old window. Twelve of the guide's images are taken by the harness with nobody at the keyboard; this retakes those, and fixes what made a retake depend on the day and on the network.

What changes

Twelve screenshots retaken (npm run shots, the fixture tier): the empty window, the create-site dialog, a Core and a Gutenberg site, the site's menu, the notice for old code, the apply card, the question a link raises, the terminal, the logs and the mail in the tray, and an incomplete update.

The harness, so that a retake is the same picture whenever it is taken:

  • The fixture's dates are counted back from the day of the shots. They were written down as 16 September, which was fresh for a fortnight; after that every site in every picture wore "This site's WordPress code is 19 days old". The code's date is at midnight UTC, since the app counts its age in whole days. The mail and the lines in debug.log are dated the day before.
  • No automatic shot reaches the network or starts a process. A ticket's pull requests are answered by the fixture: left to GitHub, the site's menu was photographed over a card still "Checking GitHub…". The dev server and the script it runs first are answered for every shot; the mail's shot used to start a real server in a folder that holds no WordPress, and showed whatever port the mail server had picked.
  • Motion is reduced, so a tab's underline is not caught half way to its tab.

Beside the images: the alt text of three of them said what the old pictures showed, and the few sentences next to the create-site dialog's named the old button and labels. docs/public/screenshots/pr-applied.png, which no page uses, is removed.

Not in this pull request:

  • The other sixteen images: nine that need a person at a real site, and six nobody's script takes. They are being moved to the automatic tier, in the pull requests that follow.
  • The guide's prose, apart from the lines above. It follows the screenshots, in four pull requests by topic.

How to test this

Platforms: macOS to reproduce the committed images; the harness runs on any. Nothing here ships in the app: the change is a documentation tool and its output.

From the repository root, after npm ci:

npm run shots
git status --short docs/public/screenshots
  1. The run prints twelve lines, each ✓ <name>.png, and exits 0. It opens the app's window four times and closes it; do not type while it runs.
  2. On the machine and the UTC day the committed images were taken, git status shows nothing changed. On a later day it shows the images that carry a date (below); on another machine it may show them all, since fonts are drawn differently.
  3. Open the twelve PNGs. Each shows a finished state: no spinner, no menu half open, nothing cut by the edge of a crop. Every path is under /tmp/wpct-docs-fixture/.

What must not have happened: a real server started, or anything asked of GitHub or Trac, by a shot; a picture with a path under a home folder, or with a notice that the code is old on a site that is meant to be fresh.

What cannot be promised: the same bytes on another machine or another day. The images are identical between two runs on one machine within one UTC day, which I checked by taking them twice. A date is drawn in the whole-window shots (when a site was made and its code's date), in the site's menu shot (the pull requests' dates), in the mail and in the logs; system fonts and the window's frame differ between systems; and on Windows the fixture's folder is under the system's temporary folder, so the path in the logs' shot differs.

Risks and limitations

  • Review: 2 passes, 7 findings fixed here, and 5 follow-ups all taken here. Details below.
  • A run that crosses midnight UTC can draw dates that do not agree with each other: the fixture counts its days once, as the run starts.
  • The dev server never comes up in a shot. Its start is accepted and it gives no address, so a whole-window shot taken after pressing Start would show it starting for ever. None of the twelve does that; the two that press Start are crops of the tray. A shot of a running server needs the address said to the window as well, which belongs with the shots that follow.
  • The guide's text now describes the old window beside new pictures, until the text follows.

Related

Part of #561, which is part of #542.


Design decisions and alternatives considered
  • Days counted back, not dates bumped. The file's own comment said to bump the dates "when that happens", expecting years; the notice appears after fourteen days. Counted back, "126 days old" is the same on every retake, where written down it changed every day.
  • One set of stand-ins for the whole tier, installed once per launch, and not a few lines in each shot that needs them. A shot that forgets is then one that cannot start a server, where before it was one that did.
  • The mail server is said to have started, on a port of the fixture's. Cropping its line out of the picture was the other way; the line is part of what the tray shows.
Review outcome (required — see AGENTS.md)

Pass 1: 4 [fix here] · 3 [follow-up]. Pass 2 (on the fix-up): 3 [fix here] · 2 [follow-up]. All 7 fixed, and all 5 follow-ups taken here.

  • Review: completed — a separate agent context, read-only; head 44cc5ff / base 887afe1; ESLint on the scripts run, the twelve images opened and looked at one by one, the shots not run; 4 [fix here], 3 [follow-up].
    • Fixed: the old site read "125 days old" before nine in the morning UTC and "126" after, from the hour I had put on its date; the stand-in for a ticket's pull requests left out two fields of the real answer; a comment said when the card asks and was wrong; the alt text of three images.
    • Follow-ups, taken here: the mail's shot started a real server; it showed a port that is different every run; the mail was dated before its site was made.
  • Review: completed — a second separate agent context, read-only; head a9c285b / base 887afe1; every path through the two replaced handlers traced for each shot, what loads the mail list and what can write the port, the date arithmetic at every hour, the three alt texts against their pictures; 3 [fix here], 2 [follow-up].
    • Fixed: the stand-in's comment said the server is "up"; a comment in the logs' shot contradicted itself; one alt text counted one line where the picture has two.
    • Follow-ups, taken here: the sentences beside that image still named the old button and labels; the fixture's debug.log lines were dated weeks before their site.
    • Nothing found: no shot needs a real server or script; the mail's port can only be the fixture's; nothing references the removed image.
  • Since review: a9c285b → 2ce5ad9 is the second pass's fixes, not reviewed again: two comments, one alt text, five lines of prose, and the dates in the fixture's log, with that one image retaken. npm run lint and npm test pass; the twelve shots were taken again.
Implementation notes
  • scripts/screenshots/fixtures.cjs: daysAgo, FRESH, STALE; standInForTheOutside (replaces git:list-ticket-patches, npm:run-script and playground:start in the main process); sayMailServerStarted.
  • scripts/screenshots/capture.cjs: reduced motion and the stand-ins, once per launch of the fixture tier. The live tier gets neither.
  • scripts/screenshots/shots.cjs: the site's menu waits for the pull requests' answer; the logs' tray is made taller so the file's first line is not cut; the mail waits for where the server is said to listen.
Screenshots or recording

The twelve images are the change: docs/public/screenshots/ in the diff, which GitHub shows before and after.

🤖 Generated with Claude Code

zaerl and others added 3 commits October 5, 2026 15:03
The twelve screenshots the harness takes by itself, taken again now that
the redesign is on trunk (#561): the empty window, the create-site dialog,
both projects' site views, the site's menu, the notice for old code, the
apply card, the question a link raises, the terminal, the logs and the
mail in the tray, and an incomplete update.

Three changes to the harness so that a retake is the same picture
whenever it is taken:

- The fixture's dates are counted back from the day of the shots. They
  were written down, fresh for a fortnight, and after that every site in
  every picture wore the notice that its code is old.
- The lookup of a ticket's pull requests is answered by the fixture. Left
  to the network, the site's menu was photographed over a card still
  asking GitHub.
- Motion is reduced, so that a tab's underline is not caught half way to
  its tab; and the logs' tray is made taller for its shot, so that the
  first line of the file is not cut.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e's days from midnight

From the review. The fixture's code is dated at midnight UTC, so that the
age the app counts from it is the same all day: at nine in the morning it
read "125 days old" before nine and "126" after. The mail's date is
counted back too, and is after its site was made.

No automatic shot starts a server any more. The mail's shot started a
real one in a folder that holds no WordPress, and showed whatever port
the mail server had picked; the server is now answered for every shot, as
the logs' shot already did for itself, and the mail server is said to
have started on a port that is always the same. The stand-in for a
ticket's pull requests answers in the shape the main process does.

The alt text of three retaken images said what the old pictures showed.
An image no page uses is removed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…re's log like its mail

From the second review. The stand-in's comment said the server is "up":
its start is accepted and it never gives an address, so the window stays
at starting, and of what comes with a server only debug.log's tail is
real. The create-site dialog's alt text counted one line under the
project choice where there are two, and the sentences beside it still
named the old button and the old labels. The lines the fixture leaves in
debug.log are dated the day before the shots, as the mail is.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: WordPress/contributor-toolkit/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c19a059-31b0-4745-b563-8d13470fffd2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Comment @coderabbitai help to get the list of available commands.

@zaerl zaerl self-assigned this Oct 5, 2026
@zaerl
zaerl merged commit 7a7d013 into trunk Oct 5, 2026
10 checks passed
@zaerl
zaerl deleted the docs/retake-fixture-screenshots branch October 5, 2026 13:57
zaerl added a commit that referenced this pull request Oct 5, 2026
…etake change less (#621)

## Why

Second part of #561.
#620 retook the
twelve screenshots the harness takes by itself. Sixteen more needed a
person: nine because they show a state no seeded settings file can
express, and six that no script took at all. Settings (#559) and dark
mode (#560) will each change every picture in the guide again, so a
picture that takes a person is one that will be stale. This moves the
first four to the automatic tier.

## What changes

**Four shots join the automatic tier** (`npm run shots`), which is now
sixteen:

- `dev-server-running`, which was live: the stood-in server's start now
says where the site is served and where the mail server listens before
it answers, as a real start does, so the window has a running server.
- `trac-ticket-panel` and `site-view`, which were live: Trac's answer is
the fixture's. The real one is read off the ticket's page in a window of
its own, past Trac's human-check.
- `linked-pull-requests`, which no script took: the card's two lists.

**What the harness gained for them:**

- A shot can say which part of the window it is of when that is no one
element (`clip`). A part that is not wholly inside the page is refused,
so a card grown taller than the page fails the run and is not
photographed with the footer across it.
- Nothing a shot does opens the browser. A server that comes up opens
its site there.
- What a shot starts in the main process is ended after its picture, so
no shot is handed a state by the one before.

**So that a retake changes less:**

- No shot draws a text caret. The create-site dialog's picture had one
in some runs and not in others.
- The pictures are drawn in software (`--disable-gpu`). A curved edge
was drawn a few pixels differently from run to run, in one picture every
two or three runs. In software it is about one in ten. **Every image is
retaken for this**, the twelve of #620 included; none looks different.

**Beside the images:** the alt text of the four, in the six places they
are used, the README among them.

**Not in this pull request:**

- The eleven that are left: `setup-wizard`, the review dialog's three
(`submit-changes-diff`, `submit-destinations`, `github-sign-in`),
`trunk-update-progress`, `apply-patch-conflict`, and five that no script
takes (`carried-work-notice`, `site-with-tickets`, `ticket-list-card`,
`ticket-list-unlinked`, `trunk-work-question`). All but the first need a
site with a real Git repository in it, which the fixture's empty folders
are not; that is the next pull request.
- The guide's prose. Four pages now say things beside these pictures
that the pictures contradict (old button names, a URL that is no longer
shown, "Show Trac attachments"); the list is in the review outcome.

## How to test this

Platforms: macOS to reproduce the committed images; the harness runs on
any. Nothing here ships in the app.

From the repository root, after `npm ci`:

```
npm run shots
git status --short docs/public/screenshots
```

1. The run prints sixteen lines, each `✓ <name>.png`, and exits 0. It
opens the app's window four times; do not type while it runs, and no
browser tab opens.
2. On the machine and the UTC day the images were taken, `git status`
usually shows nothing. About one run in ten it shows one image, changed
by a handful of pixels on a rounded corner; take it again and it is
gone.
3. Open `dev-server-running.png`: under Server in the details, a Stop
button, View site, wp-admin, Database, and the admin credentials.
`trac-ticket-panel.png`: the ticket's summary, status, type, component,
milestone and keywords, and two pull requests.
`linked-pull-requests.png`: two pull requests and one patch, each with
Apply….

**What must not have happened:** a real server started, a browser tab
opened, or anything asked of GitHub or Trac; a crop with the header or
the footer in it.

**What cannot be promised:** the same bytes on every run. I took the
tier six times after the last change: five were identical and one
differed in one image; and one shot taken ten times differed once, in
eight pixels on its card's corners. I found no cause in the app (no
transition, hover, caret or spinner there) and stopped at "less often".

## Risks and limitations

- Review: 2 passes, 7 findings fixed here, 2 follow-ups taken here.
Details below.
- **Sixteen images change, twelve of them for the second day running.**
That is the cost of drawing in software, paid once.
- **The stood-in server is a running server of which nothing is
running.** The picture is of the window in that state; a link in it
would lead nowhere.
- The fixture's ticket, pull requests and patch are made up, and say so
nowhere in the picture: #60000 is not that ticket on Trac.
- The guide's text beside these pictures is still the old window's.

## Related

Part of #561, which is part of #542. Follows
#620.

---

<details>
<summary>Design decisions and alternatives considered</summary>

- **Back to the automatic tier, after #298 moved them out of it.** They
were moved because a seeded settings file cannot express a serving
server or a ticket's facts, and a picture of a state the app never
reaches is worse than none. What changed is the means: the outside is
answered for the app, as the journeys answer it, and the app reaches the
state by itself.
- **The server's start says what a real start says**, in the stand-in,
for every shot; and not a helper a shot calls afterwards. The first try
was the helper, and its message arrived before the window was listening
for it.
- **A crop given as a rectangle** and not a wrapper element added to the
app for a picture's sake.

</details>

<details>
<summary>Review outcome (required — see AGENTS.md)</summary>

**Pass 1: 5 [fix here] · 2 [follow-up]. Pass 2 (on the fix-up): 2 [fix
here] · 0 [follow-up]. All 7 fixed, both follow-ups taken here.**

- **Review:** completed — a separate agent context, read-only; head
`d4a6d17` / base `7a7d013`; the four images opened and each alt text
read against its picture in every place it is used, the stood-in start
compared with the real handler message by message, every way out of the
app a shot could reach traced; 5 [fix here], 2 [follow-up].
- Fixed: the running server's Stop button was drawn hovered, the pointer
being where it had pressed Start; the fixture's ticket was opened after
the pull request and patch that cite it; a crop would have taken in the
header or the footer silently if a card grew; the patch's address was
not the shape Trac's is; two header comments.
- Follow-ups, taken here: the debug.log tail one shot starts outlived
it; the mail's and the logs' shots were not retaken after the stand-in
changed (they were, and did not change).
- Listed and left for the text: the prose that these pictures now
contradict, in `running-the-site.md` (button names, a red dot, a URL
below the button, credentials next to it), `editors.md` (where the path
and the menu are), `trac-tickets.md` ("panel", a red Closed pill, "Show
Trac attachments") and `getting-started.md` (the site URL).
- **Review:** completed — a second separate agent context, read-only;
head `dfd2a59` / base `7a7d013`; 2 [fix here], 0 [follow-up].
- Fixed: the tail was ended before each shot's reload, where on the
first shot of a launch the page may not have loaded; the crop's check
had no allowance for a height that is not a whole number.
- Asked, and answered "no cause in the app": why one picture differed by
a 3×3 patch between runs. Its suggestion, drawing in software, is taken.
- **Since review:** `dfd2a59 → 5f05c28` is those two fixes, the software
drawing, and one thing found by taking the shots again: the caret. Not
reviewed again. The tier was then taken six times, and one shot ten
times, with the results under "How to test this". `npm run lint` and
`npm test` pass.

</details>

<details>
<summary>Implementation notes</summary>

- `scripts/screenshots/fixtures.cjs`: `TICKET_FROM_TRAC`, `SERVER_URL`;
`standInForTheOutside` also answers `trac:list-attachments` and
`url:open`, and its `playground:start` sends `smtp:started` and
`playground:url` before it answers.
- `scripts/screenshots/capture.cjs`: `clip`; `--disable-gpu`; no caret;
the tails ended after each shot.
- `scripts/screenshots/shots.cjs`: `openReadySite`,
`readTicketFromTrac`, `insideThePage`; the four shots; three live
entries removed.

</details>

<details>
<summary>Screenshots or recording</summary>

The images are the change: `docs/public/screenshots/` in the diff, which
GitHub shows before and after.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@zaerl zaerl added this to the v2.0.0 milestone Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant