3.4 KiB
Iron UI Playwright Standard
Last updated: 2026-04-14
1. Purpose
All future Iron Web UI changes must be validated against a real running service, using Python Playwright flows and screenshot review.
This is the default UI modification standard for the project.
2. Required Workflow For Any UI Change
Before considering a UI change complete:
- build the frontend assets
- start the real local service
- run the Python Playwright regression flow
- generate screenshots into
output/playwright/ - review screenshots for layout, spacing, responsiveness, and interaction states
- fix issues found in the screenshots or browser flow
- rerun the Playwright flow after the fixes
Do not treat UI work as complete based only on code review or unit tests.
3. Required Validation Levels
Every meaningful UI change should validate:
- login flow
- files workspace render
- primary file operation flow affected by the change
- upload flow if the change touches file workflows
- screenshots of the affected page states
4. Tooling Standard
Use:
- Python Playwright code for repeatable regression checks
- a real locally running Iron service
- screenshot artifacts for visual inspection
Preferred command:
./.venv/bin/python scripts/ui_playwright_smoke.py
Pytest entrypoint for CI or full local regression:
./.venv/bin/python -m pytest tests/e2e/test_web_ui_playwright.py
Artifacts must be written to:
output/playwright/
5. Screenshot Review Checklist
Every screenshot review should check:
- overall balance of the layout
- spacing consistency
- text truncation or wrapping problems
- button grouping and hierarchy
- panel heights and overflow behavior
- empty-state clarity
- table/list readability
- dialog layout and action placement
- mobile or narrow-width resilience when the changed surface is responsive
6. Interaction Review Checklist
Every flow review should check:
- click targets are obvious
- primary actions are easy to find
- selection state is clear
- navigation state is preserved where expected
- success feedback is visible
- error feedback is actionable
- dialogs do not rely on browser-native prompts
- repetitive tasks do not require unnecessary clicks
7. Regression Scope For Iron
Current baseline regression should cover:
- login
- files page
- create folder
- upload from the files page
- authenticated file download
- authenticated inline image preview
- no failing
/apibrowser requests during the flow - files search/filter visibility
- uploads page render
As new UI capabilities are added, extend the Python Playwright script to cover them.
8. Expected Outputs
Each run should produce:
- pass/fail console output
- screenshots
- clear error exit code on failure
Recommended screenshot set:
login.pngfiles-empty-or-initial.pngfiles-after-create-folder.pngfiles-after-upload.pnguploads-page.png
9. Standard For Future UI Optimization
For future layout or interaction polish:
- first reproduce the current state in Playwright
- capture before screenshots
- make a focused UI change
- capture after screenshots
- compare the changed states visually
- keep the regression script updated if the flow meaningfully changes
10. Non-Negotiable Rule
No future UI optimization should be merged or considered complete without:
- a real service run
- Python Playwright flow validation
- screenshot review