chore: address PR #168 CodeRabbit review - #169
Conversation
dev → main 통합 PR(#168) CodeRabbit 리뷰의 actionable 항목 일괄 반영. 주요 변경 - shared/api/http-client.ts: 수동 편집된 baseUrl 하드코딩 제거 (생성 파일 원복). 실제 baseUrl 은 httpConfig 의 createApiConfig() 가 환경 기반으로 주입. - lib/webview/bridge.ts: postBridgeMessage / navigateNative 가 boolean 반환. /mpa/home 의 navigate 호출에 router.push fallback 추가. - features/portal-link/hooks/usePortalLinkJobPolling.ts: setIsTimedOut 을 refetchInterval 콜백 밖(useEffect+setTimeout)으로 이동. isLoading / isError / error 도 함께 노출. - app/(funnel)/scraping/page.tsx: handledRef 가드로 중복 setStudentInfo/router.push 차단. - app/resync/scraping/page.tsx, app/(mpa)/mpa/resync/scraping/page.tsx: sessionStorage 동기 초기화로 인한 SSR/CSR hydration mismatch 해소 (useEffect 로 옮기고 isJobIdResolved 가드 추가). - app/api/session/refresh/route.ts: 10s AbortController 타임아웃 추가, 504 응답 처리. - app/auth/callback/route.ts: isPortalLinked 검증을 typeof === 'boolean' 으로 강화. - app/auth/success/page.tsx: Tailwind 클래스 → SCSS 모듈로 전환, 로딩/에러 UX 추가. - app/(funnel)/portal-login/components/PortalLoginForm: job_id 누락 케이스에서도 onError 호출, catch param 을 unknown 으로 좁힘. - app/(funnel)/contexts: 중복 hook useStudentInfo 제거하고 useFunnelContext 로 통합. - features/dashboard/components/SyncUpdateButton: lastSyncedAt 없을 때 '정보 업데이트' fallback. - features/portal-link/hooks/usePortalLinkSummary: jobId! non-null assertion 제거, 명시적 가드. - app/terms/page.tsx: 상대경로 SCSS 임포트를 @/app/... alias 로 변경. - docs/mpa-school-link-handoff.md: 시퀀스 다이어그램의 isPortalLinked 표기를 실제 계약과 일치 (서버 강제 false). fenced code block 에 language tag 추가. - package.json: wrangler ^4 → ^4.59.1 (CVE), @opennextjs/cloudflare ^1 → ^1.19.8. - wrangler.jsonc: compatibility_date 2024-09-23 → 2026-05-10. 검증 - yarn type-check: PASS - yarn lint: 0 errors (warnings 는 기존 잔여) - yarn build: 24 pages 정상 생성 스킵 - swagger/openapi-dev.json security 상속: 백엔드(Spring Boot)에서 fetch 되므로 로컬 패치는 다음 api:fetch 시 유실. @securityrequirement 어노테이션 단으로 이관 필요. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
PR #168 리뷰 반영 중 과하게 적용된 두 항목 되돌림. - @opennextjs/cloudflare ^1.19.8 → ^1 원복. CodeRabbit 자신이 선택사항이라 표시했고, ^1 도 어차피 최신 1.x 로 해석되어 install 결과가 사실상 동일. 차이는 package.json 표기뿐. - src/app/auth/success/page.tsx: 1.5s setTimeout 후 redirect 와 스피너/에러 UI 제거. CodeRabbit 권유 범위를 넘어 기존 동작(즉시 router.replace)을 바꾸는 새 UX 였음. SCSS 모듈 전환(인라인/Tailwind 금지 가이드라인)만 유지하고, 마크업은 원래 동작과 동일하게 빈 컨테이너 한 줄로 단순화. success.module.scss 도 .container 만 남기고 사용하지 않는 클래스 제거. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wrangler bumped Node minimum to 22 starting at 4.86. yarn.lock had 4.90.0 after the ^4 → ^4.59.1 bump in PR #169, which caused the deploy step to abort with "Wrangler requires at least Node.js v22.0.0". cloudflare/wrangler-action@v3 then interpreted the Node-version error as "wrangler not installed" and fell back to its bundled 3.90.0, which predates .jsonc support — surfacing as "No environment found" and "Missing entry-point" against wrangler.jsonc. Pin wrangler to 4.81.1 (last 4.x line working on Node 20) in both package.json and the deploy action input. Peer warning from @opennextjs/cloudflare (which requests ^4.86.0) is acceptable for this hotfix; full Node 22 migration is tracked separately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wrangler bumped Node minimum to 22 starting at 4.86. After PR #169 raised the package.json range from `^4` to `^4.59.1`, yarn install locked wrangler 4.90.0 which aborts on Node 20 with: Wrangler requires at least Node.js v22.0.0. You are using v20.20.2. cloudflare/wrangler-action@v3 interpreted that error as "wrangler not installed" and fell back to its bundled 3.90.0 via `yarn add wrangler@3.90.0`. Wrangler 3.90.0 predates .jsonc support (added in 3.91), so wrangler.jsonc was read as empty — surfacing as both "No environment found in configuration with name 'production'" and "Missing entry-point" against the production deploy. PR #167's deploy succeeded because yarn.lock at that point held 4.81.1, the last 4.x release that runs on Node 20. Changes: - package.json: pin wrangler to exact 4.81.1 - yarn.lock: regenerate (yarn up wrangler@4.81.1) - deploy-cloudflare.yml: set wranglerVersion 4.81.1 + packageManager yarn so the action installs the same version it would otherwise detect, bypassing the broken auto-detect path @opennextjs/cloudflare requests wrangler ^4.86.0 as a peer, which now emits a yarn warning. Acceptable for this hotfix; the Node 22 migration is tracked separately and will let us re-bump wrangler. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
PR #168 (
dev → main) CodeRabbit 리뷰의 actionable 항목을 일괄 반영합니다.주요 변경
baseUrl하드코딩 제거 (생성 파일 원복).postBridgeMessage/navigateNative가boolean반환./mpa/home의 navigate 호출에router.pushfallback 추가.setIsTimedOut을refetchInterval콜백 밖(useEffect+setTimeout)으로 이동.isLoading/isError/error도 함께 노출.handledRef가드로 중복setStudentInfo/router.push차단.sessionStorage동기 초기화로 인한 SSR/CSR hydration mismatch 해소.isPortalLinked검증을typeof === 'boolean'으로 강화.job_id누락 케이스에서도onError호출, catch paramany → unknown.useStudentInfo제거하고useFunnelContext로 통합.lastSyncedAt없을 때'정보 업데이트'fallback.jobId!non-null assertion 제거, 명시적 가드.@/app/...alias 로 변경.isPortalLinked표기를 실제 계약(서버 강제 false)과 일치. fenced code block 에 language tag 추가.wrangler ^4 → ^4.59.1(CVE),@opennextjs/cloudflare ^1 → ^1.19.8.compatibility_date 2024-09-23 → 2026-05-10.스킵 항목 (이유 첨부)
swagger/openapi-dev.jsonsecurity 상속 이슈: 백엔드(Spring Boot)에서api:fetch로 받는 파일이라 로컬 패치는 다음 fetch 시 유실됨. 백엔드@SecurityRequirement어노테이션 단에서 수정 필요.Test plan
yarn type-checkPASSyarn lint0 errors (잔여 warnings 는 기존 코드)yarn build24 pages 정상 생성/auth/success진입 시 스피너 + 에러 표시 동작/mpa/home에서 브라우저(WebView 아님)로 진입 시 navigateNative fallback (router.push) 동작/resync/scrapingSSR/CSR hydration 정상 (콘솔 mismatch 경고 없음)/api/session/refresh타임아웃 케이스에서 504 응답wrangler.jsonccompatibility_date 변경 후 Workers 배포 정상🤖 Generated with Claude Code