Uh oh!
There was an error while loading. Please reload this page.
docs(scripts): add Playwright screenshot capture scaffolding - #91
Conversation
Greptile SummaryThis PR adds Playwright-based screenshot capture scaffolding (
Confidence Score: 5/5Safe to merge — this is additive scaffolding with no impact on existing docs content or CI pipelines. All four files are net-new additions (or appendages to .gitignore). The script only runs locally on developer machines when explicitly invoked with both DASHBOARD_URL and SECURE_PAYMENT_URL set. No existing behaviour is altered. No files require special attention; the two minor logic issues in scripts/capture-screenshots.ts affect only the clarity of the run summary output, not correctness of the captured screenshots. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A([pnpm capture-screenshots]) --> B{DASHBOARD_URL &\nSECURE_PAYMENT_URL set?}
B -- No --> C[Print error & exit 2]
B -- Yes --> D[chromium.launch]
D --> E[Iterate shots\ndashboardShots + securePaymentShots]
E --> F{needsAuth\n&& !AUTH_STATE?}
F -- Yes --> G[Log MANUAL:\nreturn 'manual']
F -- No --> H[page.goto url]
H --> I{setup\ndefined?}
I -- Yes --> J[Run setup fn]
J --> K{returns false?}
K -- Yes --> L[Log SKIP:\nreturn 'manual']
K -- No --> M[waitForTimeout 800ms]
I -- No --> M
M --> N[page.screenshot PNG]
N --> O[sharp to .webp quality 88]
O --> P[Write to images/]
P --> Q[Log OK: return 'ok']
G & L & Q --> R{More shots?}
R -- Yes --> E
R -- No --> S[browser.close]
S --> T[Print summary]
T --> U{fail > 0?}
U -- Yes --> V[exit 1]
U -- No --> W[exit 0]
Reviews (2): Last reviewed commit: "docs(scripts): add Playwright screenshot..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Merge activity
|
Adds the infrastructure for capturing Dashboard and Secure Payment screenshots into images/dashboard/ and images/secure-payments/ for the new use-case and tools pages. Screenshots themselves are not committed — run the script locally once the services are up. Bring-up path: reuse the existing docker-compose.local.yml in request-e2e-tests (brings up postgres × 2, redis × 2, migrations, and all four services with healthchecks and proper wiring). Then point DASHBOARD_URL and SECURE_PAYMENT_URL at it and run pnpm capture-screenshots. Wallet-gated screens (Dashboard interior, payment options, success) are flagged as MANUAL by the script and need either an AUTH_STATE storage dump or, ideally, a separate "screenshots" Playwright project inside request-e2e-tests that drives the existing dashboard.helpers.ts / payment.helpers.ts (TODO). Files: - package.json — playwright, sharp, tsx, @types/node, typescript - tsconfig.json — strict ESM config for the script - scripts/capture-screenshots.ts — capture entry point, no default URLs (refuses to run without explicit DASHBOARD_URL and SECURE_PAYMENT_URL) - .gitignore — exclude node_modules, auth-state.json, lockfiles
9407a3b to
e46dd5fCompareUh oh!
There was an error while loading. Please reload this page.
Applies 16 of 18 Greptile review comments from PRs #88-95. Skipped: - PR #88 forward-links comment (resolved by Phase B in #90 — pages now exist) - PR #91 lockfile exclusion (P2 opinion; team has chosen to gitignore) PR #88 - getting-started.mdx: replaced the "API Key Generation" steps with the Client ID flow on the Dashboard. PR #89 - secure-payment-supported-networks-and-currencies.mdx: qualified the cross-chain note — Tron payments are same-chain; Li.Fi swap-to-pay is EVM-source only. - release-notes/request-api.mdx: distinguished the four "2026-Q1" Update blocks with topical sub-labels (Payouts, Tron, Accounting, Calldata). PR #90 - docs.json: removed the duplicate tools/dashboard entry from the API Setup group. The Tools group in Resources is the canonical home. - programmatic-payment-links.mdx: TS/Python/cURL switched from <Tabs> to <CodeGroup> per AGENTS.md style. Other Tabs blocks (EVM-vs-Tron variants) stay as Tabs since they are alternative content. - programmatic-payment-links.mdx: fixed the timingSafeEqual signature check to compare decoded buffer lengths instead of raw hex string lengths. PR #91 - package.json: dropped @playwright/test (only `playwright` is used). - scripts/capture-screenshots.ts: switched waitUntil from "networkidle" to "load". Vite HMR keeps a persistent WebSocket open so networkidle always timed out against dev servers. PR #92 - integration-tutorial.mdx: changed the webhook-section .env placeholder from <YOUR_API_KEY> to <YOUR_CLIENT_ID> for consistency. PR #93 - secure-payments.mdx: rewrote the redirectUrl description to remove the self-contradiction ("redirected" vs "no auto-redirect"). - programmatic-payment-links.mdx: the "send back to your site" code example now captures the response and uses securePaymentUrl. PR #94 - payee-destinations.mdx: accessPolicy sub-fields restructured from a Markdown table to <Expandable> with nested <ParamField> entries. - compliance-gated-payments.mdx: "How it works" numbered list switched to <Steps> with <Step> components. PR #95 - multi-chain-checkout.mdx: "you decide of the destination" → "you decide on the destination" (grammar). - batch-payouts.mdx: removed the duplicate "hosted" in the Mode 1 description. - welcome.mdx: dropped the SDK framing — the Dashboard and Secure Payment Page are no-code hosted tools, not SDK consumers.
Applies 16 of 18 Greptile review comments from PRs #88-95. Skipped: - PR #88 forward-links comment (resolved by Phase B in #90 — pages now exist) - PR #91 lockfile exclusion (P2 opinion; team has chosen to gitignore) PR #88 - getting-started.mdx: replaced the "API Key Generation" steps with the Client ID flow on the Dashboard. PR #89 - secure-payment-supported-networks-and-currencies.mdx: qualified the cross-chain note — Tron payments are same-chain; Li.Fi swap-to-pay is EVM-source only. - release-notes/request-api.mdx: distinguished the four "2026-Q1" Update blocks with topical sub-labels (Payouts, Tron, Accounting, Calldata). PR #90 - docs.json: removed the duplicate tools/dashboard entry from the API Setup group. The Tools group in Resources is the canonical home. - programmatic-payment-links.mdx: TS/Python/cURL switched from <Tabs> to <CodeGroup> per AGENTS.md style. Other Tabs blocks (EVM-vs-Tron variants) stay as Tabs since they are alternative content. - programmatic-payment-links.mdx: fixed the timingSafeEqual signature check to compare decoded buffer lengths instead of raw hex string lengths. PR #91 - package.json: dropped @playwright/test (only `playwright` is used). - scripts/capture-screenshots.ts: switched waitUntil from "networkidle" to "load". Vite HMR keeps a persistent WebSocket open so networkidle always timed out against dev servers. PR #92 - integration-tutorial.mdx: changed the webhook-section .env placeholder from <YOUR_API_KEY> to <YOUR_CLIENT_ID> for consistency. PR #93 - secure-payments.mdx: rewrote the redirectUrl description to remove the self-contradiction ("redirected" vs "no auto-redirect"). - programmatic-payment-links.mdx: the "send back to your site" code example now captures the response and uses securePaymentUrl. PR #94 - payee-destinations.mdx: accessPolicy sub-fields restructured from a Markdown table to <Expandable> with nested <ParamField> entries. - compliance-gated-payments.mdx: "How it works" numbered list switched to <Steps> with <Step> components. PR #95 - multi-chain-checkout.mdx: "you decide of the destination" → "you decide on the destination" (grammar). - batch-payouts.mdx: removed the duplicate "hosted" in the Mode 1 description. - welcome.mdx: dropped the SDK framing — the Dashboard and Secure Payment Page are no-code hosted tools, not SDK consumers.

Adds the infrastructure for capturing Dashboard and Secure Payment screenshots
into images/dashboard/ and images/secure-payments/ for the new use-case and
tools pages. Screenshots themselves are not committed — run the script
locally once the services are up.
Bring-up path: reuse the existing docker-compose.local.yml in request-e2e-tests
(brings up postgres × 2, redis × 2, migrations, and all four services with
healthchecks and proper wiring). Then point DASHBOARD_URL and SECURE_PAYMENT_URL
at it and run pnpm capture-screenshots.
Wallet-gated screens (Dashboard interior, payment options, success) are
flagged as MANUAL by the script and need either an AUTH_STATE storage dump
or, ideally, a separate "screenshots" Playwright project inside
request-e2e-tests that drives the existing dashboard.helpers.ts /
payment.helpers.ts (TODO).
Files:
(refuses to run without explicit DASHBOARD_URL and SECURE_PAYMENT_URL)