ui-regression-testing-3 / PROJECT_STATUS.md
riazmo's picture
Upload 17 files
cfec14d verified

๐Ÿš€ UI Regression Testing Tool - Project Status

๐Ÿ“‹ Project Overview

Goal: Compare Figma designs with live websites to detect ALL visual differences (114 types across 15 categories)

Approach: Phased development with element-by-element comparison


๐ŸŽฏ Phase Status

Phase Description Status
Phase 1 Core infrastructure + Visual overlay ๐ŸŸข IN PROGRESS
Phase 2 Figma element extraction โšช Not started
Phase 3 Website DOM element extraction โšช Not started
Phase 4 Element-by-element comparison โšช Not started
Phase 5 Full 114-difference detection โšช Not started

๐Ÿ“ฆ Phase 1: Core Infrastructure + Visual Overlay

Goals:

  1. โœ… Clean project structure
  2. โœ… Screenshot capture (Figma + Website)
  3. โœ… Fix 2x scaling issue (Figma exports at retina)
  4. โœ… Visual diff overlay (side-by-side with red highlights)
  5. โœ… Improved UI with clear status/results
  6. โœ… Proper logging system
  7. โœ… Similarity scoring (normalized)

Files Created:

ui-regression-v2/
โ”œโ”€โ”€ app.py                 # Main Gradio interface
โ”œโ”€โ”€ workflow.py            # LangGraph workflow orchestration
โ”œโ”€โ”€ state_schema.py        # State definitions
โ”œโ”€โ”€ requirements.txt       # Dependencies
โ”œโ”€โ”€ Dockerfile            # HF Spaces deployment
โ”œโ”€โ”€ README.md             # HF Spaces config
โ”œโ”€โ”€ PROJECT_STATUS.md     # This file (for context)
โ”œโ”€โ”€ agents/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ agent_0_super_agent.py      # Test plan generation
โ”‚   โ”œโ”€โ”€ agent_1_design_inspector.py # Figma screenshot capture
โ”‚   โ”œโ”€โ”€ agent_2_website_inspector.py # Website screenshot capture
โ”‚   โ””โ”€โ”€ agent_3_visual_comparator.py # Visual diff analysis
โ”œโ”€โ”€ utils/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ figma_client.py    # Figma API integration
โ”‚   โ”œโ”€โ”€ website_capturer.py # Playwright website capture
โ”‚   โ””โ”€โ”€ image_differ.py    # Image comparison & overlay
โ””โ”€โ”€ data/                  # Output directories
    โ”œโ”€โ”€ figma/
    โ”œโ”€โ”€ website/
    โ””โ”€โ”€ comparisons/

Key Decisions:

  • Using Playwright for website screenshots
  • Figma API for design screenshots
  • PIL/OpenCV for image comparison
  • Gradio for UI
  • LangGraph for workflow orchestration

๐Ÿ”ฎ Upcoming Phases

Phase 2: Figma Element Extraction

  • Use Figma API to get all nodes (frames, components, text, etc.)
  • Extract properties: position, size, color, text content
  • Build element tree with hierarchy

Phase 3: Website DOM Extraction

  • Use Playwright to extract DOM elements
  • Get computed CSS for each element
  • Extract: buttons, inputs, text, images, etc.
  • Match elements by type/position/content

Phase 4: Element-by-Element Comparison

  • Match Figma elements to Website elements
  • Compare each property
  • Detect: missing, extra, different elements
  • Calculate per-element similarity

Phase 5: Full 114-Difference Detection

  • Implement all 15 categories from framework
  • Layout & Structure (8 checks)
  • Typography (10 checks)
  • Colors & Contrast (10 checks)
  • And 12 more categories...

๐Ÿ”‘ Important Information

HF Space Configuration:

  • SDK: Docker
  • Port: 7860
  • Python: 3.10

Environment Variables Needed:

  • FIGMA_API_KEY - Your Figma API token
  • HF_TOKEN - (Optional) For enhanced AI analysis

Figma File Requirements:

  • File must have frames named with viewport (e.g., "Checkout-Desktop", "Checkout-Mobile")
  • Frame widths: Desktop=1440px, Mobile=375px

๐Ÿ“ How to Continue Development

When starting a new chat with Claude:

  1. Upload this PROJECT_STATUS.md file
  2. Upload any files you want to modify
  3. Say: "Continue UI Regression Tool from Phase X"

๐Ÿ“… Last Updated

Date: 2026-01-04 Phase: 1 (In Progress)