docs(phase-11): add validation strategy and research

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-15 10:40:41 +02:00
co-authored by Claude Sonnet 4.6
parent df01919220
commit 5a2dd0c13c
@@ -0,0 +1,85 @@
---
phase: 11
slug: ui-enhancements
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-04-15
---
# Phase 11 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|
| **Framework** | pytest 8.x + httpx 0.27 + pytest-playwright |
| **Config file** | none — pytest auto-discovers `tests/` |
| **Quick run command** | `pytest tests/ -x -q --ignore=tests/e2e` |
| **Full suite command** | `pytest tests/ -q` |
| **E2E run command** | `pytest tests/e2e/ -q` (requires live server + playwright browsers) |
| **Estimated runtime** | ~30 seconds (unit/integration), ~60 seconds (full + E2E) |
---
## Sampling Rate
- **After every task commit:** Run `pytest tests/ -x -q --ignore=tests/e2e`
- **After every plan wave:** Run `pytest tests/ -q`
- **Before `/gsd:verify-work`:** Full suite must be green (including E2E)
- **Max feedback latency:** ~30 seconds (unit/integration)
---
## Per-Task Verification Map
| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 11-01-* | 01 | 1 | UIE-01 | integration | `pytest tests/test_printer_crud.py -x -q -k "patch or edit"` | ❌ W0 | ⬜ pending |
| 11-01-* | 01 | 1 | UIE-01 | E2E | `pytest tests/e2e/test_printer_edit.py -x -q` | ❌ W0 | ⬜ pending |
| 11-02-* | 02 | 1 | UIE-02 | integration | `pytest tests/test_printer_crud.py -x -q -k "printers_new or redirect or library_no_form"` | ❌ W0 | ⬜ pending |
| 11-03-* | 03 | 2 | UIE-03 | integration | `pytest tests/test_printer_crud.py -x -q -k "client_detail or client_not_found or client_links"` | ❌ W0 | ⬜ pending |
| 11-04-* | 04 | 2 | UIE-04 | integration | `pytest tests/test_static.py -x -q -k "theme_toggle"` | ❌ W0 | ⬜ pending |
| 11-04-* | 04 | 2 | UIE-04 | E2E | `pytest tests/e2e/test_theme_toggle.py -x -q` | ❌ W0 | ⬜ pending |
| 11-05-* | 05 | 2 | UIE-05 | E2E | `pytest tests/e2e/test_i18n_toggle.py -x -q` | ❌ W0 | ⬜ pending |
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
---
## Wave 0 Requirements
- [ ] `tests/test_printer_crud.py` — add test functions for UIE-01 (PATCH), UIE-02 (redirect, new page, library no form), UIE-03 (client detail, 404, links)
- [ ] `tests/e2e/test_printer_edit.py` — E2E: open modal, check pre-fill, submit, confirm list update
- [ ] `tests/e2e/test_theme_toggle.py` — E2E: click theme button, verify `data-theme` cycles, verify localStorage
- [ ] `tests/e2e/test_i18n_toggle.py` — E2E: click lang toggle, verify nav label changes, verify localStorage
- [ ] `tests/test_static.py` — add test function for theme toggle presence (UIE-04)
*Note: existing `tests/test_printer_crud.py`, `tests/conftest.py`, and `tests/e2e/conftest.py` are in place — new test functions are added to existing files, no new infrastructure needed.*
---
## Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| Edit modal pre-fills all fields correctly on screen | UIE-01 | Visual validation of form state | Click Edit on any printer; verify IP, port, name, driver all pre-filled |
| Form section is visually distinct from printer list | UIE-02 | Layout / visual separation | Open /printers/new; confirm add form is on its own page or clearly separated |
| Language switch updates all visible UI text | UIE-05 | Full-page visual scan | Toggle FR→EN and EN→FR; confirm all nav, buttons, labels change |
---
## Validation Sign-Off
- [ ] All tasks have `<automated>` verify or Wave 0 dependencies
- [ ] Sampling continuity: no 3 consecutive tasks without automated verify
- [ ] Wave 0 covers all MISSING references
- [ ] No watch-mode flags
- [ ] Feedback latency < 30s (unit/integration)
- [ ] `nyquist_compliant: true` set in frontmatter
**Approval:** pending