What does visual-qa do?
Valid JSX is not evidence of good design. Never report UI work as finished without having looked at it.
Core
Run the website locally.
Inspect:
375px
390px
768px
1440px
1920px
Capture screenshots.
Review each screenshot for:
- broken layout
- weak hierarchy
- excessive whitespace
- insufficient whitespace
- ugly line wrapping
- poor image crop
- inconsistent margins
- oversized typography
- tiny typography
- weak CTA prominence
- alignment problems
- generic AI-design patterns
Fix detected issues.
Repeat until no major visual issues remain.
How to run it
Start the dev server, then:
QA_ROUTES=/,/services,/doctors,/contact node scripts/qa-screenshots.mjs
Output lands in qa/<route>/<width>.png, full-page, one file per breakpoint.
The script also reports horizontal overflow and console errors per breakpoint —
both are automatic failures.
Breakpoints captured: 375×812, 390×844, 430×932, 768×1024, 1440×900, 1920×1080.
First-time setup:
npm i -D playwright && npx playwright install chromium
For interactive poking rather than a full sweep, the in-editor browser tools are faster: open the page, resize, read the accessibility tree, check the console.
Reading a screenshot
Go breakpoint by breakpoint. For each one answer:
- Does anything overflow horizontally?
- Is there one obvious focal point, or does the eye wander?
- Do headings wrap into an ugly orphan or a one-word last line?
- Are the margins between sections consistent where they should be, and deliberately different where they should be?
- Are images cropped through a face, a plate or a bed?
- Is the primary CTA the most prominent element in its screenful?
- On mobile: is the sticky CTA visible, thumb-reachable, and not covering content?
- Does anything look like a default AI page — gradient, icon-card grid, pill badges, blurred blobs?
Mobile-specific checks
Local-business visitors arrive from Instagram, Google Maps, TikTok, ads and messenger links. Mobile is the primary surface, not an afterthought.
- no horizontal scroll at 375;
- hero text not oversized — it must not eat the whole first screen;
- tap targets large enough, nothing tiny;
- navigation reachable and closable;
- images cropped for portrait, not squeezed from a landscape desktop crop;
- sticky CTA present and refined.
Loop discipline
- Fix the findings, then re-capture. Do not fix blind.
- Stop when a full sweep produces no major finding, not when the list gets boring.
- If the same finding returns after a fix, the problem is in the block, not in the page — fix it in the block library.
- Report honestly: if a breakpoint still has an open issue, say so.