[feature] 대동제 페이지를 홍보 게시판으로 마이그레이션한다#1619
Conversation
- isFestival, route 필드 제거하고 id 기반 라우팅으로 단순화 - 이미지 파일명을 club-fest-2026, main-fest-2026으로 변경 - PromotionCard에서 분기 로직 제거
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 54 minutes and 28 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Warning
|
| Layer / File(s) | 요약 |
|---|---|
PromotionArticle 타입 정리 frontend/src/types/promotion.ts |
PromotionArticle 인터페이스에서 isFestival 선택 필드를 제거하여 페스티벌과 프로모션 구분 로직을 삭제합니다. |
목업 데이터 및 페스티벌 ID 업데이트 frontend/src/mocks/data/festivalMock.ts |
첫 번째 항목의 ID를 club-fest-2026으로 변경하고, 새로운 main-fest-2026 페스티벌 항목을 추가하며 MainFestImage 임포트를 연결합니다. |
UI 네비게이션 로직 통합 frontend/src/pages/MainPage/components/Banner/Banner.tsx, frontend/src/pages/PromotionPage/components/list/PromotionCard/PromotionCard.tsx, frontend/src/hooks/useNavigator.test.ts, frontend/src/utils/webviewBridge.ts |
Banner의 CLUB_FESTIVAL 처리를 /promotions/club-fest-2026으로 변경하고, PromotionCard의 isFestival 분기를 제거하여 항상 /promotions/{id}로 라우팅합니다. 관련 테스트와 주석을 새로운 경로에 맞춰 업데이트합니다. |
프로모션 상세 페이지 조건부 라우팅 frontend/src/pages/PromotionPage/PromotionDetailPage.tsx |
PromotionDetailPage를 래퍼 컴포넌트로 리팩터링하여 promotionId 접두사 기반 조건부 렌더링을 수행합니다. club-fest- 접두사는 IntroductionPage로, main-fest- 접두사는 BuskingPage로 라우팅하고, 그 외는 기존 PromotionDetail 흐름으로 폴백합니다. |
목업 API 핸들러 비활성화 frontend/src/mocks/handlers/promotion.ts |
GET /api/promotion 핸들러를 주석 처리하여 모의 응답을 비활성화합니다. |
예상 코드 리뷰 난이도
🎯 3 (중간) | ⏱️ ~25분
관련 이슈
- Moadong/moadong#1607: 페스티벌 페이지를 프로모션 흐름으로 통합하는 동일한 마이그레이션을 구현합니다.
- Moadong/moadong#1608: 페스티벌-프로모션 마이그레이션 작업을 코드 수준에서 직접 구현합니다.
- Moadong/moadong#1606: 페스티벌 항목을 프로모션 흐름으로 리팩터링하는 마이그레이션을 구현합니다.
관련 PR
- Moadong/moadong#788: 두 PR 모두 MainPage
Banner클릭/네비게이션 동작을 수정하며, 본 PR이CLUB_FESTIVAL대상 경로를 변경합니다. - Moadong/moadong#1507: 두 PR 모두 webview 네비게이션 경로 변환(선행
/제거)을 다루며,useNavigator.test.ts및 관련 webview 네비게이션 처리를 포함합니다. - Moadong/moadong#1386: 본 PR이 프로모션 UI 라우팅 로직을 업데이트하면서(예:
PromotionCard의isFestival기반 네비게이션 제거,PromotionDetailPage의 접두사 기반 처리 추가) 검색된 PR에서 도입한 초기/promotions경로 및 동작과 직접 겹칩니다.
제안 라벨
🔨 Refactor
제안 리뷰어
- seongwon030
- oesnuj
- lepitaaar
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | PR 제목은 '대동제 페이지를 홍보 게시판으로 마이그레이션한다'로, 변경사항의 핵심(축제 페이지를 /promotions 경로로 통합)을 명확하게 요약하고 있습니다. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
feature/migrate-festival-to-promotion-board
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Code Review
This pull request restructures the promotion and festival routes, replacing the generic /festival-introduction route and isFestival flag with specific promotion-based routes (/promotions/club-fest-2026 and /promotions/main-fest-2026) and updating mock data and components accordingly. Feedback suggests removing the commented-out mock handler code in promotion.ts and avoiding hardcoded, year-specific routes in AppRoutes.tsx by implementing dynamic routing based on the promotion ID pattern to improve maintainability.
| // GET /api/promotion - 홍보게시판 목록 조회 | ||
| http.get(`${API_BASE_URL}/api/promotion`, () => { | ||
| return HttpResponse.json({ | ||
| articles: mockPromotionArticles, | ||
| }); | ||
| }), | ||
| // http.get(`${API_BASE_URL}/api/promotion`, () => { | ||
| // return HttpResponse.json({ | ||
| // articles: mockPromotionArticles, | ||
| // }); | ||
| // }), |
| path: '/promotions/club-fest-2026', | ||
| element: ( | ||
| <ContentErrorBoundary> | ||
| <IntroductionPage /> | ||
| </ContentErrorBoundary> | ||
| ), | ||
| }, | ||
| { | ||
| path: '/promotions/main-fest-2026', | ||
| element: ( | ||
| <ContentErrorBoundary> | ||
| <BuskingPage /> | ||
| </ContentErrorBoundary> | ||
| ), | ||
| }, |
There was a problem hiding this comment.
라우터에 club-fest-2026, main-fest-2026과 같이 특정 연도가 포함된 경로를 하드코딩하면, 매년 새로운 축제가 열릴 때마다 AppRoutes.tsx 파일을 수정해야 하는 유지보수 문제가 발생합니다.
개선 제안:
특정 연도를 하드코딩하는 대신, /promotions/:promotionId 경로 하나만 유지하고 PromotionDetailPage 내부(또는 별도의 라우팅 래퍼 컴포넌트)에서 promotionId 패턴을 분석하여 동적으로 적절한 컴포넌트를 렌더링하도록 개선하는 것을 권장합니다.
예를 들어, promotionId가 club-fest-로 시작하면 IntroductionPage를, main-fest-로 시작하면 BuskingPage를 렌더링하고, 그 외에는 일반 PromotionDetailPage를 렌더링하는 방식입니다. 이렇게 하면 매년 라우트 설정을 변경하지 않고도 새로운 축제 페이지를 추가할 수 있습니다.
There was a problem hiding this comment.
특정 연도가 하드코딩되어 있으면 매년 AppRoutes.tsx를 수정해야하는 문제가 있다는 것을 알게되었습니다.
/promotions/:promotionId 하나로 통일하고 PromotionDetailPage 내부에서 promotionId 패턴에 따라 분기하도록 수정했습니다. 이제 행사가 추가되더라도 라우트 파일은 수정할 필요가 없습니다ㅏ
3128c95
✅ UI 변경사항 없음
전체 57개 스토리 · 22개 컴포넌트 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/src/mocks/handlers/promotion.ts`:
- Around line 46-50: The GET handler for /api/promotion was commented out
leaving requests unhandled; restore the MSW handler in promotion.ts by
re-enabling the http.get(...) handler that returns HttpResponse.json({ articles:
mockPromotionArticles }) so tests/local dev use the mock data; specifically
update the handler block referencing http.get, HttpResponse, and
mockPromotionArticles to return the mocked articles again.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a835e1dd-917b-4586-b357-696e23ee1489
⛔ Files ignored due to path filters (2)
frontend/src/assets/images/popup/club-fest-2026.pngis excluded by!**/*.pngfrontend/src/assets/images/popup/main-fest-2026.pngis excluded by!**/*.png
📒 Files selected for processing (8)
frontend/src/hooks/useNavigator.test.tsfrontend/src/mocks/data/festivalMock.tsfrontend/src/mocks/handlers/promotion.tsfrontend/src/pages/MainPage/components/Banner/Banner.tsxfrontend/src/pages/PromotionPage/components/list/PromotionCard/PromotionCard.tsxfrontend/src/routes/AppRoutes.tsxfrontend/src/types/promotion.tsfrontend/src/utils/webviewBridge.ts
💤 Files with no reviewable changes (1)
- frontend/src/types/promotion.ts
seongwon030
left a comment
There was a problem hiding this comment.
라우팅명에 숫자가 들어간 게 그렇게 흔하진 않은 것 같은데, 유지보수상 편할까요?
| // http.get(`${API_BASE_URL}/api/promotion`, () => { | ||
| // return HttpResponse.json({ |
There was a problem hiding this comment.
ai 말처럼 msw에서 사용하지 않는 코드는 바로 제거해도 됩니다 !
There was a problem hiding this comment.
이 부분은 테스트한다고 잠깐 주석 처리해둔건데 그대로 올려버렸네요. 현재 목업 파일을 사용하지 않고 있어서 제거했습니다. e3f6984
행사가 추가될 때마다 AppRoutes.tsx를 수정하지 않도록 PromotionDetailPage에서 promotionId 패턴으로 컴포넌트 분기 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/src/pages/PromotionPage/PromotionDetailPage.tsx (1)
1-1:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winPrettier 포맷팅 오류를 수정하세요.
CI 파이프라인이 코드 스타일 이슈로 인해 실패하고 있습니다. 다음 명령어를 실행하여 포맷팅 문제를 해결하세요:
npx prettier --write "frontend/src/pages/PromotionPage/PromotionDetailPage.tsx"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/pages/PromotionPage/PromotionDetailPage.tsx` at line 1, Prettier formatting issues in PromotionDetailPage.tsx are failing CI; run the formatter on the file and commit the result: execute npx prettier --write "frontend/src/pages/PromotionPage/PromotionDetailPage.tsx" to fix whitespace/formatting (e.g., the import/useLayoutEffect line and surrounding code), review changes in PromotionDetailPage (components, imports, and exported component) and stage/commit the formatted file so CI passes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@frontend/src/pages/PromotionPage/PromotionDetailPage.tsx`:
- Line 1: Prettier formatting issues in PromotionDetailPage.tsx are failing CI;
run the formatter on the file and commit the result: execute npx prettier
--write "frontend/src/pages/PromotionPage/PromotionDetailPage.tsx" to fix
whitespace/formatting (e.g., the import/useLayoutEffect line and surrounding
code), review changes in PromotionDetailPage (components, imports, and exported
component) and stage/commit the formatted file so CI passes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1565ac11-78d4-4a03-8ed7-a442401cbd34
📒 Files selected for processing (1)
frontend/src/pages/PromotionPage/PromotionDetailPage.tsx
백엔드 연동 완료로 불필요해진 mock 데이터 및 핸들러 제거
홍보 게시물 중 축제는 매년 열리는 행사인데, 내용이 다른 같은 이름의 행사들이 연도에 따라 쌓이는 구조라 라우트에 연도를 넣었습니다. |
#️⃣연관된 이슈
📝작업 내용
요약
/promotions/:idURL 패턴으로 통일/promotions/${article.id}로 이동라우팅 구조 변경
/festival-introduction/promotions/club-fest-2026/festival-busking/promotions/main-fest-2026네이밍 컨벤션
축제 id와 이미지 파일명을 {종류}-fest-{연도} 형식으로 통일
club-fest-2026club-fest-2026.pngmain-fest-2026main-fest-2026.png향후 축제 추가 시 동일 패턴 적용:
Summary by CodeRabbit
릴리스 노트
New Features
Refactor
Tests
Chores