docs: add Playwright screenshot suite and quick user guide (#594)#713
Open
grzanka wants to merge 2 commits into
Open
docs: add Playwright screenshot suite and quick user guide (#594)#713grzanka wants to merge 2 commits into
grzanka wants to merge 2 commits into
Conversation
Start automating documentation screenshots with Playwright per issue #594. - tests/docs-screenshots.spec.ts: dedicated screenshot suite (Calculator + Plot at desktop 1280x720 and mobile 375x667), kept outside tests/e2e/ so it is excluded from the normal E2E run. Freezes animations and masks the dynamic build-info footer for deterministic output. - playwright.docs.config.ts: separate config + pnpm docs:screenshots script. - docs/assets/: generated calculator/plot desktop + mobile screenshots. - docs/user-guide.md: short end-user Calculator + Plot tour embedding them. - Index updates: docs/README.md, CHANGELOG-AI.md, docs/ai-logs/. CI auto-commit workflow deferred to a follow-up. https://claude.ai/code/session_01VfY2vhwkrs3vzBaDwzpx9x
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dedicated Playwright-driven documentation screenshot suite (kept out of the normal E2E pipeline) plus a short end-user guide that embeds the generated images, along with the required doc indexes / AI logs.
Changes:
- Introduces a standalone Playwright config + test suite to generate deterministic Calculator/Plot screenshots for docs (
pnpm docs:screenshots). - Adds a quick user guide page and links it from the docs index.
- Records the session in
CHANGELOG-AI.mdanddocs/ai-logs/.
Reviewed changes
Copilot reviewed 8 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/docs-screenshots.spec.ts | New Playwright spec that navigates to Calculator/Plot and writes deterministic PNGs to docs/assets/. |
| playwright.docs.config.ts | New Playwright config to run only the docs screenshot suite via a dedicated invocation. |
| package.json | Adds docs:screenshots script that runs Playwright with the new config. |
| docs/user-guide.md | New end-user “quick tour” doc embedding the screenshots. |
| docs/README.md | Adds the user guide to the docs index table. |
| docs/ai-logs/README.md | Adds the new session log to the AI logs index. |
| docs/ai-logs/2026-06-05-issue-594-screenshots-guide.md | New detailed AI session log for the work done toward issue #594. |
| CHANGELOG-AI.md | Adds a changelog entry for the session (newest-first). |
- Wait for the real Calculator H1 ("Stopping Power Calculator", exact) and
match the Plot heading exactly, removing reliance on substring matching.
- Mask only the build-info badge (the "Deployed:" span) instead of the whole
footer, so the static footer text stays visible and the grey block shrinks.
- Use reuseExistingServer: false in the docs config to match the main
Playwright config and guarantee screenshots run against a fresh build.
- Regenerate the four screenshots with the narrower mask.
https://claude.ai/code/session_01VfY2vhwkrs3vzBaDwzpx9x
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.
First increment toward #594 (automate documentation screenshots with Playwright). Adds the local screenshot tooling, two primary-tool pages captured at desktop + mobile, and a short end-user guide that embeds them.
What's in this PR
tests/docs-screenshots.spec.ts— a dedicated screenshot suite capturing the Calculator and Plot pages at desktop (1280×720) and mobile (375×667). Kept outsidetests/e2e/so it never runs in the normal E2E pipeline. Freezes all animations/transitions/caret and masks the dynamic build-info footer (neutral grey) for deterministic, churn-free PNGs.playwright.docs.config.ts+pnpm docs:screenshots— a separate config so the suite is excluded from CI E2E but runnable on demand.playwright test <file>form suggested in the issue: the defaultplaywright.config.tsrestricts discovery totests/e2e/(testDir), so an explicit path outside that dir finds no tests.docs/assets/— four generated screenshots (calculator/plot × desktop/mobile) showing live data (proton in liquid water at 100 MeV → 0.7286 keV/µm, CSDA range 7.721 cm; real stopping-power curve).docs/user-guide.md— a concise two-minute Calculator + Plot tour embedding the screenshots, linked fromdocs/README.md.docs/README.md,CHANGELOG-AI.md,docs/ai-logs/.Notes
wasm/build.sh).pnpm format:checkclean, ESLint clean on the new files.Deferred to a follow-up
The GitHub Actions
workflow_dispatchjob that runs the script and auto-commits refreshed images, plus the "screenshots out of sync" PR check. This local tooling is the prerequisite for both.https://claude.ai/code/session_01VfY2vhwkrs3vzBaDwzpx9x
Generated by Claude Code