Handbook screenshots generated with Playwright from a seeded example instance (#140) #144

Merged
miko merged 1 commit from feature/140-handbook-screenshots into development 2026-11-06 11:25:30 +01:00
Owner

Closes #140

Summary

npm run handbook:screenshots                     (playwright.handbook.config.ts)
  webServer, always started anew on port 3200
    prisma migrate deploy                         kataba_e2e
    npm run handbook:seed                         rolldown → dist/handbook-seed.mjs
      check: database ends in _e2e, uploads inside .e2e/
      empty the database and .e2e/handbook-uploads
      handbookInstance()                          seed/instance.ts: typed InstanceBackup
      seedFiles()                                 seed/pictures.ts: SVG illustrations → PNG originals + variants
      write backup ZIP → restoreBackup()          the app's own restore path (ADR-0023)
    npm run build && next start
  *.shots.ts (reading, authoring, admin)
    shoot(…, "<name>") → handbook/docs/assets/screenshots/<name>.png
 e2e/
+├── handbook/
+│   ├── environment.ts   # port 3200, own upload dir, time zone Europe/Berlin
+│   ├── users.ts         # admin, two authors, a viewer of the example instance
+│   ├── fixtures.ts      # signedIn, shoot, shootArea
+│   ├── *.shots.ts       # 25 shots → 30 PNGs
+│   └── seed/            # instance, pictures, files, seedCli
 └── session.ts           # signIn takes any user and server address

The example instance is a makerspace ("Makerspace Docs"): a category tree with category images and an internal category, a guide with 5 steps, annotations in 7 palette colours, all icon step lines and callout kinds, two versions and unpublished changes, plus a draft, a guide in wiki mode, a deleted guide, pages and a menu. Light mode, English, 1280 × 800. README › Handbook › Screenshots documents how and when to regenerate; ADR-0024 now says light mode only, as decided in #140.

Evidence

  • Before: handbook/ has no screenshots.
    After: npm run handbook:screenshots → 25 passed (37.7s), 30 PNGs (2.1 MB), checked by eye; a second run from scratch writes the same file names.
  • typecheck, lint, npm test (575 passed) and zensical build --strict pass.

Merge Danger

Door: two-way

Blast Radius: tooling

Nothing in src/ changes. signIn in e2e/session.ts keeps its old call shape. Running the screenshots empties kataba_e2e (so not alongside npm run e2e) and runs npm run build, which can leave a running dev server serving stale CSS.

🤖 Generated with Claude Code

Closes #140 ## Summary ```text npm run handbook:screenshots (playwright.handbook.config.ts) webServer, always started anew on port 3200 prisma migrate deploy kataba_e2e npm run handbook:seed rolldown → dist/handbook-seed.mjs check: database ends in _e2e, uploads inside .e2e/ empty the database and .e2e/handbook-uploads handbookInstance() seed/instance.ts: typed InstanceBackup seedFiles() seed/pictures.ts: SVG illustrations → PNG originals + variants write backup ZIP → restoreBackup() the app's own restore path (ADR-0023) npm run build && next start *.shots.ts (reading, authoring, admin) shoot(…, "<name>") → handbook/docs/assets/screenshots/<name>.png ``` ```diff e2e/ +├── handbook/ +│ ├── environment.ts # port 3200, own upload dir, time zone Europe/Berlin +│ ├── users.ts # admin, two authors, a viewer of the example instance +│ ├── fixtures.ts # signedIn, shoot, shootArea +│ ├── *.shots.ts # 25 shots → 30 PNGs +│ └── seed/ # instance, pictures, files, seedCli └── session.ts # signIn takes any user and server address ``` The example instance is a makerspace ("Makerspace Docs"): a category tree with category images and an internal category, a guide with 5 steps, annotations in 7 palette colours, all icon step lines and callout kinds, two versions and unpublished changes, plus a draft, a guide in wiki mode, a deleted guide, pages and a menu. Light mode, English, 1280 × 800. README › Handbook › Screenshots documents how and when to regenerate; ADR-0024 now says light mode only, as decided in #140. ## Evidence - **Before:** `handbook/` has no screenshots. **After:** `npm run handbook:screenshots` → `25 passed (37.7s)`, 30 PNGs (2.1 MB), checked by eye; a second run from scratch writes the same file names. - typecheck, lint, `npm test` (575 passed) and `zensical build --strict` pass. ## Merge Danger **Door:** two-way **Blast Radius:** tooling Nothing in `src/` changes. `signIn` in `e2e/session.ts` keeps its old call shape. Running the screenshots empties `kataba_e2e` (so not alongside `npm run e2e`) and runs `npm run build`, which can leave a running dev server serving stale CSS. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
npm run handbook:screenshots seeds the e2e database with a makerspace
example instance (written as a backup and restored like one), builds and
starts kataba on port 3200 and writes 30 PNGs to
handbook/docs/assets/screenshots/ in light mode, English, at 1280 x 800.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miko merged commit caeefb36eb into development 2026-11-06 11:25:30 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MassiveDynamic/kataba!144
No description provided.