Skip to content

Commit e6c6b98

Browse files
committed
style: format screenshot docs with prettier
1 parent aa6bb37 commit e6c6b98

3 files changed

Lines changed: 41 additions & 30 deletions

File tree

‎docs/superpowers/plans/2026-06-22-automated-hero-screenshots.md‎

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@
3535
### Task 1: Screenshot config module + unit tests
3636

3737
**Files:**
38+
3839
- Create: `scripts/screenshots/config.ts`
3940
- Test: `scripts/screenshots/config.test.ts`
4041

4142
**Interfaces:**
43+
4244
- Consumes: nothing (pure module).
4345
- Produces:
4446
- `BASE_URL: string` (`'https://chat.librechat.ai'`)
@@ -201,11 +203,13 @@ git commit -m "feat: add screenshot capture config and tests"
201203
### Task 2: Capture script, npm script, and README
202204

203205
**Files:**
206+
204207
- Create: `scripts/screenshots/capture.ts`
205208
- Create: `scripts/screenshots/README.md`
206209
- Modify: `package.json` (add `screenshots` script under `"scripts"`)
207210

208211
**Interfaces:**
212+
209213
- Consumes from Task 1: `BASE_URL`, `ZOOM`, `VARIANTS`, `Variant`, `outputPath`, `themeBootstrap`.
210214
- Produces: the executable `pnpm screenshots` command that writes the four PNGs.
211215

@@ -335,7 +339,7 @@ main().catch((err) => {
335339

336340
Create `scripts/screenshots/README.md`:
337341

338-
```markdown
342+
````markdown
339343
# Landing-page demo screenshots
340344

341345
Regenerates the four hero images in `components/home/img/` from the live
@@ -366,12 +370,12 @@ against the demo's current UI.
366370

367371
### Required env
368372

369-
| Name | Where | Purpose |
370-
| --- | --- | --- |
371-
| `DEMO_EMAIL` | secret / `.env.local` | demo account login |
372-
| `DEMO_PASSWORD` | secret / `.env.local` | demo account password |
373-
| `DEMO_CONVERSATION_ID` | secret / `.env.local` | hero conversation id |
374-
| `DEMO_BASE_URL` | variable / `.env.local` (optional) | defaults to `https://chat.librechat.ai` |
373+
| Name | Where | Purpose |
374+
| ---------------------- | ---------------------------------- | --------------------------------------- |
375+
| `DEMO_EMAIL` | secret / `.env.local` | demo account login |
376+
| `DEMO_PASSWORD` | secret / `.env.local` | demo account password |
377+
| `DEMO_CONVERSATION_ID` | secret / `.env.local` | hero conversation id |
378+
| `DEMO_BASE_URL` | variable / `.env.local` (optional) | defaults to `https://chat.librechat.ai` |
375379

376380
### Run locally
377381

@@ -380,6 +384,7 @@ against the demo's current UI.
380384
set -a && source .env.local && set +a
381385
pnpm screenshots
382386
```
387+
````
383388

384389
The four PNGs in `components/home/img/` will be overwritten. Review them, then
385390
preview in the hero with `pnpm dev`.
@@ -390,7 +395,8 @@ preview in the hero with `pnpm dev`.
390395
the theme `localStorage` key. If the demo's markup changes, update `SELECTORS` and
391396
`THEME_STORAGE_KEY` (in `config.ts`). Discover current values with the
392397
`agent-browser` CLI or browser devtools against the live demo.
393-
```
398+
399+
````
394400
395401
- [ ] **Step 4: Verify selectors and theme key against the live demo, then run**
396402
@@ -439,16 +445,18 @@ Expected: no errors.
439445
```bash
440446
git add scripts/screenshots/capture.ts scripts/screenshots/README.md package.json components/home/img
441447
git commit -m "feat: add automated demo screenshot capture script"
442-
```
448+
````
443449

444450
---
445451

446452
### Task 3: Scheduled GitHub Actions workflow
447453

448454
**Files:**
455+
449456
- Create: `.github/workflows/update-screenshots.yml`
450457

451458
**Interfaces:**
459+
452460
- Consumes: the `pnpm screenshots` command from Task 2; repo secrets/variables.
453461
- Produces: a scheduled + manually dispatchable workflow that opens a PR with refreshed images.
454462

@@ -563,4 +571,7 @@ is opened (or shows "no changes" if the UI is identical). Review the image diff
563571
- **Default `GITHUB_TOKEN`:** PRs opened by the default token do not themselves trigger
564572
further workflows; acceptable for an image-only PR. If CI must run on the PR, swap to a
565573
PAT in the `create-pull-request` step later.
574+
575+
```
576+
566577
```

‎docs/superpowers/specs/2026-06-22-automated-hero-screenshots-design.md‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ zero. Screenshots regenerate automatically and land in a reviewable PR.
3232

3333
## Decisions (locked)
3434

35-
| Decision | Choice |
36-
| --- | --- |
37-
| Representation | Automated real screenshots via Playwright |
38-
| Trigger | Scheduled GitHub Action (weekly cron) + manual `workflow_dispatch`, opens a PR |
39-
| Content | Curated conversations on a dedicated demo account |
40-
| Capture source | Logged-in demo account on `chat.librechat.ai`, full app view |
41-
| Login risk | None. The demo has no captcha and will not add one |
35+
| Decision | Choice |
36+
| ---------------- | ------------------------------------------------------------------------------------- |
37+
| Representation | Automated real screenshots via Playwright |
38+
| Trigger | Scheduled GitHub Action (weekly cron) + manual `workflow_dispatch`, opens a PR |
39+
| Content | Curated conversations on a dedicated demo account |
40+
| Capture source | Logged-in demo account on `chat.librechat.ai`, full app view |
41+
| Login risk | None. The demo has no captcha and will not add one |
4242
| Content creation | One-time DB seed (fabricated replies, no AI credits); recurring cron only re-captures |
43-
| Secrets in CI | Login credentials only. DB access is used once at setup, never in the cron |
44-
| Component change | None. The script overwrites the same four files in place |
43+
| Secrets in CI | Login credentials only. DB access is used once at setup, never in the cron |
44+
| Component change | None. The script overwrites the same four files in place |
4545

4646
## Architecture
4747

@@ -116,12 +116,12 @@ Behaviour:
116116
Variant matrix (aspect preserved from current assets). Current files are:
117117
desktop ~2546x1428 (≈16:9), mobile ~512x1117 (portrait, ≈ iPhone 390x844 ratio):
118118

119-
| Variant | Viewport (logical) | DSF | Output target |
120-
| --- | --- | --- | --- |
121-
| desktop light | 1280x720 | 2 | `demo_light.png` |
122-
| desktop dark | 1280x720 | 2 | `demo_dark.png` |
123-
| mobile light | 390x844 (phone portrait) | 2 | `demo_mobile_light.png` |
124-
| mobile dark | 390x844 (phone portrait) | 2 | `demo_mobile_dark.png` |
119+
| Variant | Viewport (logical) | DSF | Output target |
120+
| ------------- | ------------------------ | --- | ----------------------- |
121+
| desktop light | 1280x720 | 2 | `demo_light.png` |
122+
| desktop dark | 1280x720 | 2 | `demo_dark.png` |
123+
| mobile light | 390x844 (phone portrait) | 2 | `demo_mobile_light.png` |
124+
| mobile dark | 390x844 (phone portrait) | 2 | `demo_mobile_dark.png` |
125125

126126
The current mobile assets are **portrait phone shots**, so the script captures a phone
127127
viewport in portrait. Exact output pixel sizes may differ from today's files, but the

‎scripts/screenshots/README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ against the demo's current UI.
2828

2929
### Required env
3030

31-
| Name | Where | Purpose |
32-
| --- | --- | --- |
33-
| `DEMO_EMAIL` | secret / `.env.local` | demo account login |
34-
| `DEMO_PASSWORD` | secret / `.env.local` | demo account password |
35-
| `DEMO_CONVERSATION_ID` | secret / `.env.local` | hero conversation id |
36-
| `DEMO_BASE_URL` | variable / `.env.local` (optional) | defaults to `https://chat.librechat.ai` |
31+
| Name | Where | Purpose |
32+
| ---------------------- | ---------------------------------- | --------------------------------------- |
33+
| `DEMO_EMAIL` | secret / `.env.local` | demo account login |
34+
| `DEMO_PASSWORD` | secret / `.env.local` | demo account password |
35+
| `DEMO_CONVERSATION_ID` | secret / `.env.local` | hero conversation id |
36+
| `DEMO_BASE_URL` | variable / `.env.local` (optional) | defaults to `https://chat.librechat.ai` |
3737

3838
### Run locally
3939

0 commit comments

Comments
 (0)