Run visual diff tests, fix CSS regressions until all screenshots match baselines.
Start the "Visual Regression Fixer" loop. - Goal: All visual regression tests pass — screenshots match approved baselines with zero pixel drift beyond tolerance. - Max iterations: 8 - Between iterations run: `npx playwright test --grep @visual` - Exit when: all visual comparison tests pass within the configured tolerance threshold. Steps: 1. Run the visual regression test suite 2. If all screenshots match, stop — exit condition met 3. Review the diff report — identify which components/pages have visual changes 4. For each regression, determine: is this an intentional change (update baseline) or an unintentional bug (fix CSS)? 5. For bugs: trace the CSS change that caused the regression, fix it with a minimal change 6. For intentional changes: update the baseline screenshot with `--update-snapshots` 7. Re-run visual tests to confirm the fix and check for cascading regressions Self-pacing instructions: After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when exit condition passes or max iterations reached. Give a short status update each pass.
How it works