Spaces:
Sleeping
Sleeping
๐ 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:
- โ Clean project structure
- โ Screenshot capture (Figma + Website)
- โ Fix 2x scaling issue (Figma exports at retina)
- โ Visual diff overlay (side-by-side with red highlights)
- โ Improved UI with clear status/results
- โ Proper logging system
- โ 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 tokenHF_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:
- Upload this
PROJECT_STATUS.mdfile - Upload any files you want to modify
- Say: "Continue UI Regression Tool from Phase X"
๐ Last Updated
Date: 2026-01-04 Phase: 1 (In Progress)