Skip to content

Conversation

@luandro
Copy link
Contributor

@luandro luandro commented Oct 4, 2025

Summary

Adds comprehensive documentation for the Playwright screenshot workflow that must be followed for all CSS/styling changes. This enables the team to review visual changes without running the application locally.

Changes

  • New Section: "Visual Changes Workflow (CSS/Styling)" in AGENTS.md with step-by-step instructions
  • Playwright Integration: Code examples for capturing before/after screenshots using Chrome
  • PR Guidelines: Updated PR checklist to emphasize screenshot requirement
  • Git Best Practices: Explicitly states screenshots should be in PR comments, NOT committed to repository

Why This Matters

  • Async Review: Team members can review visual changes without local setup
  • Quality Control: Visual regressions are caught during PR review
  • Consistency: Standardized workflow for all visual/styling changes
  • Documentation: Clear expectations for contributors

Workflow Overview

  1. Start dev server
  2. Capture BEFORE screenshot with Playwright
  3. Make CSS changes
  4. Capture AFTER screenshot
  5. Upload to PR comments (manual drag-and-drop)
  6. Never commit screenshots to git

Testing

Priority

🚀 Ready to merge ASAP - This unblocks all other branches from using the visual review workflow without waiting for specific feature PRs to complete QA.

…al changes

Add comprehensive documentation for capturing before/after screenshots of CSS/styling changes using Playwright. This workflow ensures all visual changes can be reviewed by the team without running the application locally.

Key additions:
- Step-by-step Playwright screenshot capture process
- Chrome browser requirement for consistency
- PR comment upload instructions (screenshots not committed to git)
- Updated PR checklist to emphasize visual documentation requirement

This workflow will help maintain visual quality and enable better async code review for UI/UX changes.
@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2025

Failed to generate code suggestions for PR

…al changes

Add comprehensive documentation and tooling for the Playwright screenshot workflow
that must be followed for all CSS/styling changes.

Documentation Changes (AGENTS.md):
- Step-by-step visual changes workflow
- Automated script usage examples
- CRITICAL warning: screenshots must NEVER be committed to git
- Clear instructions for manual PR comment uploads
- GitHub CLI limitation explanation

Tooling:
- Reusable screenshot capture script with CLI arguments
- Multiple viewport presets (mobile, tablet, desktop, wide)
- Element-specific or full-page screenshots
- Flexible output options

Safety:
- Added screenshots/ to .gitignore to prevent accidental commits
- Explicit reminder to delete screenshots after PR upload
- Documentation emphasizes screenshots are ONLY for PR review

This enables async visual review without running the app locally while
preventing screenshot bloat in git history.
@luandro luandro force-pushed the feat/playwright-workflow-docs branch 2 times, most recently from 845821f to fdc122f Compare October 4, 2025 13:51
Add mandatory verification step before saving PR comments with screenshots:
- MUST preview screenshots before saving comment
- Verify images display correctly (not 404/broken)
- Re-upload if broken, only save after visual confirmation

This prevents publishing broken screenshot links that show 'Page not found',
which happened when attempting automated upload methods.

Key lesson: GitHub does NOT support programmatic image uploads.
Manual drag-and-drop with preview verification is the ONLY reliable method.
@luandro luandro merged commit b894dab into main Oct 7, 2025
3 checks passed
@luandro luandro deleted the feat/playwright-workflow-docs branch October 7, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants