بنقرة واحدة
e2e-ui-fix
Fix bugs from e2e-ui:execute bug reports with Playwright MCP verification
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Fix bugs from e2e-ui:execute bug reports with Playwright MCP verification
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Transform verbose natural language requests into structured bilingual documentation (Korean for review + English for AI prompts)
Review current git changes or latest commit using code-reviewer and architect-reviewer agents
Review comments and suggest cleanup (identify unnecessary comments, recommend improvements)
Generate Conventional Commits-compliant messages (feat/fix/docs/chore) in Korean and English
Identify and safely remove dead code, deprecated code, and unused exports from codebase
Generate business rule documentation from domain knowledge and requirements
| name | e2e-ui-fix |
| description | Fix bugs from e2e-ui:execute bug reports with Playwright MCP verification |
| context | fork |
| agent | general-purpose |
$ARGUMENTS
Extract test number (required) from arguments. Example: /e2e-ui:fix 3 to fix bug from Test 3.
This command implements a systematic bug fix workflow for bugs discovered during E2E testing:
docs/e2e-ui/bug-report-test-N.md (English version required)Load Bug Report (English version only, for AI):
docs/e2e-ui/bug-report-test-N.md (English, for AI - NOT ko.md)Read Project Configuration:
playwright.config.ts (or .js):
webServer.url or use.baseURLtestDir or testMatchpackage.json (in same directory):
next, react, vue, etc.Error Check:
/e2e-ui:execute N first to discover bugs."Use Playwright MCP to reproduce bug:
// Follow exact steps from bug report
browser_navigate: {base URL + route}
browser_type: {input selector, value}
browser_click: {button selector}
browser_snapshot: {capture state}
browser_take_screenshot: {evidence}
Verify bug exists:
If bug cannot be reproduced:
Analysis Steps:
Extract Error Details from Reproduction:
Identify Related Components (use Grep):
Grep to find components, handlers, or functions related to bugRead Source Files (targeted reading):
Read relevant source files identified by GrepFind Root Cause:
Tools to use:
Grep: Find relevant code patterns and filesRead: Examine source files (use offset/limit for efficiency)Document Findings:
Implement Fix:
Fix Types:
UI Component Bugs:
Logic Errors:
Integration Issues:
Quality Checks:
Use Playwright MCP to verify fix:
// Repeat reproduction steps
browser_navigate: {base URL + route}
browser_type: {input selector, value}
browser_click: {button selector}
browser_snapshot: {capture fixed state}
browser_take_screenshot: {after-fix evidence}
Verify Expected Behavior:
If fix verification fails:
Create Playwright Test (only after fix verified):
File Location: Use directory from playwright.config.ts (testDir or testMatch)
File Naming: Follow project pattern from testMatch (e.g., *.spec.ts, *.e2e.ts)
Test Structure:
import { test, expect } from "@playwright/test";
test.describe("Test N: {scenario name}", () => {
test("should {expected behavior}", async ({ page }) => {
// Navigate
await page.goto("/route");
// Perform actions from bug reproduction steps
await page.fill('input[name="email"]', "test@example.com");
await page.click('button[type="submit"]');
// Assert expected behavior
await expect(page.locator(".success-message")).toBeVisible();
// Assert no errors
// Additional assertions
});
// Edge case tests if needed
test("should handle edge case", async ({ page }) => {
// Edge case test
});
});
Test Quality:
Create Bilingual Fix Summary:
Files to create:
docs/e2e-ui/fix-summary-test-N.ko.md (Korean)docs/e2e-ui/fix-summary-test-N.md (English)Update Bug Report Status:
playwright.config.ts and package.json first for project configurationplaywright.config.ts (primary source of truth)Good Fix:
Good Test:
docs/e2e-ui/fix-summary-test-N.ko.md# 버그 수정 요약: Test N
> **수정일시**: {YYYY-MM-DD HH:mm}
> **원본 버그 리포트**: [bug-report-test-N.ko.md](./bug-report-test-N.ko.md)
> **테스트 파일**: `{path/to/test.spec.ts}`
---
## 📋 버그 요약
**우선순위**: {Critical/High/Medium}
**원본 이슈**: {버그 한 줄 설명}
---
## 🔍 재현 결과
**재현 성공 여부**: ✅ 재현됨 / ❌ 재현 안됨
**재현 단계**:
1. {단계 1}
2. {단계 2}
3. {버그 발생 지점}
**수정 전 증거**:
- 스크린샷: `{path/to/before-fix-screenshot.png}`
- 콘솔 에러:
{콘솔 에러 메시지}
---
## 🔬 근본 원인 분석
**분석 방법**: {Manual Analysis / Agent: debugger / Agent: error-detective}
**근본 원인**:
{근본 원인 상세 설명}
**영향받은 파일**:
- `{file1}`: {어떤 문제}
- `{file2}`: {어떤 문제}
**원인 카테고리**: {UI Component / Logic Error / Integration Issue / etc}
---
## 🛠️ 수정 내용
**수정 접근법**: {접근 방식 설명}
**변경된 파일**:
- `{file1}`: {변경 내용}
- `{file2}`: {변경 내용}
**주요 변경사항**:
```typescript
// Before
{코드 변경 전}
// After
{코드 변경 후}
수정 이유: {왜 이렇게 수정했는지}
검증 방법: Playwright MCP 브라우저 테스트
검증 단계:
수정 후 증거:
{path/to/after-fix-screenshot.png}예상 동작 확인: ✅ 정상 동작 확인됨
엣지 케이스 테스트:
테스트 파일: {path/to/test.spec.ts}
테스트 커버리지:
주요 assertion:
테스트 실행 결과: {✅ 통과 / 실행 예정}
수정 영향 범위:
부작용 확인: {없음 / 다음 사항 확인 필요}
추가 테스트 권장사항:
기술적 인사이트:
향후 예방 방법:
{추가 메모나 고려사항}
### English Version: `docs/e2e-ui/fix-summary-test-N.md`
```markdown
# Bug Fix Summary: Test N
> **Fixed**: {YYYY-MM-DD HH:mm}
> **Original Bug Report**: [bug-report-test-N.md](./bug-report-test-N.md)
> **Test File**: `{path/to/test.spec.ts}`
---
## 📋 Bug Summary
**Priority**: {Critical/High/Medium}
**Original Issue**: {one line bug description}
---
## 🔍 Reproduction Results
**Reproduced Successfully**: ✅ Yes / ❌ No
**Reproduction Steps**:
1. {step 1}
2. {step 2}
3. {bug occurs here}
**Before-Fix Evidence**:
- Screenshot: `{path/to/before-fix-screenshot.png}`
- Console Errors:
{console error messages}
---
## 🔬 Root Cause Analysis
**Analysis Method**: Direct Tools (Grep + Read + Playwright MCP)
**Root Cause**:
{detailed root cause explanation}
**Affected Files**:
- `{file1}`: {what issue}
- `{file2}`: {what issue}
**Cause Category**: {UI Component / Logic Error / Integration Issue / etc}
---
## 🛠️ Fix Implementation
**Fix Approach**: {approach explanation}
**Changed Files**:
- `{file1}`: {what changed}
- `{file2}`: {what changed}
**Key Changes**:
```typescript
// Before
{code before change}
// After
{code after change}
Rationale: {why fixed this way}
Verification Method: Playwright MCP Browser Testing
Verification Steps:
After-Fix Evidence:
{path/to/after-fix-screenshot.png}Expected Behavior Confirmed: ✅ Working as expected
Edge Cases Tested:
Test File: {path/to/test.spec.ts}
Test Coverage:
Main Assertions:
Test Execution Result: {✅ Pass / Pending}
Fix Impact:
Side Effects Check: {None / Following needs verification}
Additional Testing Recommendations:
Technical Insights:
Prevention for Future:
{additional notes or considerations}
---
## Execution Flow Summary
┌─────────────────────────────────────────┐ │ 1. Preparation │ │ - Load bug report │ │ - Read playwright.config.ts │ │ - Read package.json │ └────────────────┬────────────────────────┘ │ ▼ ┌─────────────────────────────────────────┐ │ 2. Bug Reproduction │ │ - Use Playwright MCP │ │ - Follow reproduction steps │ │ - Take before-fix screenshots │ └────────────────┬────────────────────────┘ │ ▼ ┌─────────────────────────────────────────┐ │ 3. Root Cause Analysis │ │ - Use Grep to find related code │ │ - Read source files (offset/limit) │ │ - Identify root cause │ └────────────────┬────────────────────────┘ │ ▼ ┌─────────────────────────────────────────┐ │ 4. Fix Implementation │ │ - Make minimal changes │ │ - Follow coding principles │ └────────────────┬────────────────────────┘ │ ▼ ┌─────────────────────────────────────────┐ │ 5. Fix Verification │ │ - Use Playwright MCP │ │ - Verify expected behavior │ │ - Take after-fix screenshots │ └────────────────┬────────────────────────┘ │ ▼ ┌─────────────────────────────────────────┐ │ 6. Write Regression Test │ │ - Create test in testDir │ │ - Follow testMatch pattern │ │ - Include edge cases │ └────────────────┬────────────────────────┘ │ ▼ ┌─────────────────────────────────────────┐ │ 7. Documentation │ │ - Generate bilingual fix summary │ │ - Update bug report status │ │ - Report to user │ └─────────────────────────────────────────┘
---
## Completion Report Format
After fix completion, provide summary to user:
```markdown
## Bug Fix Complete: Test N
### 🐛 Original Bug
- **Priority**: {priority}
- **Issue**: {one line description}
- **Bug Report**: docs/e2e-ui/bug-report-test-N.md
### ✅ Fix Summary
- **Root Cause**: {root cause}
- **Fix Approach**: {approach}
- **Files Changed**: {count} files
- {file1}
- {file2}
### 🧪 Verification
- **Reproduction**: ✅ Bug reproduced successfully
- **Fix Verified**: ✅ Expected behavior now works
- **Test Written**: ✅ Regression test created
### 📝 Generated Files
- **Fix Summary**:
- `docs/e2e-ui/fix-summary-test-N.ko.md` (Korean)
- `docs/e2e-ui/fix-summary-test-N.md` (English)
- **Test File**: `{path/to/test.spec.ts}`
### 📸 Evidence
- Before-fix: `{screenshot-before.png}`
- After-fix: `{screenshot-after.png}`
### 🔄 Next Steps
1. Review fix implementation
2. Run full test suite to verify no regressions
3. Continue with next bug or test: `/e2e-ui:execute {N+1}`
Start working according to the guidelines above.