Skip to content

ci(web): add Playwright E2E workflow#456

Draft
thxforall wants to merge 10 commits into
devfrom
feat/170-e2e-infra-p0
Draft

ci(web): add Playwright E2E workflow#456
thxforall wants to merge 10 commits into
devfrom
feat/170-e2e-infra-p0

Conversation

@thxforall
Copy link
Copy Markdown
Contributor

@thxforall thxforall commented May 6, 2026

Summary

  • add a GitHub Actions Playwright E2E workflow for web/API changes and dev pushes
  • wire the workflow to the current DATABASE env var names used by packages/web tests
  • generate the ignored Orval API client before Playwright so fresh CI checkouts can boot the app
  • fail fast when required E2E secrets are not configured
  • upload Playwright test-results artifacts on failure

Validation

  • git diff --check
  • bun run generate:api (packages/web)

Current blocker

The repo currently has no E2E/DB GitHub Actions secrets configured. Required secrets:

  • E2E_DATABASE_API_URL
  • E2E_DATABASE_ANON_KEY
  • E2E_DATABASE_SERVICE_ROLE_KEY
  • E2E_TEST_USER_EMAIL
  • E2E_TEST_USER_PASSWORD

Keeping this PR draft until those secrets exist and the Playwright check is green.

thxforall and others added 8 commits April 23, 2026 20:35
- router.replace()는 client soft-nav이라 AdminLayout(Server Component)이
  재실행되지 않아 로그아웃 후에도 사이드바가 그대로 남음.
- AuthProvider의 SIGNED_OUT 핸들러는 /api/auth/session DELETE를 비동기로
  호출하지만 handleLogout에서 await할 수 없어, 세션 쿠키가 살아있는 상태로
  /admin/login에 진입 → proxy.ts가 다시 /admin으로 바운스.
- 쿠키 DELETE를 inline에서 await한 뒤 window.location.assign()으로
  하드 네비게이션해 layout RSC가 admin chrome 없이 재렌더되도록 수정.
Admin layout was calling supabase.auth.getUser(), which hits the Supabase
Auth server for JWT validation (~100-500ms) on every /admin/* request.
proxy.ts already validates the cookie chain for every matched route and
invokes checkIsAdmin (DB), so the layout's own getUser() is pure
duplicate latency on the post-login first paint.

Switch to getSession() (cookie-cached, ~5-50ms). checkIsAdmin (DB) remains
the source of truth for admin role — the extra auth-server roundtrip is
what we drop, not the authorization check.
- Epic #170의 P1~P3 재배열 대신 P0 인프라 스프린트 신설
- 발견: CI에 E2E job 없음 / "80%"는 테스트 개수 기준 vanity metric / auth regression umbrella 부재
- 1주 스프린트(04-24~04-30): GitHub Actions e2e.yml + CI secret 주입 + baseline 측정 + 커버리지 재정의 + auth safety net 이슈 #179 생성
- mutation-covered critical flows / total critical flows 공식으로 재정의, baseline ~12% (2/17)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- 12개 태스크로 분해 (feature branch → workflow → secrets → PR → baseline → docs → umbrella 이슈 → retro → merge)
- 각 태스크는 2-5분 단위 step, 실제 명령어와 완성된 파일 내용 포함
- Task 4 (secret 주입)는 유저 수행 구간으로 명시 — agent는 명령어 준비만
- Task 10 새 이슈 번호 #179 가정, 실제 ID 다르면 spec 문서 업데이트 스텝 포함

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- triggers on pull_request (web/api-server paths) and dev push
- uses E2E_* secrets for Supabase cloud DEV + test user credentials
- uploads test-results/ artifact on failure (trace.zip + screenshots)
- concurrency group cancels in-progress runs for the same ref
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
decoded-app Ready Ready Preview, Comment May 6, 2026 8:38am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant