Skip to content

chore: address PR #168 CodeRabbit review - #169

Merged
Doubtagain merged 2 commits into
devfrom
chore/pr-168-coderabbit-review
May 12, 2026
Merged

chore: address PR #168 CodeRabbit review#169
Doubtagain merged 2 commits into
devfrom
chore/pr-168-coderabbit-review

Conversation

@Doubtagain

Copy link
Copy Markdown
Collaborator

Summary

PR #168 (dev → main) CodeRabbit 리뷰의 actionable 항목을 일괄 반영합니다.

주요 변경

  • shared/api/http-client.ts: 수동 편집된 baseUrl 하드코딩 제거 (생성 파일 원복).
  • lib/webview/bridge.ts: postBridgeMessage / navigateNativeboolean 반환. /mpa/home 의 navigate 호출에 router.push fallback 추가.
  • features/portal-link/hooks/usePortalLinkJobPolling.ts: setIsTimedOutrefetchInterval 콜백 밖(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 해소.
  • 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: job_id 누락 케이스에서도 onError 호출, catch param any → 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.

스킵 항목 (이유 첨부)

  • swagger/openapi-dev.json security 상속 이슈: 백엔드(Spring Boot)에서 api:fetch 로 받는 파일이라 로컬 패치는 다음 fetch 시 유실됨. 백엔드 @SecurityRequirement 어노테이션 단에서 수정 필요.

Test plan

  • yarn type-check PASS
  • yarn lint 0 errors (잔여 warnings 는 기존 코드)
  • yarn build 24 pages 정상 생성
  • /auth/success 진입 시 스피너 + 에러 표시 동작
  • /mpa/home 에서 브라우저(WebView 아님)로 진입 시 navigateNative fallback (router.push) 동작
  • /resync/scraping SSR/CSR hydration 정상 (콘솔 mismatch 경고 없음)
  • /api/session/refresh 타임아웃 케이스에서 504 응답
  • wrangler.jsonc compatibility_date 변경 후 Workers 배포 정상

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
chukchuk-haksa Ready Ready Preview, Comment May 11, 2026 6:32am

Request Review

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4b77558e-6a0d-4807-9bf7-1c1054cbabb5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/pr-168-coderabbit-review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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>
@Doubtagain
Doubtagain merged commit afb69cd into dev May 12, 2026
3 checks passed
Doubtagain added a commit that referenced this pull request May 12, 2026
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>
Doubtagain added a commit that referenced this pull request May 12, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant