4.2 KiB
4.2 KiB
Frontend Audit — Amare site
T0 — Baseline
- Rodar
composer qualityp/ registrar estado verde atual (110 passed após composer install) - Registrado estado baseline; Lighthouse final consolidado no T6
- Registrar achados baseline (audit completo em frontend-audit.md + relatório subagent)
T1 — Formulário de contato (e-mail, sem CRM)
- Form em /contato (campos, LGPD obrigatório)
- Rota POST /contato + validação + honeypot + throttle
- Anti duplo-envio, estados sucesso/erro/rede, preservação de dados
- E-mail via MAIL_MAILER (Resend prod / log local)
- A11y do form (labels, erros ligados)
- Testes feature + atualizar PublicPagesTest — Feature suite: 97 passed
T2 — A11y/navegação
- Menu mobile: Escape, retorno de foco, fallback sem-JS (app.js + noscript)
- Touch targets ≥44px (header, footer, CTAs, capítulos)
- Footer: ul/li + address
T3 — SEO/metadados
- Títulos "Página · Amare" (PageMeta::withBrandSuffix)
- og:locale, og:site_name, Twitter cards
- Favicon real + link, theme-color
- Metadados corretos em 404/500 (PageMeta::forErrorPage)
- noindex fora de produção (robots meta condicional)
T4 — Conteúdo/posicionamento
- Remover welcome.blade.php, home/cases, home/proof
- Dedup heading final-CTA vs h1 contato; dedup disclaimers
- CTA consistente mobile/desktop
- Corrigir copy "Em breve..." nas listas
- Rebalancear copy corporativo/social
T5 — Performance
- fetchpriority + dimensões hero (LCP)
- Guarda CLS no media/image
- Cache manifest de fontes
- Escape JSON-LD
T6 — Validação final
- pint, phpstan, testes unit/feature/architecture —
composer qualityverde (135 testes) - Browser tests + visual regression (18 passaram; 8 baselines
.snapatualizadas com--update-snapshots) - Lighthouse final (home mobile: A11y 100, Best Practices 100, SEO 69 só por noindex intencional fora de prod; contato desktop: A11y 100, BP 100)
- E2E form: submit → sucesso role=status; 2 e-mails (novo briefing + confirmação) logados via MAIL_MAILER=log; fila drenada
- Mobile: sem overflow horizontal nas 7 rotas (390px); menu mobile abre/fecha + Escape + retorno de foco
- Relatório de entrega
T7 — Hardening Public Blades
- Chunk 1: CSS overflow resilience (
overflow-wrapbody +[data-chapter-index]wrap safety, browser test) - Chunk 2: Hero + final-CTA fallbacks +
leading-tight(TDD) - Chunk 3a: Skip blank-quote testimonials (TDD)
- Chunk 3b: Guard empty
event_type+break-wordsmeta line (TDD) - Chunk 4: Extend
PageMeta::forErrorPage+ branded 419/429/503 error views (TDD) - Chunk 5:
app.jsdefensive hardening — bfcache submit reset, "Enviando…" label swap, aria-busy, mobile-menu focus trap + Escape - Chunk 6: Quality gates — Pint passed, PHPStan clean, 104 feature tests passed (587 assertions), Vite build succeeded
Deviations from plan
PageMeta::forErrorPagelanded onmainduring implementation; rebased and extended it for 419/429/503.- Contact form landed on
main; submit-state browser coverage was restored. event_type: nullviolates NOT NULL column — test uses''instead (guard covers both).
Browser CI Gate — estabilidade e diagnosticabilidade
BG — Causa raiz
- Diagnosticar 3 runs: mismatch visual (8 testes), acessibilidade (1), timeout networkidle 5s + overflow real
- Reproduzir local:
waitForLoadState('networkidle')fragil (conexões longas), default 5s - Reproduzir warning
file_get_contents(.env)em TODO teste (CI sem .env)
BG — Fixes
- Helper
StableScreenshot(tests/Support/): drop networkidle → readyState + fonts + settle - Exportar PNGs standalone (diff/expected/actual) no mismatch — visíveis nos artifacts
- CI:
cp .env.example .envnos jobs de teste; checkout/cache v5 - Gitignore tests/Browser/Screenshots
- Unit test MismatchScreenshotExporter; pint/phpstan/unit/feature verdes
- Push + PR + CI browser verde (PR #15 merge
f09ea83, run 31098941038) - Refresh baselines de CI se necessário (não necessário — browser passou com baselines atuais)